26

When I run systemctl status, I get State: degraded at the top,

● x230
    State: degraded
     Jobs: 0 queued
   Failed: 1 units
    Since: Wed 2018-05-30 17:09:49 CDT; 3 days ago
  ....

What's going on, and how do I fix it?

40

That means some of your services failed to start. You can see them if you run systemctl; without the status argument.

They should show something like,

loaded failed failed

Or you can just the failed services with systemctl --failed, in my case it shows

  UNIT                        LOAD   ACTIVE SUB    DESCRIPTION                
● postgresql@9.4-main.service loaded failed failed PostgreSQL Cluster 9.4-main

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.
3

You may also try:

sudo systemctl reset-failed

systemd reset failed is clearing failed units. You can manually clear out failed units with the systemctl reset-failed command. This can be done for all units, or a single one. Services which are no longer needed, are better to be stopped and disabled.

  • 5
    Some more explanation of what this command does would be good. What are the consequences? Is there any risk of data loss, etc. – Kusalananda Apr 18 '19 at 19:02
1

To answer the original question more succinctly:

systemctl | grep fail

  • 3
    To make this an actual answer, you should probably explain what this does and what they should be looking at in the output of this command (ideally with examples). – Kusalananda Oct 3 '19 at 17:06
0

To fix it I restarted the services that where failed using something like:

sudo systemctl restart postgresql@9.4-main.service

However it doesn't work with services like systemd-initctl.service. Unpluging and plugin again the raspberry pi works for me, however I recommend try to restart the services manually.

0

To list failed units/services

$ systemctl --failed

UNIT LOAD ACTIVE SUB DESCRIPTION
● ipmievd.service loaded failed failed Ipmievd Daemon
● kdump.service loaded failed failed Crash recovery kernel arming

LOAD = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB = The low-level unit activation state, values depend on unit type.

2 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.