On 29/03/12 01:14, Richard Laager wrote:
> I have this recurring problem where trying to stop services results in
> "Unknown instance". It's as if upstart has lost track of the fact that a
> service is running (and its PID); starting the service again will result
> in two copies running (at least for some services that don't do their
> own duplicate checking).
> 
> It has continued to happen across several releases of Ubuntu, with
> multiple different services (e.g. SSH, upstart jobs for daemons I've
> written myself). With SSH, it's virtually guaranteed to happen every
> time I want to stop it (since I do so infrequently), but I can't
> reproduce this on demand. In other words, I can
> start...stop...start...stop services right in a row to my heart's
> content and it's fine. I'm starting to wonder if the trigger isn't
> something that happens nightly. Alternatively, it might be happening on
> (certain) package upgrades.
> 
> What should I be doing to debug this?
Hi Richard,

With respect to ssh, I think you may be referring to this bug:

  https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/687535

The problem has now been fixed in versions of Ubuntu going back to lucid 
(10.04).

You don't mention any other services by name so it is rather difficult to 
speculate. However, if you
are seeing strange behaviour for jobs you have written, I suspect you have 
mis-specified the
'expect' stanza in combination with specifying 'respawn' (doing so will give 
strange behaviour). I
have put a lot of information into the Upstart Cookbook on this very topic as 
it is so fundamental
to correct service supervision: Upstart cannot guess how to handle a service - 
you need to tell it
explicitly. Here are some pointers:

- 
http://upstart.ubuntu.com/cookbook/#precepts-for-creating-a-job-configuration-file
- http://upstart.ubuntu.com/cookbook/#expect
  (including all 8 sub-sections of this critically important section).

Additionally, see init(5).

Kind regards,

James
--
James Hunt
____________________________________
http://upstart.ubuntu.com/cookbook
http://upstart.ubuntu.com/cookbook/upstart_cookbook.pdf

-- 
upstart-devel mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/upstart-devel

Reply via email to