1

I get very strange failed errors from systemctl status as - Failed to parse usec_t value

example

systemctl status loij12.service

.
.
.
.

Jan 05 16:44:59 master_linux.loij12.com systemd[1]: [/etc/systemd/system/ght_hj.service:17] Failed to parse usec_t value, ignoring: 30s # time to sleep before restarting the service
Jan 05 16:44:59 master_linux.loij12.com systemd[1]: [/etc/systemd/system/ght_hj.service:17] Failed to parse usec_t value, ignoring: 30s # time to sleep before restarting the service

but cant understand this failed about - Failed to parse usec_t value

because I cant also find the value as usec_t in the service itself

any idea how to continue from this stage and what this failed is meaning ?

0

1 Answer 1

2

My guess is that this is a syntax error in ght_hj.service (assuming that the failure of the latter will cause the former to fail too) on line 17 which causes a dependency to fail for loij12.service.

Check out RestartSec=. If it looks like this:

RestartSec=30s # time to sleep before restarting the service

You'll have an error. You can't put comments to the right of the content. Replace it with:

# time to sleep before restarting the service
RestartSec=30s

See systemd.syntax(7) which says

Empty lines and lines starting with "#" or ";" are ignored, which may be used for commenting.

If # is not at the start of the line, then it doesn't mean anything and could be considered part of the data on the line.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .