title: Icecast and Liquidsoap - No such file or directory
body: <p>My internet radio doesn't work.</p>
  <p>I use Debian 9, Icecast 2.4.2 and Liquidsoap 1.1.1</p>
  <p>I started internet radio with commands:</p>
  <p>/etc/init.d/icecast2 restart</p>
  <p>service liquidsoap restart</p>
  <p>I opened address: http://MY_IP:8000/autodj</p>
  <p>I got error in browser: 404 - The file you requested could not be found</p>
  <p>I got error in icecast logs: &quot;/usr/share/icecast2/web/autodj&quot; No such file or directory</p>
  <p>My icecast config (/etc/icecast2/icecast.xml):</p>
  <pre><code>&lt;icecast&gt;
  &lt;!-- location and admin are two arbitrary strings that are e.g. visible
       on the server info page of the icecast web interface
       (server_version.xsl). --&gt;
  &lt;location&gt;Earth&lt;/location&gt;
  &lt;admin&gt;icemaster@localhost&lt;/admin&gt;
  
  &lt;limits&gt;
      &lt;clients&gt;100&lt;/clients&gt;
      &lt;sources&gt;2&lt;/sources&gt;
      &lt;queue-size&gt;524288&lt;/queue-size&gt;
      &lt;client-timeout&gt;30&lt;/client-timeout&gt;
      &lt;header-timeout&gt;15&lt;/header-timeout&gt;
      &lt;source-timeout&gt;10&lt;/source-timeout&gt;
      &lt;!-- 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. --&gt;
      &lt;burst-on-connect&gt;1&lt;/burst-on-connect&gt;
      &lt;!-- 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  --&gt;
      &lt;burst-size&gt;65535&lt;/burst-size&gt;
  &lt;/limits&gt;
  
  &lt;authentication&gt;
      &lt;!-- Sources log in with username 'source' --&gt;
      &lt;source-password&gt;***&lt;/source-password&gt;
      &lt;!-- Relays log in with username 'relay' --&gt;
      &lt;relay-password&gt;***&lt;/relay-password&gt;
  
      &lt;!-- Admin logs in with the username given below --&gt;
      &lt;admin-user&gt;admin&lt;/admin-user&gt;
      &lt;admin-password&gt;***&lt;/admin-password&gt;
  &lt;/authentication&gt;
  
  &lt;hostname&gt;localhost&lt;/hostname&gt;
  
  &lt;!-- You may have multiple &lt;listener&gt; elements --&gt;
  &lt;listen-socket&gt;
      &lt;port&gt;8000&lt;/port&gt;
      &lt;!-- &lt;bind-address&gt;127.0.0.1&lt;/bind-address&gt; --&gt;
      &lt;!-- &lt;shoutcast-mount&gt;/stream&lt;/shoutcast-mount&gt; --&gt;
  &lt;/listen-socket&gt;
  
  &lt;http-headers&gt;
      &lt;header name=&quot;Access-Control-Allow-Origin&quot; value=&quot;*&quot; /&gt;
  &lt;/http-headers&gt;
  
  &lt;mount&gt;
      &lt;mount-name&gt;/autodj&lt;/mount-name&gt;
      &lt;charset&gt;utf-8&lt;/charset&gt;
      &lt;username&gt;source&lt;/username&gt;
      &lt;password&gt;***&lt;/password&gt;
  &lt;/mount&gt;
  
  &lt;fileserve&gt;1&lt;/fileserve&gt;
  
  &lt;paths&gt;
      &lt;!-- basedir is only used if chroot is enabled --&gt;
      &lt;basedir&gt;/usr/share/icecast2&lt;/basedir&gt;
  
      &lt;!-- Note that if &lt;chroot&gt; is turned on below, these paths must both
           be relative to the new root, not the original root --&gt;
      &lt;logdir&gt;/var/log/icecast2&lt;/logdir&gt;
      &lt;webroot&gt;/usr/share/icecast2/web&lt;/webroot&gt;
      &lt;adminroot&gt;/usr/share/icecast2/admin&lt;/adminroot&gt;
      &lt;!-- &lt;pidfile&gt;/usr/share/icecast2/icecast.pid&lt;/pidfile&gt; --&gt;
  
      &lt;!-- Aliases: treat requests for 'source' path as being for 'dest' path
           May be made specific to a port or bound address using the &quot;port&quot;
           and &quot;bind-address&quot; attributes.
        --&gt;
      &lt;!--
      &lt;alias source=&quot;/foo&quot; destination=&quot;/bar&quot;/&gt;
      --&gt;
      &lt;!-- Aliases: can also be used for simple redirections as well,
           this example will redirect all requests for http://server:port/ to
           the status page
      --&gt;
      &lt;alias source=&quot;/&quot; destination=&quot;/status.xsl&quot;/&gt;
      &lt;!-- The certificate file needs to contain both public and private part.
           Both should be PEM encoded.
      &lt;ssl-certificate&gt;/usr/share/icecast2/icecast.pem&lt;/ssl-certificate&gt;
      --&gt;
  &lt;/paths&gt;
  
  &lt;logging&gt;
      &lt;accesslog&gt;access.log&lt;/accesslog&gt;
      &lt;errorlog&gt;error.log&lt;/errorlog&gt;
      &lt;!-- &lt;playlistlog&gt;playlist.log&lt;/playlistlog&gt; --&gt;
      &lt;loglevel&gt;3&lt;/loglevel&gt; &lt;!-- 4 Debug, 3 Info, 2 Warn, 1 Error --&gt;
      &lt;logsize&gt;10000&lt;/logsize&gt; &lt;!-- Max size of a logfile --&gt;
      &lt;!-- 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)
      --&gt;
      &lt;!-- &lt;logarchive&gt;1&lt;/logarchive&gt; --&gt;
  &lt;/logging&gt;
  
  &lt;security&gt;
      &lt;chroot&gt;0&lt;/chroot&gt;
      &lt;!--
      &lt;changeowner&gt;
          &lt;user&gt;nobody&lt;/user&gt;
          &lt;group&gt;nogroup&lt;/group&gt;
      &lt;/changeowner&gt;
      --&gt;
  &lt;/security&gt;   
  </code></pre>
  <p>My liquidsoap config (/etc/liquidsoap/radio.liq):</p>
  <pre><code>set(&quot;log.file.path&quot;, &quot;/var/log/liquidsoap/basic.log&quot;)
  set(&quot;log.stdout&quot;, true)
  set(&quot;log.level&quot;,4)
  
  set(&quot;tag.encodings&quot;,[&quot;UTF-8&quot;])
  
  music = mksafe(playlist(&quot;/etc/liquidsoap/music&quot;))
  
  output.icecast(%vorbis(bytes_per_page=1024),
  host=&quot;localhost&quot;, 
  port=8000, 
  password=&quot;***&quot;,
  mount=&quot;autodj&quot;, 
  music)
  </code></pre>
  <p>Logs icecast:</p>
  <pre><code>[2021-06-26  20:04:06] INFO sighandler/_sig_die Caught signal 15, shutting down...
  [2021-06-26  20:04:06] INFO main/main Shutting down
  [2021-06-26  20:04:06] INFO fserve/fserve_shutdown file serving stopped
  [2021-06-26  20:04:07] INFO slave/_slave_thread shutting down current relays
  [2021-06-26  20:04:07] INFO slave/_slave_thread Slave thread shutdown complete
  [2021-06-26  20:04:07] INFO auth/auth_shutdown Auth shutdown
  [2021-06-26  20:04:07] INFO yp/yp_shutdown YP thread down
  [2021-06-26  20:04:08] INFO stats/stats_shutdown stats thread finished
  [2021-06-26  20:04:08] INFO main/main Icecast 2.4.2 server started
  [2021-06-26  20:04:08] INFO connection/get_ssl_certificate No SSL capability
  [2021-06-26  20:04:08] INFO yp/yp_update_thread YP update thread started
  [2021-06-26  20:04:29] INFO connection/_handle_source_request Source logging in at mountpoint &quot;/autodj&quot; from 127.0.0.1
  [2021-06-26  20:04:29] INFO source/get_next_buffer End of Stream /autodj
  [2021-06-26  20:04:29] INFO source/source_main listener count on /autodj now 0
  [2021-06-26  20:04:29] INFO source/source_shutdown Source from 127.0.0.1 at &quot;/autodj&quot; exiting
  [2021-06-26  20:05:45] INFO fserve/fserve_client_create checking for file /style.css (/usr/share/icecast2/web/style.css)
  [2021-06-26  20:05:46] INFO fserve/fserve_client_create checking for file /favicon.ico (/usr/share/icecast2/web/favicon.ico)
  [2021-06-26  20:05:46] WARN fserve/fserve_client_create req for file &quot;/usr/share/icecast2/web/favicon.ico&quot; No such file or directory
  [2021-06-26  20:05:46] INFO fserve/fserve_client_create checking for file /icecast.png (/usr/share/icecast2/web/icecast.png)
  [2021-06-26  20:07:10] INFO fserve/fserve_client_create checking for file /autodj (/usr/share/icecast2/web/autodj)
  [2021-06-26  20:07:10] WARN fserve/fserve_client_create req for file &quot;/usr/share/icecast2/web/autodj&quot; No such file or directory
  </code></pre>
  <p>Logs liquidsoap:</p>
  <pre><code>2021/06/26 20:04:29 &gt;&gt;&gt; LOG START
  2021/06/26 20:04:29 [protocols.external:3] Found &quot;/usr/bin/wget&quot;.
  2021/06/26 20:04:29 [main:3] Liquidsoap 1.1.1
  2021/06/26 20:04:29 [main:3] Using: graphics=[distributed with Ocaml] pcre=7.2.3 dtools=0.3.1 duppy=0.5.1 duppy.syntax=0.5.1 cry=0.2.2 mm=0.2.1 xmlplaylist=0.1.3 lastfm=0.3.0 ogg=0.4.5 vorbis=0.6.1 opus=0.1.0 speex=0.2.0 mad=0.4.4 flac=0.1.1 flac.ogg=0.1.1 dynlink=[distributed with Ocaml] lame=0.3.2 shine=0.2.0 gstreamer=0.2.0 frei0r=0.1.0 voaacenc=0.1.0 theora=0.3.0 gavl=0.1.5 bjack=0.1.4 alsa=0.2.1 ao=0.2.0 samplerate=0.1.2 taglib=0.3.1 magic=0.7.3 camomile=0.8.4 inotify=1.0 faad=0.3.2 soundtouch=0.1.7 portaudio=0.2.0 pulseaudio=0.1.2 ladspa=0.1.4 dssi=0.1.1 sdl=0.9.1 camlimages=4.2.0 lo=0.1.0 yojson=1.3.2 gd=1.0a5
  2021/06/26 20:04:29 [dynamic.loader:3] Could not find dynamic module for fdkaac encoder.
  2021/06/26 20:04:29 [dynamic.loader:3] Could not find dynamic module for aacplus encoder.
  2021/06/26 20:04:29 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/flac.cmxs.
  2021/06/26 20:04:29 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/lame.cmxs.
  2021/06/26 20:04:29 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/pulseaudio.cmxs.
  2021/06/26 20:04:29 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/faad.cmxs.
  2021/06/26 20:04:29 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/ogg.cmxs.
  2021/06/26 20:04:29 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/cry.cmxs.
  2021/06/26 20:04:29 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/voaacenc.cmxs.
  2021/06/26 20:04:29 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/mad.cmxs.
  2021/06/26 20:04:29 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/taglib.cmxs.
  2021/06/26 20:04:29 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/flac_ogg.cmxs.
  2021/06/26 20:04:29 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.1.1/plugins/vorbis.cmxs.
  2021/06/26 20:04:29 [frame:3] Using 44100Hz audio, 25Hz video, 44100Hz master.
  2021/06/26 20:04:29 [frame:3] Frame size must be a multiple of 1764 ticks = 1764 audio samples = 1 video samples.
  2021/06/26 20:04:29 [frame:3] Targetting 'frame.duration': 0.04s = 1764 audio samples = 1764 ticks.
  2021/06/26 20:04:29 [frame:3] Frames last 0.04s = 1764 audio samples = 1 video samples = 1764 ticks.
  2021/06/26 20:04:29 [video.converter:4] Couldn't find preferred video converter: gavl.
  2021/06/26 20:04:29 [audio.converter:4] Couldn't find preferred samplerate converter: libsamplerate.
  2021/06/26 20:04:29 [audio.converter:4] Using native samplerate converter
  2021/06/26 20:04:29 [threads:3] Created thread &quot;generic queue #1&quot;.
  2021/06/26 20:04:29 [threads:3] Created thread &quot;generic queue #2&quot;.
  2021/06/26 20:04:29 [threads:3] Created thread &quot;non-blocking queue #1&quot;.
  2021/06/26 20:04:29 [threads:3] Created thread &quot;non-blocking queue #2&quot;.
  2021/06/26 20:04:29 [clock:4] Currently 1 clocks allocated.
  2021/06/26 20:04:29 [clock.wallclock_main:4] Starting 1 sources...
  2021/06/26 20:04:29 [source:4] Source output.icecast_4966 gets up.
  2021/06/26 20:04:29 [source:4] Source mksafe gets up.
  2021/06/26 20:04:29 [source:4] Source playlist_4962 gets up.
  2021/06/26 20:04:29 [music:3] Loading playlist...
  2021/06/26 20:04:29 [music:3] Playlist is a directory.
  2021/06/26 20:04:29 [music:3] Successfully loaded a playlist of 4 tracks.
  2021/06/26 20:04:29 [music:4] Content kind is {audio=2;video=0;midi=0}.
  2021/06/26 20:04:29 [music:4] Activations changed: static=[], dynamic=[mksafe:autodj:autodj].
  2021/06/26 20:04:29 [source:4] Source safe_blank gets up.
  2021/06/26 20:04:29 [safe_blank:4] Content kind is {audio=2;video=0;midi=0}.
  2021/06/26 20:04:29 [safe_blank:4] Activations changed: static=[], dynamic=[mksafe:autodj:autodj].
  2021/06/26 20:04:29 [mksafe:4] Activations changed: static=[autodj:autodj], dynamic=[].
  2021/06/26 20:04:29 [autodj:4] Activations changed: static=[autodj], dynamic=[].
  2021/06/26 20:04:29 [autodj:4] Enabling caching mode: active source.
  2021/06/26 20:04:29 [autodj:3] Connecting mount autodj for source@localhost...
  2021/06/26 20:04:29 [decoder:4] Trying method &quot;META&quot; for &quot;/etc/liquidsoap/music/3.mp3&quot;...
  2021/06/26 20:04:29 [decoder:4] Trying method &quot;WAV&quot; for &quot;/etc/liquidsoap/music/3.mp3&quot;...
  2021/06/26 20:04:29 [decoder.wav:4] Invalid MIME type for &quot;/etc/liquidsoap/music/3.mp3&quot;: audio/mpeg!
  2021/06/26 20:04:29 [decoder.wav:4] Invalid file extension for &quot;/etc/liquidsoap/music/3.mp3&quot;!
  2021/06/26 20:04:29 [decoder:4] Trying method &quot;MIDI&quot; for &quot;/etc/liquidsoap/music/3.mp3&quot;...
  2021/06/26 20:04:29 [decoder:4] Trying method &quot;IMAGE&quot; for &quot;/etc/liquidsoap/music/3.mp3&quot;...
  2021/06/26 20:04:29 [decoder:4] Trying method &quot;FLAC&quot; for &quot;/etc/liquidsoap/music/3.mp3&quot;...
  2021/06/26 20:04:29 [decoder.flac:4] Invalid MIME type for &quot;/etc/liquidsoap/music/3.mp3&quot;: audio/mpeg!
  2021/06/26 20:04:29 [decoder.flac:4] Invalid file extension for &quot;/etc/liquidsoap/music/3.mp3&quot;!
  2021/06/26 20:04:29 [decoder:4] Trying method &quot;AAC&quot; for &quot;/etc/liquidsoap/music/3.mp3&quot;...
  2021/06/26 20:04:29 [decoder.aac:4] Invalid MIME type for &quot;/etc/liquidsoap/music/3.mp3&quot;: audio/mpeg!
  2021/06/26 20:04:29 [decoder.aac:4] Invalid file extension for &quot;/etc/liquidsoap/music/3.mp3&quot;!
  2021/06/26 20:04:29 [decoder:4] Trying method &quot;MP4&quot; for &quot;/etc/liquidsoap/music/3.mp3&quot;...
  2021/06/26 20:04:29 [decoder.mp4:4] Invalid MIME type for &quot;/etc/liquidsoap/music/3.mp3&quot;: audio/mpeg!
  2021/06/26 20:04:29 [decoder.mp4:4] Invalid file extension for &quot;/etc/liquidsoap/music/3.mp3&quot;!
  2021/06/26 20:04:29 [decoder:4] Trying method &quot;OGG&quot; for &quot;/etc/liquidsoap/music/3.mp3&quot;...
  2021/06/26 20:04:29 [decoder.ogg:4] Invalid MIME type for &quot;/etc/liquidsoap/music/3.mp3&quot;: audio/mpeg!
  2021/06/26 20:04:29 [decoder.ogg:4] Invalid file extension for &quot;/etc/liquidsoap/music/3.mp3&quot;!
  2021/06/26 20:04:29 [autodj:3] Connection setup was successful.
  2021/06/26 20:04:29 [decoder:4] Trying method &quot;MAD&quot; for &quot;/etc/liquidsoap/music/3.mp3&quot;...
  2021/06/26 20:04:29 [threads:3] Created thread &quot;wallclock_main&quot; (1 total).
  2021/06/26 20:04:29 [clock:4] Main phase starts.
  2021/06/26 20:04:29 [clock.wallclock_main:3] Streaming loop starts, synchronized with wallclock.
  2021/06/26 20:04:29 [decoder.mad:4] Libmad recognizes &quot;/etc/liquidsoap/music/3.mp3&quot; as mpeg audio (layer III, 192kbps, 44100Hz, 2 channels).
  2021/06/26 20:04:29 [decoder:3] Method &quot;MAD&quot; accepted &quot;/etc/liquidsoap/music/3.mp3&quot;.
  2021/06/26 20:04:29 [metadata.flac:4] Invalid MIME type for &quot;/etc/liquidsoap/music/3.mp3&quot;: audio/mpeg!
  2021/06/26 20:04:29 [metadata.flac:4] Invalid file extension for &quot;/etc/liquidsoap/music/3.mp3&quot;!
  2021/06/26 20:04:29 [metadata.mp4:4] Invalid MIME type for &quot;/etc/liquidsoap/music/3.mp3&quot;: audio/mpeg!
  2021/06/26 20:04:29 [metadata.mp4:4] Invalid file extension for &quot;/etc/liquidsoap/music/3.mp3&quot;!
  2021/06/26 20:04:29 [decoder.ogg:4] Invalid MIME type for &quot;/etc/liquidsoap/music/3.mp3&quot;: audio/mpeg!
  2021/06/26 20:04:29 [decoder.ogg:4] Invalid file extension for &quot;/etc/liquidsoap/music/3.mp3&quot;!
  </code></pre>