Monit constantly trying to restart Crashplan

jiml
Posts: 28
Joined: Wed Jan 13, 2010 1:13 am

Monit constantly trying to restart Crashplan

Postby jiml » Wed Jan 02, 2013 7:44 am

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!

Ubuntu 12.04 (64bit)

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Monit constantly trying to restart Crashplan

Postby bigfoot65 » Wed Jan 02, 2013 7:58 am

Might be a good idea to add this to the wiki. Would you be willing?
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

jiml
Posts: 28
Joined: Wed Jan 13, 2010 1:13 am

Re: Monit constantly trying to restart Crashplan

Postby jiml » Wed Jan 02, 2013 8:40 am

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!

Ubuntu 12.04 (64bit)

jiml
Posts: 28
Joined: Wed Jan 13, 2010 1:13 am

Re: Monit constantly trying to restart Crashplan

Postby jiml » Wed Jan 02, 2013 10:25 am

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!

Ubuntu 12.04 (64bit)

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Monit constantly trying to restart Crashplan

Postby bigfoot65 » Wed Jan 02, 2013 10:56 am

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.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

jiml
Posts: 28
Joined: Wed Jan 13, 2010 1:13 am

Re: Monit constantly trying to restart Crashplan

Postby jiml » Sat Jan 05, 2013 8:10 am

Crashplan installed back in August

Jim!

Ubuntu 12.04 (64bit)

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Monit constantly trying to restart Crashplan

Postby bigfoot65 » Sat Jan 05, 2013 8:12 am

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.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

Who is online

Users browsing this forum: No registered users and 22 guests