Debian12: systemctl status shows : “State: degraded”
When I run systemctl status, I get State: degraded at the top,
|
1 2 3 4 5 6 |
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?
Or you can just list the failed services with systemctl –failed, in my case it shows
|
1 2 3 4 5 6 |
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. |
Normally, you’ll need to read the journal/log to figure out what to do next about that failing item, by using journalctl -xe. If you just want to reset the units so the system “says” running with a green dot, you can run:
|
1 |
systemctl reset-failed |
To answer the original question more succinctly:
|
1 |
systemctl | grep fail |
To find the reason of failure:
|
1 |
systemctl status <service> |
(replace by the name of the failed service). You will find lots of info about the service, also the reason of failure.