From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/2209 Path: news.gmane.org!not-for-mail From: Charlie Brady Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: Suddenly sv does not start, gives a timeout Date: Wed, 22 May 2013 09:40:16 -0400 (EDT) Message-ID: References: <1369217804.2313.20.camel@lenny.robinbowes.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: ger.gmane.org 1369230020 31160 80.91.229.3 (22 May 2013 13:40:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 22 May 2013 13:40:20 +0000 (UTC) Cc: "" To: Peter Hickman Original-X-From: supervision-return-2443-gcsg-supervision=m.gmane.org@list.skarnet.org Wed May 22 15:40:21 2013 Return-path: Envelope-to: gcsg-supervision@plane.gmane.org Original-Received: from antah.skarnet.org ([212.85.147.14]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Uf9H9-0001dT-L5 for gcsg-supervision@plane.gmane.org; Wed, 22 May 2013 15:40:19 +0200 Original-Received: (qmail 28451 invoked by uid 76); 22 May 2013 12:33:14 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Archive: Original-Received: (qmail 28443 invoked from network); 22 May 2013 12:33:14 -0000 X-X-Sender: charlieb@e-smith.charlieb.ott.istop.com In-Reply-To: Xref: news.gmane.org gmane.comp.sysutils.supervision.general:2209 Archived-At: > Well this is what we have. Firstly we manually started it so lets kill it: > > $ ps ax | grep scorecard > 731 ? S 0:11 runsv scorecard_cricket_scores_importer > 2980 ? Sl 0:34 services/scorecard_cricket_scores_importer.rb > > > 16599 pts/0 S+ 0:00 grep scorecard > $ kill -9 2980 You have a race condition here - process 2980 may have already died. Use "sv d services/scorecard_cricket_scores_importer.rb" to stop the process. You also should not be using -9 unless you have exhausted other options. Use -TERM or -QUIT. Using -9 is a bad habit to have. > $ ps ax | grep scorecard > 731 ? S 0:11 runsv scorecard_cricket_scores_importer > 16671 pts/0 S+ 0:00 grep scorecard > > The process has gone and will not be restarted no matter how long you wait. > So we try and start it with sv: > > $ sv start ./service/scorecard_cricket_scores_importer/ > timeout: down: ./service/scorecard_cricket_scores_importer/: 1s, normally > up, want up > $ ps ax | grep scorecard > 731 ? S 0:11 runsv scorecard_cricket_scores_importer > 16868 pts/0 S+ 0:00 grep scorecard > > Still not started. So we try it manually: > > $ ./service/scorecard_cricket_scores_importer/run & > [1] 16929 Why start it in the background? > $ ps ax | grep scorecard > 731 ? S 0:12 runsv scorecard_cricket_scores_importer > 16929 pts/0 Sl 0:10 services/scorecard_cricket_scores_importer.rb > > > 18896 pts/0 R+ 0:00 grep scorecard > $ > > And it keeps running without any problems for as long as you let it > > There are no errors in the logs and nothing reported in: Then your service is faulty. Failing silently is not satisfactory. Use strace to see what your process is doing, and when and why it is exiting. > runsvdir -P /etc/service log: > .................................................................................................................................................................................................................................................................. > > Is there some other runit log that I should look into? >