Living with Systemd

Mark Eggers mdeggers at gmail.com
Fri Jul 22 15:46:31 UTC 2011


On Fri, 22 Jul 2011 11:00:02 +0100, Arthur Dent wrote:

> 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.

This really doesn't address the lack of information that's available when 
a service fails to start using systemd. I agree that more information 
would be great.

However, for Apache HTTPD, you have another tool to see what's wrong with 
your configuration.

>From the command line, run:

/usr/sbin/apachectl configtest

This will return "Syntax OK" if the configuration file is OK. If there is 
a problem, there should be detailed information.

/usr/sbin/apachectl -t

also works.

. . . . just my two cents.

/mde/



More information about the users mailing list