Page 1 of 1

Monit constantly trying to restart Crashplan

Posted: Wed Jan 02, 2013 7:44 am
by jiml
Have just noticed that monit is constantly running gobbling up CPU time. On investigation it seems it is trying to constantlty restart Crashplan and failing. It seems to be failing as you can see below because monit is looking for the file "/var/run/crashplan.pid" which doesn't exist;

Code: Select all

WARNING - This file was automatically generated on Thu Aug 16 13:49:42 +0100 2012 check process crashplan with pidfile /var/run/crashplan.pid start program = "/etc/init.d/crashplan start" stop program = "/etc/init.d/crashplan stop"
And this is because the init.d file as shown below doesn't create one;

Code: Select all

#!/bin/sh # Linux Standard Base comments ### BEGIN INIT INFO # Provides: CrashPlanEngine # Required-Start: $local_fs $network $remote_fs # Required-Stop: $local_fs $network $remote_fs # Should-Start: # Should-Stop: # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: CrashPlan Engine # Description: CrashPlan backup service engine ### END INIT INFO ############################################################# # Init script for CrashPlanEngine ############################################################# # Defaults SCRIPTNAME=/usr/local/crashplan/bin/CrashPlanEngine case "$1" in start) $SCRIPTNAME start ;; stop) $SCRIPTNAME stop ;; restart) $SCRIPTNAME restart ;; force-reload) $SCRIPTNAME force-reload ;; status) $SCRIPTNAME status ;; *) echo "Usage: $0 <start|stop|restart|force-reload|status>" >&2 exit 3 ;; esac exit 0
A quick check of the crasplan status gives the following;

Code: Select all

/etc/init.d/crashplan status CrashPlan Engine (pid 3694) is running.
A quick workaround to prove it is done by doing;

Code: Select all

echo "3694" > /var/run/crashplan.pid
monit goes back to it's quiet self

Jim!

Re: Monit constantly trying to restart Crashplan

Posted: Wed Jan 02, 2013 7:58 am
by bigfoot65
Might be a good idea to add this to the wiki. Would you be willing?

Re: Monit constantly trying to restart Crashplan

Posted: Wed Jan 02, 2013 8:40 am
by jiml
I'm going to try and frig a new init file with the PID file creation/deletion. If I manage that I'll try and see if I can fathom out how to use the wiki.

Jim!

Re: Monit constantly trying to restart Crashplan

Posted: Wed Jan 02, 2013 10:25 am
by jiml
As I said this is a frig. It doesn't do any testing to see if crashplan is actually running or not (but then the original didn't either).
But it seems to work. As root just copy the following over the existing /etc/init.d/crashplan file (copy the original first just in case).

Code: Select all

#!/bin/sh # Linux Standard Base comments ### BEGIN INIT INFO # Provides: CrashPlanEngine # Required-Start: $local_fs $network $remote_fs # Required-Stop: $local_fs $network $remote_fs # Should-Start: # Should-Stop: # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: CrashPlan Engine # Description: CrashPlan backup service engine ### END INIT INFO ############################################################# # Init script for CrashPlanEngine ############################################################# # Defaults SCRIPTNAME=/usr/local/crashplan/bin/CrashPlanEngine NAME=crashplan PIDFILE=/var/run/$NAME.pid case "$1" in start) $SCRIPTNAME start ps aux | grep CrashPlan | grep -v grep | awk '{print $2}' > $PIDFILE ;; stop) rm $PIDFILE $SCRIPTNAME stop ;; restart) rm $PIDFILE $SCRIPTNAME restart ps aux | grep CrashPlan | grep -v grep | awk '{print $2}' > $PIDFILE ;; force-reload) $SCRIPTNAME force-reload ;; status) $SCRIPTNAME status ;; *) echo "Usage: $0 <start|stop|restart|force-reload|status>" >&2 exit 3 ;; esac exit 0
Jim!

Re: Monit constantly trying to restart Crashplan

Posted: Wed Jan 02, 2013 10:56 am
by bigfoot65
There may be something amiss with the app install. The Amahi app and monit should be pointing to /usr/local/crashplan/CrashPlanEngine.pid instead of /var/run. There should be no need to create/modify the init script.

I just checked the app install script and for Ubuntu, that was the setting. How long ago did you install CrashPlan? I would like to fix this rather on install if possible.

Re: Monit constantly trying to restart Crashplan

Posted: Sat Jan 05, 2013 8:10 am
by jiml
Crashplan installed back in August

Jim!

Re: Monit constantly trying to restart Crashplan

Posted: Sat Jan 05, 2013 8:12 am
by bigfoot65
Ok, there may have been some changes since then. We need to get someone to test the latest to determine if any additional tweaking is needed. Last time I tried, everything was working.