What does "failed (Result: resources)" mean in systemd?

5

I have a systemd unit which failed, and I'm not sure what the result type is supposed to mean.

Active: failed (Result: resources) since Thu 2016-11-17 21:06:42 UTC; 32min ago

What does Result: resources mean? I'm familiar with Result: exit-code, but not this one.

2rs2ts

Posted 2016-11-17T22:09:31.003

Reputation: 440

You have run out of resources to start the application – Stevie G – 2017-04-09T18:21:35.203

Answers

3

I agree that it is quite generic error message. Since I am not sure when you get this message I am sending you the necessary information so you can find it yourself but it can be the interpretation of errnos of system calls, ex ENOMEM.

Follow SERVICE_FAILURE_RESOURCES in https://github.com/systemd/systemd/blob/2e6dbc0fcd45c152f15aed77cde4fd07957c150c/src/core/service.c.

Umut

Posted 2016-11-17T22:09:31.003

Reputation: 146

Thanks for this. I looked into the source and it seems that it's a generic failure message, which is definitely not helpful given that I didn't even get any journalctl messages... https://github.com/systemd/systemd/blob/7d78f7cea82dc7b4ced77f86a05124add2509390/src/core/service.h#L83 "a bit of a misnomer, just our catch-all error for errnos we didn't expect"

– 2rs2ts – 2016-11-18T19:54:28.747

Notice that before going in to this state, we always print out something to the syslogs where we should be printing something about the error code. Example, https://github.com/systemd/systemd/blob/2e6dbc0fcd45c152f15aed77cde4fd07957c150c/src/core/service.c#L1941

– Umut – 2016-11-21T06:50:17.183