Hello All,
I am gradually getting used to systemd. I can now just about force my
fingers to type "systemctl restart httpd.service" even though my brain
is itching to write "service httpd restart" and I find this cheatsheet
to be very useful:
http://fedoraproject.org/wiki/SysVinit_to_Systemd_Cheatsheet
However, there is one thing I find *incredibly* frustrating and that is
the paucity of information when things go wrong.
When I am tinkering with some app or other and I mess something up (as I
often do), being told that the app has "entered a failed state", but not
*WHY* it failed is very unhelpful. At least with SystemV you would be
told that it's because a file is missing, permission problem, config
error... etc.
Looking into /var/log/messages is no help (it just repeats the same
message) and very often the program's own logs are of no use because the
app has not started logging.
I have looked at man systemctl but can see no "verbose" (or similar)
switch.
I find that the only way I can troubleshoot a failing process is to
start the program directly from its executable, or by manually running
the init.d script. Then I get some useful information as to why the
program failed, and fix it.
Jul 22 00:01:11 mydomain systemd[1]: httpd.service: control process exited, code=exited
status=1
Jul 22 00:01:11 mydomain systemd[1]: Unit httpd.service entered failed state.
The above error was caused by one rule in the thousands of mod-security
rules that I had just updated.
Starting httpd directly from the init script I found this:
Syntax error on line 91 of
/etc/httpd/modsecurity.d/base_rules/modsecurity_crs_20_protocol_violations.conf:
Error creating rule: Unknown variable: REQBODY_ERROR
and I could see exactly what I needed to fix.
Am I missing something? Is there a way to get helpful error messages
with systemd that I don't know about - or are we stuck with "code=exited
status=1"?
Mark