1

Here's my nice failure output, with PII snipped out:

command was journalctl -xu my_service

Jun 24 21:47:03 ip-XX-XX-XX-XX systemd[1]: Dependency failed for Runs the server.
░░ Subject: A start job for unit my_service.service has failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit my_service.service has finished with a failure.
░░
░░ The job identifier is 156 and the job result is dependency.

I take this to mean that there was an issue with a dependency. This causes the server to be effectively "dead" on bootup. Now in fact I can restart the service systemctl restart my_service and it boots up fine.

I suspect the issue is that one of the dependencies of the service took too long to run (it's a oneshot service and often takes a few minutes to launch) but this is a problem, because it causes my ASG to enter a doom loop of starting computers and killing them.

So very likely my question could be answered by figuring out how to extend that timeout (adding TimeoutStartSec=300 to the [service] part of my .service didn't seem to do anything), but honestly at this point I'm more interested in figuring out how to debug this problem in general.

I've been googling around about this all day to no avail; I'm seeing lots of posts about a specific popular piece of software that won't boot right, but the answers are all specific to that piece of software and not of general interest (unless you, too, are trying to boot that particular piece of software). I'd be interested in things like

  • How do I figure out what dependency was misbehaving?
  • How do I add some kind of restart attached to this "failure" mode (having Restart=always doesn't do anything, since the service never started in the first place)
  • How do I ensure this causes systemctl to understand that the service is failed? (right now systemctl status says everything is cool, and I have to actually check this service in particular to observe it has just sort of been canceled, even though it is vital to the functioning of the server as a whole)

0

You must log in to answer this question.

Browse other questions tagged .