LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Attempting to run icecast as a service. (https://www.linuxquestions.org/questions/linux-server-73/attempting-to-run-icecast-as-a-service-4175607790/)

Usalabs 06-12-2017 07:56 AM

Attempting to run icecast as a service.
 
OK, here's the biggest and weirdest problem I've had,,,,my server is running OpenSuSe 42.1 in CLI mode with local SSH access only, I have successfully installed and configured icecast and the icecast.xml file, it works perfectly when run from a bash file, using:-

Code:

#! /bin/bash

sudo icecast -b -c /etc/icecast.xml

and SAM broadcast can connect and stream to icecast with no problems and I can even access the icecast web interface, but the problem starts when I try to run icecast as a service at boot-time, using these commands:-

Code:


systemctl enable icecast
systemctl start icecast

now, when I use systemctl status icecast -l I get the messages that icecast is running perfectly ('Running.....' shows in green letters), running SAM broadcaster, I see the encoder showing as 'Encoding......', but as soon as I start streaming through the encoder, it immediately disconnects with an error, and the icecast error.log only shows :-

Code:


[2017-06-12  05:23:44] INFO sighandler/_sig_die Caught signal 15, shutting down...
[2017-06-12  05:23:44] INFO main/main Shutting down
[2017-06-12  05:23:44] INFO sighandler/_sig_die Caught signal 15, shutting down...
[2017-06-12  05:23:44] INFO fserve/fserve_shutdown file serving stopped

But, if I don't run icecast as a service, and manually start it using the bash script, SAM broadcaster encoder works 100% with no errors.

I had to change just 1 line in the icecast.xml file to enable the pid file at /var/run/icecast.pid which wasn't used when run as a bash script, but *is* used when running as a service.


All times are GMT -5. The time now is 11:23 AM.