LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   can't get a daemon to start - says it's already started (https://www.linuxquestions.org/questions/linux-software-2/cant-get-a-daemon-to-start-says-its-already-started-399437/)

Avatar 01-04-2006 09:01 AM

can't get a daemon to start - says it's already started
 
I have a program called Simple Signalling Daemon from APC that is supposed to shut down the server when the unit switches to battery power. It used to run fine:
Code:

# /etc/rc.d/init.d/apcssd start
Starting APC Simple Signalling Daemon: [OK]

It's supposed to start when the server boots up.
For the last while it hasn't been starting, when I try to run it manually I get:
Code:

# /etc/rc.d/init.d/apcssd start
Starting APC Simple Signalling Daemon: Only one copy of ssd may be running at a time [FAILED]

but when I do:
Code:

# /etc/rc.d/init.d/apcssd status
ssd dead but subsys locked
# cat ssd.pid
(empty)
# rm /var/lock/subsys/ssd
rm: remove '/var/lock/subsys/ssd'?: y
# /etc/rc.d/init.d/apcssd status
ssd is stopped
# /etc/rc.d/init.d/apcssd start
Starting APC Simple Signalling Daemon: Only one copy of ssd may be running at a time [FAILED]

and ps aux | grep ssd is empty as well.
So I am pretty sure my ssd daemon is NOT running. but I can't figure out why it won't start. My server gets rebooted about twice/week (due to locking up) so it's not that it needs rebooting. I have Mandrake Multi Network Firewall operating system (kernel 2.4.18-8) and this is a production server. Any ideas?

ankscorek 01-04-2006 09:06 AM

try reinstalling the daemon....

Avatar 01-04-2006 10:29 AM

Reinstalled from source (tar.gz) downloaded from APC, same version (2.0.1). Same error. Any other suggestions?

british_76 01-04-2006 11:22 AM

have you checked the file /etc/rc.d/init.d/apcssd for the reason that causes the echo "Starting APC Simple Signalling Daemon: Only one copy of ssd may be running at a time [FAILED]"?

Avatar 01-04-2006 11:47 AM

Here is the contents of the apcssd file:

Code:

. /etc/rc.d/init.d/functions

case "$1" in
  start)
        # Start daemons.
        echo -n "Starting APC Simple Signalling Daemon: "
        daemon ssd /etc/ssd.conf
        echo
        touch /var/lock/subsys/ssd
        ;;
  stop)
        # Stop daemons.
        echo -n "Shutting down APC Simple Signalling Daemon: "
        killproc ssd
        echo
        rm -f /var/lock/subsys/ssd
        ;;
  status)
        status ssd
        ;;
  restart|reload)
        $0 stop
        $0 start
        ;;
  *)
        echo "Usage: $0 {start|stop|restart|reload|status}"
        exit 1
esac

exit 0

I tried to manually type the commands given under "start" but I got the error: bash: daemon: command not found

ssd.conf reads:
Code:

TTY = /dev/ttyS0
MaxBatRT = 300 # five minutes


british_76 01-05-2006 01:16 AM

hi!

this is NOT the area where i have much know how .... but i think, "daemon" is a function defined in /etc/rc.d/init.d/functions. yeah. checked in on mdk 10.1.

the daemon-function checks if the pid-file is there. not its content. please delete the pidfile and retry starting.

Avatar 12-19-2006 09:29 AM

Yeppers, I'm still having this problem. Same error, same everything.

"Service apcssd start
Starting APC Simple Signalling Daemon: Only one copy of ssd may be running at a time [FAILED]"

even though I deleted /var/lock/subsys/ssd

There is no pid file associated with ssd.

It gets hung trying to start /sbin/ssd which is a binary file I can't read with vi. I don't know where it is checking before it gets the error "Only one copy ..."

Please help!!!

Avatar 12-19-2006 12:02 PM

WOOHOO!!!! I found it!!!

There was a "hidden" pid file in :
/usr/local/share/ssd/ssd.pid

once I deleted it, my daemon can now start with [OK]

I found it on a russian website that happened to list all the files associated with ssd and their paths.

Thanks for the input


All times are GMT -5. The time now is 03:31 AM.