Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

help setting up ports for Master/Relay servers

 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server
View previous topic :: View next topic  
Author Message
Yrrah



Joined: 21 Oct 2009
Posts: 5

PostPosted: Wed Oct 21, 2009 9:32 pm    Post subject: help setting up ports for Master/Relay servers Reply with quote

I would like help with port numbers to set up an IceCast Master server and an IceCast relay (distribution) server.

We have two servers at a remote location (Master server on one box, relay server on another). We have an Edcast source client set up locally which sends a continuous stream of mp3 data to the Master server. We can connect a player successfully to the Master server. It also appears that the relay server connects successfully to the origin server.

However, we cannot successfully connect a player to the relay server. I suspect we are simply not setting port numbers correctly, but we're not sure.

could someone provide the relevant sections of the XML configuration file for both servers, and a sample player link for connecting to each. I've searched and read for hours but haven't found info on when to use a <master-server> section (and what port numbers to use), and when to use a <relay> section and what port numbers to use for that (and the meanings of <mount> and <local-mount>). Do we comment out both those sections on the Master server? Do we use only the <master-server> section on the slave? And do we use port 8001 (meaning, a different port from the listener connections port)? If we use 8001, how does the master know we are using that port?

call me confused.

thanks much
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Wed Oct 21, 2009 11:06 pm    Post subject: Reply with quote

let us clear a few things up

The <master*> tags configure an icecast as a slave, to talk to another icecast to see what streams it has available. That communication tells the slave icecast to create a series of internal <relay>. You can define <relay> on a slave if you wish but generally people want a slave icecast or a series of specific relays.

The port you specify in the slave for the master server can be the same as that used for listeners.

The ports used for listening by icecast are defined in <listen-socket>, the other ports are used to specify the remote end of the connection.

local-mount is used to specify the local mountpoint of the relay being defined which may be different from the name used on the originating server.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Yrrah



Joined: 21 Oct 2009
Posts: 5

PostPosted: Wed Oct 21, 2009 11:16 pm    Post subject: Reply with quote

so then if I set up a <listen-socket>8001</listen-socket> on the master, and on the slave set <master-port>8001</master-port>, then those two boxes should be able to talk on those ports. If on the slave I set <listen-socket>8000</listen-socket>, then players would connect on port 8000.

This should put player connections only on port 8000 and relay connections only on port 8001 - correct? (actually, I'm not sure of the value of doing that, but at least I'll understand it).

thx
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Wed Oct 21, 2009 11:27 pm    Post subject: Reply with quote

Assuming you will expand those tags correctly then yes.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Yrrah



Joined: 21 Oct 2009
Posts: 5

PostPosted: Wed Nov 04, 2009 4:28 pm    Post subject: Reply with quote

Thanks very much, tried it. Still doesn't work. What am I doing wrong? Here are copies of my XML files (Slave is below master):

On the MASTER:

<icecast>
<limits>
<clients>1000</clients>
<sources>200</sources>
<threadpool>5</threadpool>
<queue-size>524288</queue-size>
<client-timeout>30</client-timeout>
<header-timeout>15</header-timeout>
<source-timeout>10</source-timeout>
<!-- If enabled, this will provide a burst of data when a client
first connects, thereby significantly reducing the startup
time for listeners that do substantial buffering. However,
it also significantly increases latency between the source
client and listening client. For low-latency setups, you
might want to disable this. -->
<burst-on-connect>1</burst-on-connect>
<!-- same as burst-on-connect, but this allows for being more
specific on how much to burst. Most people won't need to
change from the default 64k. Applies to all mountpoints -->
<burst-size>65535</burst-size>
</limits>

<authentication>
<!-- Sources log in with username 'source' -->
<source-password>hackme</source-password>
<!-- Relays log in username 'relay' -->
<relay-password>hackme</relay-password>

<!-- Admin logs in with the username given below -->
<admin-user>admin</admin-user>
<admin-password>hackme</admin-password>
</authentication>

<!-- set the mountpoint for a shoutcast source to use, the default if not
specified is /stream but you can change it here if an alternative is
wanted or an extension is required
<shoutcast-mount>/live.nsv</shoutcast-mount>
-->

<!-- Uncomment this if you want directory listings -->
<!--
<directory>
<yp-url-timeout>15</yp-url-timeout>
<yp-url>http://dir.xiph.org/cgi-bin/yp-cgi</yp-url>
</directory>
-->

<!-- This is the hostname other people will use to connect to your server.
It affects mainly the urls generated by Icecast for playlists and yp
listings. -->
<hostname>localhost</hostname>

<!-- You may have multiple <listener> elements -->
<!-- HEE use socket 8001 for connections from other servers (slaves) -->
<listen-socket>
<port>8001</port>
<!-- <bind-address>127.0.0.1</bind-address> -->
<!-- <shoutcast-mount>/stream</shoutcast-mount> -->
</listen-socket>
<!--
<listen-socket>
<port>8000</port>
</listen-socket>
-->


<!-- HEE This is the master-server. Only a Slave needs this entry to know where
to pull its streams from
-->
<!--<master-server>127.0.0.1</master-server>-->
<!--<master-server-port>8001</master-server-port>-->
<!--<master-update-interval>120</master-update-interval>-->
<!--<master-password>hackme</master-password>-->

<!-- setting this makes all relays on-demand unless overridden, this is
useful for master relays which do not have <relay> definitions here.
The default is 0 -->
<!--<relays-on-demand>1</relays-on-demand>-->


<!-- HEE Only use "relay" on a slave to specify specific mount points to pull -->



<fileserve>1</fileserve>

<paths>
<!-- basedir is only used if chroot is enabled -->
<basedir>./</basedir>

<!-- Note that if <chroot> is turned on below, these paths must both
be relative to the new root, not the original root -->
<logdir>./logs</logdir>
<webroot>./web</webroot>
<adminroot>./admin</adminroot>
<!-- <pidfile>@pkgdatadir@/icecast.pid</pidfile> -->

<!-- Aliases: treat requests for 'source' path as being for 'dest' path
May be made specific to a port or bound address using the "port"
and "bind-address" attributes.
-->
<!--
<alias source="/" dest="/status.xsl"/>
-->
<!-- Aliases: can also be used for simple redirections as well,
this example will redirect all requests for http://server:port/ to
the status page
-->
<alias source="/" dest="/status.xsl"/>
</paths>

<logging>
<accesslog>access.log</accesslog>
<errorlog>error.log</errorlog>
<!-- <playlistlog>playlist.log</playlistlog> -->
<loglevel>4</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
<logsize>10000</logsize> <!-- Max size of a logfile -->
<!-- If logarchive is enabled (1), then when logsize is reached
the logfile will be moved to [error|access|playlist].log.DATESTAMP,
otherwise it will be moved to [error|access|playlist].log.old.
Default is non-archive mode (i.e. overwrite)
-->
<!-- <logarchive>1</logarchive> -->
</logging>

<security>
<chroot>0</chroot>
<!--
<changeowner>
<user>nobody</user>
<group>nogroup</group>
</changeowner>
-->
</security>
</icecast>





On the SLAVE:

<icecast>
<limits>
<clients>1000</clients>
<sources>200</sources>
<threadpool>5</threadpool>
<queue-size>524288</queue-size>
<client-timeout>30</client-timeout>
<header-timeout>15</header-timeout>
<source-timeout>10</source-timeout>
<!-- If enabled, this will provide a burst of data when a client
first connects, thereby significantly reducing the startup
time for listeners that do substantial buffering. However,
it also significantly increases latency between the source
client and listening client. For low-latency setups, you
might want to disable this. -->
<burst-on-connect>1</burst-on-connect>
<!-- same as burst-on-connect, but this allows for being more
specific on how much to burst. Most people won't need to
change from the default 64k. Applies to all mountpoints -->
<burst-size>65535</burst-size>
</limits>

<authentication>
<!-- Sources log in with username 'source' -->
<source-password>hackme</source-password>
<!-- Relays log in username 'relay' -->
<relay-password>hackme</relay-password>

<!-- Admin logs in with the username given below -->
<admin-user>admin</admin-user>
<admin-password>hackme</admin-password>
</authentication>

<!-- set the mountpoint for a shoutcast source to use, the default if not
specified is /stream but you can change it here if an alternative is
wanted or an extension is required
<shoutcast-mount>/live.nsv</shoutcast-mount>
-->

<!-- Uncomment this if you want directory listings -->
<!--
<directory>
<yp-url-timeout>15</yp-url-timeout>
<yp-url>http://dir.xiph.org/cgi-bin/yp-cgi</yp-url>
</directory>
-->

<!-- This is the hostname other people will use to connect to your server.
It affects mainly the urls generated by Icecast for playlists and yp
listings. -->
<hostname>localhost</hostname>

<!-- You may have multiple <listener> elements -->
<!-- HEE this is the port that listeners will connect to on this Slave/Relay -->
<listen-socket>
<port>8000</port>
<!-- HEE IceCast will only listen on the bind address if specified-->
<!--<bind-address>209.222.145.151</bind-address>-->
<!-- <shoutcast-mount>/stream</shoutcast-mount> -->
</listen-socket>
<!--
<listen-socket>
<port>8001</port>
</listen-socket>
-->

<!-- HEE this points to Blue as the Master -->
<master-server>192.168.1.3</master-server>
<!-- HEE On Blue, we specified a listen-socket of 8001, so we do same here-->
<master-server-port>8001</master-server-port>
<master-update-interval>120</master-update-interval>
<master-password>hackme</master-password>
<!--<master-username>relay</master-username>-->

<!-- setting this makes all relays on-demand unless overridden, this is
useful for master relays which do not have <relay> definitions here.
The default is 0 -->
<!--<relays-on-demand>1</relays-on-demand>-->

<!--
<relay>
<server>127.0.0.1</server>
<port>8001</port>
<mount>/example.ogg</mount>
<local-mount>/different.ogg</local-mount>
<on-demand>0</on-demand>

<relay-shoutcast-metadata>0</relay-shoutcast-metadata>
</relay>
-->

<!-- Only define a <mount> section if you want to use advanced options,
like alternative usernames or passwords
<mount>
<mount-name>/example-complex.ogg</mount-name>

<username>othersource</username>
<password>hackmemore</password>

<max-listeners>1</max-listeners>
<dump-file>/tmp/dump-example1.ogg</dump-file>
<burst-size>65536</burst-size>
<fallback-mount>/example2.ogg</fallback-mount>
<fallback-override>1</fallback-override>
<fallback-when-full>1</fallback-when-full>
<intro>/example_intro.ogg</intro>
<hidden>1</hidden>
<no-yp>1</no-yp>
<authentication type="htpasswd">
<option name="filename" value="myauth"/>
<option name="allow_duplicate_users" value="0"/>
</authentication>
<on-connect>/home/icecast/bin/stream-start</on-connect>
<on-disconnect>/home/icecast/bin/stream-stop</on-disconnect>
</mount>

<mount>
<mount-name>/auth_example.ogg</mount-name>
<authentication type="url">
<option name="mount_add" value="http://myauthserver.net/notify_mount.php"/>
<option name="mount_remove" value="http://myauthserver.net/notify_mount.php"/>
<option name="listener_add" value="http://myauthserver.net/notify_listener.php"/>
<option name="listener_remove" value="http://myauthserver.net/notify_listener.php"/>
</authentication>
</mount>

-->

<fileserve>0</fileserve>

<paths>
<!-- basedir is only used if chroot is enabled -->
<basedir>./</basedir>

<!-- Note that if <chroot> is turned on below, these paths must both
be relative to the new root, not the original root -->
<logdir>./logs</logdir>
<webroot>./web</webroot>
<adminroot>./admin</adminroot>
<!-- <pidfile>@pkgdatadir@/icecast.pid</pidfile> -->

<!-- Aliases: treat requests for 'source' path as being for 'dest' path
May be made specific to a port or bound address using the "port"
and "bind-address" attributes.
-->
<!--
<alias source="/" dest="/status.xsl"/>
-->
<!-- Aliases: can also be used for simple redirections as well,
this example will redirect all requests for http://server:port/ to
the status page
-->
<alias source="/" dest="/status.xsl"/>
</paths>

<logging>
<accesslog>access.log</accesslog>
<errorlog>error.log</errorlog>
<!-- <playlistlog>playlist.log</playlistlog> -->
<loglevel>4</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
<logsize>10000</logsize> <!-- Max size of a logfile -->
<!-- If logarchive is enabled (1), then when logsize is reached
the logfile will be moved to [error|access|playlist].log.DATESTAMP,
otherwise it will be moved to [error|access|playlist].log.old.
Default is non-archive mode (i.e. overwrite)
-->
<!-- <logarchive>1</logarchive> -->
</logging>

<security>
<chroot>0</chroot>
<!--
<changeowner>
<user>nobody</user>
<group>nogroup</group>
</changeowner>
-->
</security>
</icecast>
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Wed Nov 04, 2009 8:31 pm    Post subject: Reply with quote

without the checking the logs I would guess that the slave tries to access the master to get the streamlist and fails to auth because the <relay-user> is not set in the master. The master access log should report those attempts unless you have a network misconfiguration.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Yrrah



Joined: 21 Oct 2009
Posts: 5

PostPosted: Wed Nov 04, 2009 9:03 pm    Post subject: Reply with quote

Thanks Karl. We thought we had a complete set of XML fields and none of them match <relay-user>. Can you supply an example of where this goes on the Master server XML file?
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Wed Nov 04, 2009 11:46 pm    Post subject: Reply with quote

Is it not clear from icecast-2.3.2/doc/icecast2_config_file.html ?

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber