<div dir="ltr">does anyone know how i can setup my own icecast server? <div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Feb 16, 2020 at 9:57 AM James Turner <<a href="mailto:james@switchbladeuk.com">james@switchbladeuk.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi team,<br>
<br>
Please accent my apologies if this is NOT the place/distro list to be<br>
raising this. I had major dramas with the standard forum - registration and<br>
decided this may be a better route. <br>
<br>
My current instance icecast server has been built with --with-curl<br>
--with-openssl options as outlined within this post:<br>
<a href="https://weekly-geekly.github.io/articles/350236/index.html" rel="noreferrer" target="_blank">https://weekly-geekly.github.io/articles/350236/index.html</a> and the build<br>
version is 2.4.99.2<br>
<br>
I'm using a valid certificate from letsencrypt on a Ubuntu 18 server hosted<br>
by AWS. Icecast recognizes this without issue.<br>
<br>
I'm having issues disconnecting my source client from Icecast when the<br>
connections is via SSL. Non SSL source clients work as intended, connecting<br>
and disconnecting without issues and Icecast shuts down the mount points<br>
after client drop-outs as intended. See the logs outlined below for details.<br>
Using an SSL connection and once the client connection drops (for whatever<br>
reason) Icecast does not recognize this and keeps the mount point active<br>
forever - even when there's no data being sent by the client. On a<br>
reconnect try the client gets a 'mount point already in use' message. To<br>
get over this state I either have to restart the Icecast service OR manually<br>
kill the source from the admin interface. Once done. I can reconnect<br>
again.repeating the process<br>
<br>
Frustratingly, this (SSL) works (source>icecast>listener) - just about -<br>
but I'd dearly like to understand the issue with the ssl connection and<br>
mountpoint not being released. I would expect a source timeout to occur, as<br>
defined in the Icecast config file thus releasing the mount point. However,<br>
not to be. <br>
<br>
Connecting to unencrypted Icecast port (8000)<br>
<br>
Access.log<br>
xx.xx.xx.xxx- - [09/Feb/2020:17:56:50 +0000] "SOURCE /acdc.ogg HTTP/1.0" 401<br>
777 "-" "libshout/2.4.1" 0<br>
Error.log<br>
[2020-02-09 17:56:50] EROR connection/_handle_authed_client Client<br>
(role=anonymous, username=(null)) not allowed to use this request method on<br>
/acdc.ogg<br>
[2020-02-09 17:56:50] EROR util/util_http_select_best Input string does not<br>
parse as KVA. Selecting first option.<br>
[2020-02-09 17:56:50] WARN reportxml/reportxml_database_build_report No<br>
matching definition for "25387198-0643-4577-9139-7c4f24f59d4a"<br>
[2020-02-09 17:56:50] INFO connection/_handle_source_request Source logging<br>
in at mountpoint "/acdc.ogg" using "SOURCE" from xx.xx.xx.xxx as role<br>
legacy-global-source<br>
[2020-02-09 17:56:50] INFO source/source_main listener count on /acdc.ogg<br>
now 0<br>
[2020-02-09 17:56:50] INFO format-opus/initial_opus_page seen initial opus<br>
header<br>
<br>
Source client disconnects.<br>
Access.log<br>
xx.xx.xx.xxx- source [09/Feb/2020:17:56:57 +0000] "SOURCE /acdc.ogg<br>
HTTP/1.0" 200 324 "-" "libshout/2.4.1" 7<br>
<br>
Error.log<br>
[2020-02-09 17:53:12] INFO source/get_next_buffer End of Stream /acdc.ogg<br>
[2020-02-09 17:53:12] INFO source/source_shutdown Source from xx.xx.xx.xxx<br>
at "/acdc.ogg" exiting<br>
<br>
<br>
Connection by source client Using SSL (port 8444):<br>
Connect:<br>
Access.log<br>
xx.xx.xx.xxx- source [09/Feb/2020:18:00:25 +0000] "GET /admin/metadata<br>
HTTP/1.1" 200 481 "-" "Mozilla/5.0" 0<br>
Error.log<br>
<br>
[2020-02-09 18:00:24] INFO connection/_handle_source_request Source logging<br>
in at mountpoint "/acdc.ogg" using "SOURCE" from xx.xx.xx.xxx as role<br>
legacy-global-source<br>
[2020-02-09 18:00:24] WARN format/format_get_type Unsupported or legacy<br>
stream type: "audio/mpeg". Falling back to generic minimal handler for best<br>
effort.<br>
[2020-02-09 18:00:25] INFO source/source_main listener count on /acdc.ogg<br>
now 0<br>
[2020-02-09 18:00:25] INFO admin/admin_handle_request Received admin<br>
command metadata on mount '/acdc.ogg'<br>
[2020-02-09 18:00:25] INFO util/util_conv_string converting metadata from<br>
utf-8 to ISO8859-1<br>
[2020-02-09 18:00:25] INFO admin/command_metadata Metadata on mountpoint<br>
/acdc.ogg changed to " - "<br>
<br>
Source disconnects here.<br>
. No log entries - no source timeouts.<br>
. Mountpoint (here acdc.ogg) still active and visible in the admin<br>
interface<br>
. Source client cannot reconnect - see message below:<br>
<br>
<br>
Action: Source client tries to reconnect (port 8000 or 8444)<br>
<br>
Access.log<br>
xx.xx.xx.xxx- - [09/Feb/2020:18:03:53 +0000] "SOURCE /acdc.ogg HTTP/1.0" 401<br>
777 "-" "libshout/2.4.1" 1<br>
xx.xx.xx.xxx- source [09/Feb/2020:18:03:53 +0000] "SOURCE /acdc.ogg<br>
HTTP/1.0" 409 706 "-" "libshout/2.4.1" 0<br>
<br>
Error.log<br>
<br>
[2020-02-09 18:03:52] EROR connection/_handle_authed_client Client<br>
(role=anonymous, username=(null)) not allowed to use this request method on<br>
/acdc.ogg<br>
[2020-02-09 18:03:52] EROR util/util_http_select_best Input string does not<br>
parse as KVA. Selecting first option.<br>
[2020-02-09 18:03:52] WARN reportxml/reportxml_database_build_report No<br>
matching definition for "25387198-0643-4577-9139-7c4f24f59d4a"<br>
[2020-02-09 18:03:53] INFO connection/_handle_source_request Source logging<br>
in at mountpoint "/acdc.ogg" using "SOURCE" from xx.xx.xx.xxx as role<br>
legacy-global-source<br>
[2020-02-09 18:03:53] EROR util/util_http_select_best Input string does not<br>
parse as KVA. Selecting first option.<br>
[2020-02-09 18:03:53] WARN reportxml/reportxml_database_build_report No<br>
matching definition for "c5724467-5f85-48c7-b45a-915c3150c292"<br>
[2020-02-09 18:03:53] WARN connection/source_startup Mountpoint /acdc.ogg<br>
in use<br>
<br>
<br>
Any pointers very welcome.<br>
<br>
Here is the config.xml file for the server used:<br>
<br>
<icecast><br>
<!-- location and admin are two arbitrary strings that are e.g. visible<br>
on the server info page of the icecast web interface<br>
(server_version.xsl). --><br>
<location>earth</location><br>
<admin>icemaster@localhost</admin><br>
<br>
<!-- IMPORTANT!<br>
Especially for inexperienced users:<br>
Start out by ONLY changing all passwords and restarting Icecast.<br>
For detailed setup instructions please refer to the documentation.<br>
It's also available here: <a href="http://icecast.org/docs/" rel="noreferrer" target="_blank">http://icecast.org/docs/</a><br>
--><br>
<br>
<limits><br>
<clients>100</clients><br>
<sources>2</sources><br>
<queue-size>524288</queue-size><br>
<client-timeout>30</client-timeout><br>
<header-timeout>15</header-timeout><br>
<source-timeout>10</source-timeout><br>
<!-- If enabled, this will provide a burst of data when a client <br>
first connects, thereby significantly reducing the startup <br>
time for listeners that do substantial buffering. However,<br>
it also significantly increases latency between the source<br>
client and listening client. For low-latency setups, you<br>
might want to disable this. --><br>
<br>
<!-- same as burst-on-connect, but this allows for being more<br>
specific on how much to burst. Most people won't need to<br>
change from the default 64k. Applies to all mountpoints --><br>
<burst-size>65535</burst-size><br>
</limits><br>
<br>
<authentication><br>
<!-- Sources log in with username 'source' --><br>
<source-password>hackme57</source-password><br>
<!-- Relays log in with username 'relay' --><br>
<relay-password>hackme58</relay-password><br>
<br>
<!-- Admin logs in with the username given below --><br>
<admin-user>admin</admin-user><br>
<admin-password>ITJShKNE0pRg</admin-password><br>
</authentication><br>
<br>
<!-- set the mountpoint for a shoutcast source to use, the default if<br>
not<br>
specified is /stream but you can change it here if an<br>
alternative is<br>
wanted or an extension is required<br>
<shoutcast-mount>/live.nsv</shoutcast-mount><br>
--><br>
<br>
<!-- Uncomment this if you want directory listings --><br>
<!--<br>
<directory><br>
<yp-url-timeout>15</yp-url-timeout><br>
<yp-url><a href="http://dir.xiph.org/cgi-bin/yp-cgi" rel="noreferrer" target="_blank">http://dir.xiph.org/cgi-bin/yp-cgi</a></yp-url><br>
</directory><br>
--><br>
<br>
<!-- This is the hostname other people will use to connect to your<br>
server.<br>
It affects mainly the urls generated by Icecast for playlists and<br>
yp<br>
listings. You MUST configure it properly for YP listings to work!<br>
--><br>
<hostname>localhost</hostname><br>
<br>
<!-- You may have multiple <listener> elements --><br>
<listen-socket><br>
<port>8000</port><br>
<ssl>0</ssl><br>
<!-- <bind-address>127.0.0.1</bind-address> --><br>
<!-- <shoutcast-mount>/stream</shoutcast-mount> --><br>
</listen-socket><br>
<!--<br>
<listen-socket><br>
<port>8080</port><br>
</listen-socket><br>
--><br>
<br>
<listen-socket><br>
<port>8444</port><br>
<ssl>1</ssl><br>
</listen-socket><br>
<br>
<br>
<!-- Global header settings <br>
Headers defined here will be returned for every HTTP request to<br>
Icecast.<br>
<br>
The ACAO header makes Icecast public content/API by default<br>
This will make streams easier embeddable (some HTML5 functionality<br>
needs it).<br>
Also it allows direct access to e.g. /status-json.xsl from other<br>
sites.<br>
If you don't want this, comment out the following line or read up<br>
on CORS. <br>
--><br>
<http-headers><br>
<header name="Access-Control-Allow-Origin" value="*" /><br>
</http-headers><br>
<br>
<br>
<!-- Relaying:<br>
You don't need this if you only have one server.<br>
Please refer to the config for a detailed explanation.<br>
--><br>
<!--<master-server>127.0.0.1</master-server>--><br>
<!--<master-server-port>8001</master-server-port>--><br>
<!--<master-update-interval>120</master-update-interval>--><br>
<!--<master-password>hackme</master-password>--><br>
<br>
<!-- setting this makes all relays on-demand unless overridden, this is<br>
useful for master relays which do not have <relay> definitions<br>
here.<br>
The default is 0 --><br>
<!--<relays-on-demand>1</relays-on-demand>--><br>
<br>
<!--<br>
<relay><br>
<server>127.0.0.1</server><br>
<port>8080</port><br>
<mount>/example.ogg</mount><br>
<local-mount>/different.ogg</local-mount><br>
<on-demand>0</on-demand><br>
<br>
<relay-shoutcast-metadata>0</relay-shoutcast-metadata><br>
</relay><br>
--><br>
<br>
<br>
<!-- Mountpoints<br>
Only define <mount> sections if you want to use advanced options,<br>
like alternative usernames or passwords<br>
--><br>
<br>
<!-- Default settings for all mounts that don't have a specific <mount<br>
type="normal">.<br>
--><br>
<!--<br>
<mount type="default"><br>
<public>0</public><br>
<intro>/server-wide-intro.ogg</intro><br>
<max-listener-duration>3600</max-listener-duration><br>
<authentication type="url"><br>
<option name="mount_add"<br>
value="<a href="http://auth.example.org/stream_start.php" rel="noreferrer" target="_blank">http://auth.example.org/stream_start.php</a>"/><br>
</authentication><br>
<http-headers><br>
<header name="foo" value="bar" /><br>
</http-headers><br>
</mount><br>
--><br>
<br>
<!-- Normal mounts --><br>
<br>
<mount type="normal"><br>
<mount-name>/acdc.ogg</mount-name><br>
<br>
<!--username>othersource</username><br>
<password>hackme_1666</password--><br>
<br>
<max-listeners>1</max-listeners><br>
<!--dump-file>/tmp/dump-example1.ogg</dump-file--><br>
<burst-size>65536</burst-size><br>
<!--fallback-mount>/example2.ogg</fallback-mount><br>
<fallback-override>1</fallback-override><br>
<fallback-when-full>1</fallback-when-full><br>
<intro>/example_intro.ogg</intro--><br>
<hidden>0</hidden><br>
<public>0</public><br>
<authentication type="htpasswd"><br>
<option name="filename" value="/var/log/icecast2/password"/><br>
<option name="allow_duplicate_users" value="0"/><br>
</authentication><br>
<http-headers><br>
<header name="Access-Control-Allow-Origin"<br>
value="<a href="http://webplayer.example.org" rel="noreferrer" target="_blank">http://webplayer.example.org</a>" /><br>
</http-headers><br>
<!--on-connect>/home/icecast/bin/stream-start</on-connect><br>
<on-disconnect>/home/icecast/bin/stream-stop</on-disconnect--><br>
</mount><br>
<br>
<br>
<fileserve>1</fileserve><br>
<br>
<paths><br>
<!-- basedir is only used if chroot is enabled --><br>
<basedir>./</basedir><br>
<br>
<!-- Note that if <chroot> is turned on below, these paths must both<br>
be relative to the new root, not the original root --><br>
<logdir>/var/log/icecast2</logdir><br>
<webroot>/usr/local/share/icecast/web</webroot><br>
<adminroot>/usr/local/share/icecast/admin</adminroot><br>
<!-- <pidfile>/usr/share/icecast/icecast.pid</pidfile> --><br>
<br>
<!-- Aliases: treat requests for 'source' path as being for 'dest'<br>
path<br>
May be made specific to a port or bound address using the<br>
"port"<br>
and "bind-address" attributes.<br>
--><br>
<!--<br>
<alias source="/foo" destination="/bar"/><br>
--><br>
<!-- Aliases: can also be used for simple redirections as well,<br>
this example will redirect all requests for http://server:port/<br>
to<br>
the status page<br>
--><br>
<alias source="/" destination="/status.xsl"/><br>
<!-- The certificate file needs to contain both public and private<br>
part.<br>
Both should be PEM encoded.<br>
--><br>
<ssl-certificate>/var/log/icecast2/icecast.pem</ssl-certificate><br>
</paths><br>
<br>
<logging><br>
<accesslog>access.log</accesslog><br>
<errorlog>error.log</errorlog><br>
<!-- <playlistlog>playlist.log</playlistlog> --><br>
<loglevel>3</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error --><br>
<logsize>10000</logsize> <!-- Max size of a logfile --><br>
<!-- If logarchive is enabled (1), then when logsize is reached<br>
the logfile will be moved to<br>
[error|access|playlist].log.DATESTAMP,<br>
otherwise it will be moved to [error|access|playlist].log.old.<br>
Default is non-archive mode (i.e. overwrite)<br>
--><br>
<!-- <logarchive>1</logarchive> --><br>
</logging><br>
<br>
<security><br>
<chroot>0</chroot><br>
<br>
<changeowner><br>
<user>icecast</user><br>
<group>icecast</group><br>
</changeowner><br>
<br>
</security><br>
</icecast><?xml version="1.0" encoding="utf-8"?><br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Icecast mailing list<br>
<a href="mailto:Icecast@xiph.org" target="_blank">Icecast@xiph.org</a><br>
<a href="http://lists.xiph.org/mailman/listinfo/icecast" rel="noreferrer" target="_blank">http://lists.xiph.org/mailman/listinfo/icecast</a><br>
</blockquote></div>