Bug 731342

Summary: systemd should not suppress error messages of failing services
Product: [openSUSE] openSUSE 12.1 Reporter: Reinhard Max <max>
Component: BasesystemAssignee: Frederic Crozat <fcrozat>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: radmanic
Version: Final   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Development Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Reinhard Max 2011-11-18 13:02:53 UTC
When systemd cannot start a service, it prints out its own error messages about the fact, but by default completely suppresses the error output of the failed service.

As bug #730326 has shown, this suppression of valuable debugging information can lead to needless bug reports and wrong conclusions, especially for users that are new to systemd, which are probably many these days.

Therefore when startup of a service fails, systemd should pass on the output to the user by default, or at least log it somewhere and mention the location in the output it already produces.
Comment 1 Frederic Crozat 2011-11-18 13:33:40 UTC
all output from services is supposed to be redirected to syslog.
Comment 2 Reinhard Max 2011-11-18 14:59:01 UTC
When I misconfigure PostgreSQL, so that "rcpostgresql start" fails, all I get in syslog is:

 su: pam_systemd(su-l:session): Failed to create session: Invalid argument
 su: (to postgres) root on /dev/console

but "rcpostgresql start x" additionally prints the following messages to the terminal:

FATAL:  could not create shared memory segment: Invalid argument
DETAIL:  Failed system call was shmget(key=5432001, size=41279488, 03600).
HINT:  This error usually means that PostgreSQL's request for a shared memory segment exceeded your kernel's SHMMAX parameter.  You can either reduce the request size or reconfigure the kernel with larger SHMMAX.  To reduce the request size (currently 41279488 bytes), reduce PostgreSQL's shared memory usage, perhaps by reducing shared_buffers or max_connections.
        If the request size is already small, it's possible that it is less than your kernel's SHMMIN parameter, in which case raising the request size or reconfiguring SHMMIN is called for.
        The PostgreSQL documentation contains more information about shared memory configuration.
pg_ctl: could not start server
Examine the log output.
Comment 3 Frederic Crozat 2011-12-20 16:15:58 UTC
until "journal" is a full part of systemd (which will be used to display logs according to service), systemd is redirecting logs to /var/log/messages, unless quiet is not specified on kernel command line. You can force the redirection to syslog by adding systemd.sysv_console=0 (upstream plans to make this change by default).
Comment 4 Frederic Crozat 2012-02-01 13:00:32 UTC
I've added a patch from git to home:fcrozat:systemd / systemd which ensure the ouput from sysv services will be logged to /var/log/messages in addition to being displayed to console.
Comment 5 Bernhard Wiedemann 2012-02-20 13:00:25 UTC
This is an autogenerated message for OBS integration:
This bug (731342) was mentioned in
https://build.opensuse.org/request/show/106032 12.1 / systemd
Comment 6 Frederic Crozat 2012-03-14 16:46:35 UTC
closing as fixed for 12.1