Icecast

Paths and Logfiles

Sometimes I find that Icecast throws an error when it tries to create the log files. The error looks like this:
FATAL: could not open error logging
FATAL: could not open access logging
FATAL: Could not start logging

In this case I open my favourite text editor and start looking at the 'icecast..xml' file. I find these lines:
 <logdir>/usr/local/var/log/icecast</logdir>
        <webroot>/usr/local/share/icecast/web</webroot>
        <adminroot>/usr/local/share/icecast/admin</adminroot>

So I change these values to point to my home directory like so:
 <logdir>/home/adam</logdir>
        <webroot>home/adam</webroot>
        <adminroot>/home/adam</adminroot>

You would of course use the name of your own directory. Also change the values in the following part of the configuration file to read as follows:
 <logging>
        <accesslog>access.log</accesslog>
        <errorlog>error.log</errorlog>
        <loglevel>4</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->

    </logging>

And finally, in your home directory type the following:

touch access.log error.log

The touch command simply creates some blank files that icecast2 can then write to. Now I find that Icecast works fine. If you get a text editor and alter this password etc while Icecast2 is already running then you will need to stop Icecast2 (press ctrl and c simultaneously to do this) and then restart Icecast2 with the original command you used.