[Icecast] Icecast start up script for icecast

Erick Johnson ejohnson82 at gmail.com
Mon Feb 21 22:10:04 PST 2011


sorry, for the dup email here... my first reply was composed as html...

I think you should read 'man chown', it looks to me as though
the first command you got from Fu Kite may have been a typo,
unless there is something i don't know about putting a '.' between
the user and group name in chown.

i think what you wanted to do was (notice the colon):

$ chown -R sphynx:sphynx /var/log/icecast

also showing us an:

$ ls -al /var/log/icecast

would be very helpful.

On 2/22/11 12:52 AM, Luis Barrett wrote:
> Hi,
>
> WE MADE THE CHANGE OF PERMISSION FOR /VAR/LOG/ICECAST THEN LOGGED IN AS ROOT AND ATTEMPTED TO
> START THE SERVER BUT HERE IS THE ERROR THAT RESULTED:
>
> [sphynx at sphynxradio ~]$ chown sphynx.sphynx /var/log/icecast
>
> [sphynx at sphynxradio ~]$ su
> Password:
> [root at sphynxradio sphynx]# icecast -c /usr/local/etc/icecast.xml
> Server startup failed. Exiting
> [root at sphynxradio sphynx]#
>
> AT THIS POINT WE DON'T UNDERSTAND THE REASON FOR THE FAILED START UP…WE HOPE AND PRAY THAT YOU
>
> MAY BE ABLE TO FURTHER ASSIST WITH THIS ISSUE…WE ARE GRACIUS FOR ALL YOUR EFFORTS…
>
> Thank you,
>
> Luis Barrett
>
>
>
> On Mon, Feb 21, 2011 at 8:31 PM, Fu Kite (Eric Labelle) <eric.a.labelle at gmail.com <mailto:eric.a.labelle at gmail.com>> wrote:
>
>     my guess would be that the sphynx user does not have permission to write to the folder /var/log/icecast
>
>     try running the following command:
>
>     chown sphynx.sphynx /var/log/icecast
>
>     then as root you can execute:
>
>     icecast -c /usr/local/etc/icecast.xml
>
>     The reason you can run the icecast command as root is because when you set <chroot>1</chroot> in the <security> section (which you have done correctly it
>     seems) icecast will change the owner and group of the icecast process to what you specify (in this cast user:sphynx group:sphynx)
>
>     right now icecast is starting up correctly and switching users to sphynx on startup however things are messing up because the user sphynx probably does not
>     have write access to the /var/log/icecast directory where it is trying to write the log files.
>
>     So fix the permissions on /var/log/icecast and then run icecast as root (which is ok in this case since icecast will set the owner and group of the process
>     to sphynx.sphynx as specified in your icecast.xml file.
>
>     Good luck!
>
>     Eric
>
>
>     On Mon, Feb 21, 2011 at 10:40 PM, Luis Barrett <getpaid00 at gmail.com <mailto:getpaid00 at gmail.com>> wrote:
>
>         Hi,
>
>         WHEN ATTEMPTING TO START THE SERVER AS ROOT HERE IS THE ERROR WE RECEIVED…
>
>
>
>         [root at sphynxradio sphynx]# icecast -c /usr/local/etc/icecast.xml
>         WARNING: Couldn't change server root: No such file or directory
>
>
>         ERROR: You should not run icecast2 as root
>         Use the changeowner directive in the config file
>         [root at sphynxradio sphynx]#
>
>         PLEASE NOTE THAT THE CHANGEOWNER DIRECTIVE IN THE CONFIG FILE WAS PREVIOUSLY EDITED AS:
>
>
>
>
>
>         <security>
>                  <chroot>1</chroot>
>                  <!--
>                  <changeowner>
>                      <user>root</user>
>                      <group>root</group>
>                  </changeowner>
>
>
>
>
>
>
>         WE THEN LOGGED OUT AS ROOT AND ATTEMPTED TO START THE SERVER LOGGED IN SSH AS SPHYX
>         AND RECEIVED THE FOLLOWING ERROR
>
>         sphynx at sphynxradio ~]$ icecast -c /usr/local/etc/icecast.xml
>         WARNING: Cannot change server root unless running as root.
>
>
>
>
>         FATAL: could not open error logging (/var/log/icecast/error.log): Permission denied
>         FATAL: could not open access logging (/var/log/icecast/access.log): Permission denied
>         FATAL: Could not start logging
>         [sphynx at sphynxradio ~]$ su
>
>
>
>
>
>         PLEASE NOTE THAT THE CHANGEOWNER DIRECTIVE WAS EDITED AS SUCH PRIOR TO ATTEMPTING TO START THE SERVER...
>         <security>
>                  <chroot>1</chroot>
>                  <!--
>                  <changeowner>
>
>
>
>
>                      <user>sphynx</user>
>                      <group>sphynx</group>
>                  </changeowner>
>
>         BASED ON THE NATURE OF THE ERRORS IT WOULD SEEM TO US THAT OUR ISSUES ARE IN THE PERMISSIONS…CAN YOU SHED ANY LIGHT ON
>
>
>
>
>         THIS ISSUE FOR US AS IT WOULD BE OF GREAT ASSISTANCE…
>
>         Thank you,
>
>         Luis Barrett
>
>         On Mon, Feb 21, 2011 at 10:01 AM, Fu Kite (Eric Labelle) <eric.a.labelle at gmail.com <mailto:eric.a.labelle at gmail.com>> wrote:
>
>             Ok well you state yourself that you are getting an XML error when you try to start icecast... Have you attempted to validate your XML?
>
>              >>*Fatal: error parsing config file [icecast/usr/local/etc/icecast.xml]*
>             *
>             *
>             *What command are you running to start it? i would assume it's "icecast -c /icecast/usr/local/etc/icecast.xml" which would mean to me that somehow
>             you have a top level directory called icecast which is non-sense. I don't know of any linux system that has their /usr directory located inside any
>             other folder (it's a top level directory) so i'm gonna go nuts and assume it's located in /usr/local/etc/icecast.xml which would seem a lot more
>             logical... also assuming the xml is valid and the permissions on the xml file are ok what you need to run icecast would be*
>             *
>             *
>             *icecast -c /usr/local/etc/icecast.xml*
>             *
>             *
>             *That's assuming the only thing wrong with your setup is the command you are entering at the prompt... ie it's looking for the file in
>             /icecast/usr/local/etc/icecast.xml and can't find it.*
>
>             But you know what, nobody here has any clue what your setup looks like. You have provided lots of information but most of it doesn't help diagnose
>             your problem since for me to really know whether my solution will help you i would need to at least know what command you are running to start
>             icecast (I'm forced to assume from the error you posted that you are running "icecast -c icecast/usr/local/etc/icecast.xml" which as i stated
>             earlier doesn't at first glance seem to me as logical.
>
>             PS: No one here is trying to make you waste time... everyone is trying to help based on the information you have given. Your first two email talks
>             about locating the .pid file which of course will not be created till you start icecast... then finally you mention the error I addressed in this
>             message but you only give us partial information (the actual error) and not what command you are running to try and start it up.
>
>             Everyone here is doing their best to help you. None of the answers i have seen in this thread were misleading... they directly addressed the problem
>             stated in your first two emails which it turns out were not your problem at all (you either have an error in your xml or icecast can't read the file
>             - either you are giving it the wrong location on the command line or the user icecast is attempting to run under does not have the necessary
>             permission to read it) (XML validator you can use to double check the integrity of your icecast.xml -> http://www.w3schools.com/xml/xml_validator.asp)
>             *
>             *
>             On Mon, Feb 21, 2011 at 12:11 PM, Luis Barrett <getpaid00 at gmail.com <mailto:getpaid00 at gmail.com>> wrote:
>
>                 Hi Icecast,
>
>                 My name is Luis Barrett as you know, for past couple of days now I been having problem getting icecast started. The first thing
>                 I notice that we need to have a icecast.pid file but reading the script it say when you start up icecast it will create the icecast.pid
>                 file for us. So this is my question because now I'm getting upset because no one as been able be straight forward with us. We need
>                 to now why can we not start up icecast? So it can create the icecast.pid file and where that in our directory that file need to go? Again
>                 we have a Redhat Enterprise LS 4 reading the some forum and searching online we notice everyone having the same problem on a
>                 different Distro. I want to know how to start up icecast on our Distro if you now the answer please reply if you don't know the answer
>                 please let me know that you don't know the answer because I respect more if don't know the answer then just prolonging the issue
>                 or just direct me to the person who dose like the person who created icecast because right we are getting very upset that no one can
>                 not give us a straight answer.
>
>                 Thank you,
>
>                 Luis Barrett
>
>                 On Sun, Feb 20, 2011 at 12:46 PM, Keith Roberts <keith at karsites.net <mailto:keith at karsites.net>> wrote:
>
>                     On Sun, 20 Feb 2011, Geoff Shang wrote:
>
>                         To: Luis Barrett <getpaid00 at gmail.com <mailto:getpaid00 at gmail.com>>
>                         From: Geoff Shang <geoff at QuiteLikely.com>
>
>                         Subject: Re: [Icecast] Icecast start up script for icecast
>
>                         On Sun, 20 Feb 2011, Luis Barrett wrote:
>
>                             We already have icecast install we our just trying to it started. In the icecast started script we need the icecast.pid file and we
>                             just want to know were in the directory is the icecast.pid file or do we have to create one if we do in which directory?
>
>
>                         The Icecast PID file will be created by Icecast itself when it is started.
>
>                         The location of the file is defined in the config file icecast.xml.
>
>                         If it's not there or commented out, it appears that no PID file is created
>                         (i.e. that there's no default location).  I say this because my running
>                         Icecast server on my home machine doesn't seem to have one and it's
>                         commented out in the config file.
>
>                         I guess you can put it anywhere, but there's probably a standard location
>                         for such things and it may even be specified in your config file.
>
>
>                     Hi Geoff.
>
>                     I'm running Centos 5.5 and the init process says icecast has started, but at shutdown time I get a message saying icecast is not running.
>
>                     What needs to be edited in the icecast.xml to get it to startup at boot time please?
>
>                     Regards,
>
>                     Keith
>
>                     -----------------------------------------------------------------
>                     Websites:
>                     http://www.karsites.net
>                     http://www.php-debuggers.net
>                     http://www.raised-from-the-dead.org.uk
>
>                     All email addresses are challenge-response protected with
>                     TMDA [http://tmda.net]
>                     -----------------------------------------------------------------
>
>
>
>                 _______________________________________________
>                 Icecast mailing list
>                 Icecast at xiph.org <mailto:Icecast at xiph.org>
>                 http://lists.xiph.org/mailman/listinfo/icecast
>
>
>
>
>             --
>             Eric Labelle
>             (Dubian)
>             ________________________________
>             Dubearth Collective - www.dubearth.com <http://www.dubearth.com>
>
>
>
>             _______________________________________________
>             Icecast mailing list
>             Icecast at xiph.org <mailto:Icecast at xiph.org>
>             http://lists.xiph.org/mailman/listinfo/icecast
>
>
>
>
>
>     --
>     Eric Labelle
>     (Dubian)
>     ________________________________
>     Dubearth Collective - www.dubearth.com <http://www.dubearth.com>
>
>
>
>
>
> _______________________________________________
> Icecast mailing list
> Icecast at xiph.org
> http://lists.xiph.org/mailman/listinfo/icecast


More information about the Icecast mailing list