<div dir="ltr"><div>Hello.</div><div><br></div><div>I have a problem in a master-relay scenario.</div><div><br></div><div>Sometimes, when a stream is down in master server and after a while the stream is fine again (e.g. after a network problem), relay/s server can't get the stream again, so I have to restart <span class="gmail-m_-3679515633196536149m_-8355279481842703834m_-6680033634223991127gmail-m_7657589096282367072gmail-il"><span class="gmail-m_-3679515633196536149m_-8355279481842703834m_-6680033634223991127gmail-il">icecast</span></span> in relay server to make it work:</div><div><br></div><div>1- An incoming stream is stopped in icecast master</div><div>2 - The stream is up again in icecast master</div><div>3 - Relay server has the mount point up but is not possible to play (timeout error when playing)</div><div>4 - When source-timeout is reached in icecast relay, relay server does source_shutdown in each failed mount points. Then when I request a mount point it gives a 404 error and I have to restart the service to make it work</div><div><br></div><div>Relay server has the following config:<br></div><div><master-update-interval>15</master-update-interval></div><div>So each 15 seconds the relay server goes to check the stream in the master server<br></div><div><br></div><div>Master Server has the following config:<br></div><div><source-timeout>180</source-timeout></div><div>So it has to be 3 minutes without stream to delete the mount point.</div><div><br></div><div>Why the relay server does not respond after the network failure and before the source-timeout?</div><div>Why the relay server can't find the mount points after the source-timeout?</div><div><br></div><div>Are there any way to force the relay server to check the mount points in master server to avoid a restart?</div><div><br></div><div>This is the master config:</div><div><icecast><br>    <limits><br>        <clients>5000</clients><br>        <sources>1000</sources><br>        <threadpool>4</threadpool><br>        <queue-size>524288</queue-size><br>        <client-timeout>60</client-timeout><br>        <header-timeout>30</header-timeout><br>        <source-timeout>20</source-timeout><br>             <burst-on-connect>0</burst-on-connect><br>        <burst-size>0</burst-size><br>    </limits><br><br>    <authentication><br>        <source-password>1234</source-password><br>        <relay-password>1234</relay-password><br>        <admin-user>1234</admin-user><br>        <admin-password>1234</admin-password><br>    </authentication><br><br>    <hostname>icecast-master</hostname><br><br>    <listen-socket><br>        <port>8000</port><br>    </listen-socket><br>        <http-headers><br>        <header name="Access-Control-Allow-Origin" value="*" /><br>    </http-headers><br><br>     <relay><br>        <server>127.0.0.1</server><br>        <port>8000</port><br>        <mount>/test1</mount><br>        <local-mount>/test1.mp3</local-mount><br>    </relay><br><relay><br>        <server>127.0.0.1</server><br>        <port>8000</port><br>        <mount>/test2</mount><br>        <local-mount>/test2.mp3</local-mount><br>    </relay><br><br><br>    <paths><br>        <basedir>/usr/share/icecast</basedir><br>        <logdir>/var/log/icecast</logdir><br>        <webroot>/usr/share/icecast/web</webroot><br>        <adminroot>/usr/share/icecast/admin</adminroot><br>    </paths><br><br>    <logging><br>        <accesslog>access.log</accesslog><br>        <errorlog>error.log</errorlog><br>        <loglevel>3</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error --><br>        <logsize>200000</logsize> <!-- Max size of a logfile --><br>    </logging><br><br>    <security><br>        <chroot>0</chroot><br>        <changeowner><br>            <user>icecast</user><br>            <group>icecast</group><br>        </changeowner><br>    </security><br></icecast><br></div><div>##################################</div><div>And this is relay config:</div><div><br></div><div><icecast><br>    <limits><br>        <clients>2310</clients><br>        <sources>10000</sources><br>        <threadpool>16</threadpool><br>        <queue-size>524288</queue-size><br>        <client-timeout>30</client-timeout><br>        <header-timeout>15</header-timeout><br>        <source-timeout>600</source-timeout><br>        <burst-on-connect>1</burst-on-connect><br>        <burst-size>65536</burst-size><br>    </limits><br><br>    <authentication><br>        <source-password>1234</source-password><br>        <relay-password>1234</relay-password><br>        <admin-user>1234</admin-user><br>        <admin-password>1234</admin-password><br>    </authentication><br><br>    <hostname>192.168.1.5</hostname><br><br>    <listen-socket><br>        <port>80</port><br>        <bind-address>192.168.1.5</bind-address><br>    </listen-socket><br><br>    <listen-socket><br>        <port>443</port><br>        <bind-address>192.168.1.5</bind-address><br>        <ssl>1</ssl><br>    </listen-socket><br><br>        <http-headers><br>        <header name="Access-Control-Allow-Origin" value="*" /><br>    </http-headers><br><br>    <master-server>192.168.1.4</master-server><br>    <master-server-port>8000</master-server-port><br>    <master-update-interval>15</master-update-interval><br>    <master-password>1234</master-password><br><br>   <mount><br>       <mount-name>/test1.mp3</mount-name><br>       <burst-on-connect>0</burst-on-connect><br>       <burst-size>0</burst-size><br>   </mount><br>   <mount><br>       <mount-name>/test2.mp3</mount-name><br>       <burst-on-connect>0</burst-on-connect><br>       <burst-size>0</burst-size><br>   </mount><br><br>    <fileserve>1</fileserve><br><br>    <paths><br>        <basedir>/usr/share/icecast</basedir><br>        <logdir>/var/log/icecast</logdir><br>        <webroot>/usr/share/icecast/web</webroot><br>        <adminroot>/usr/share/icecast/admin</adminroot><br>        <ssl-certificate>/etc/pki/tls/certs/certificate_chained.crt</ssl-certificate><br>    </paths><br><br>    <logging><br>        <accesslog>access.log</accesslog><br>        <errorlog>error.log</errorlog><br>        <loglevel>3</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error --><br>        <logsize>200000</logsize> <!-- Max size of a logfile --><br>    </logging><br><br>    <security><br>        <chroot>0</chroot><br>        <changeowner><br>            <user>icecast</user><br>            <group>icecast</group><br>        </changeowner><br>    </security><br></icecast><br></div><div><br></div><div><br></div><div>Relay's error log file:</div><div>[2019-07-30  02:11:15] WARN slave/open_relay_connection Failed to connect to <a href="http://192.168.1.4:8000/" target="_blank">192.168.1.4:8000</a><br>[2019-07-30  02:11:15] WARN slave/open_relay_connection Failed to connect to <a href="http://192.168.1.4:8000/" target="_blank">192.168.1.4:8000</a><br>[2019-07-30  02:13:32] WARN slave/open_relay_connection Failed to connect to <a href="http://192.168.1.4:8000/" target="_blank">192.168.1.4:8000</a><br>[2019-07-30  02:13:56] WARN slave/open_relay_connection Failed to connect to <a href="http://192.168.1.4:8000/" target="_blank">192.168.1.4:8000</a></div><div>...</div><div>(After the network problem, the stream is up in master server but relay server gives a timeout. Despite this, the number of listeners in log file continue growing)</div><div>[2019-07-30  02:20:32] INFO source/source_main listener count on /test1.mp3 now 787<br>[2019-07-30  02:20:34] INFO source/source_main listener count on /test1.mp3 now 788<br>[2019-07-30  02:20:34] INFO source/source_main listener count on /test1.mp3 now 789<br>[2019-07-30  02:20:35] INFO source/source_main listener count on /test1.mp3 now 790<br>[2019-07-30  02:20:35] INFO source/source_main listener count on /test1.mp3 now 791<br>[2019-07-30  02:20:36] INFO source/source_main listener count on /test1.mp3 now 792<br>[2019-07-30  02:20:36] INFO source/source_main listener count on /test1.mp3 now 793<br>[2019-07-30  02:20:37] INFO source/source_main listener count on /test1.mp3 now 794<br>[2019-07-30  02:20:38] INFO source/source_main listener count on /test1.mp3 now 796<br>[2019-07-30  02:20:39] INFO source/source_main listener count on /test1.mp3 now 797</div><div>...</div><div>(the source-timeout is applied and down mount points are cleared. It starts to give a 404 error)<br>[2019-07-30  02:20:39] INFO source/source_shutdown Source from 192.168.1.4 at "/test1.mp3" exiting<br>[2019-07-30  02:20:39] INFO source/source_clear_source 796 active listeners on /test1.mp3 released<br>[2019-07-30  02:20:39] INFO fserve/fserve_client_create checking for file /test1.mp3 (/usr/share/icecast/web/test1.mp3)<br>[2019-07-30  02:20:39] WARN fserve/fserve_client_create req for file "/usr/share/icecast/web/test1.mp3" No such file or directory<br>[2019-07-30  02:20:39] INFO fserve/fserve_client_create checking for file /test1.mp3 (/usr/share/icecast/web/test1.mp3)<br>[2019-07-30  02:20:39] WARN fserve/fserve_client_create req for file "/usr/share/icecast/web/test1.mp3" No such file or directory<br>[2019-07-30  02:20:39] INFO fserve/fserve_client_create checking for file /test1.mp3 (/usr/share/icecast/web/test1.mp3)<br>[2019-07-30  02:20:39] WARN fserve/fserve_client_create req for file "/usr/share/icecast/web/test1.mp3" No such file or directory<br>[2019-07-30  02:20:39] INFO fserve/fserve_client_create checking for file /test1.mp3 (/usr/share/icecast/web/test1.mp3)<br>[2019-07-30  02:20:39] WARN fserve/fserve_client_create req for file "/usr/share/icecast/web/test1.mp3" No such file or directory<br>[2019-07-30  02:20:39] INFO fserve/fserve_client_create checking for file /test1.mp3 (/usr/share/icecast/web/test1.mp3)</div><div>...<br>(The service is restarted)<br>[2019-07-30  02:45:26] INFO source/source_main listener count on /test1.mp3 now 0<br>[2019-07-30  02:45:39] INFO source/source_main listener count on /test1.mp3 now 1<br>[2019-07-30  02:45:54] INFO source/source_main listener count on /test1.mp3 now 2<br>[2019-07-30  02:46:18] INFO source/source_main listener count on /test1.mp3 now 3<br>[2019-07-30  02:46:19] INFO source/source_main listener count on /test1.mp3 now 4<br>...<br></div><div><br></div><div><br></div><div>Kind regards.</div><div>Martinho Pérez.</div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br><span><span><font color="#888888"><div></div></font></span></span></div></div></div></div></div></div></div></div>