Bug 732353

Summary: Missing output from init-scripts
Product: [openSUSE] openSUSE 12.1 Reporter: Per Jessen <per>
Component: BasesystemAssignee: Frederic Crozat <fcrozat>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P3 - Medium CC: bwiedemann
Version: Final   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on:    
Bug Blocks: 696902    

Description Per Jessen 2011-11-23 14:45:28 UTC
User-Agent:       Mozilla/5.0 (X11; Linux i686 on x86_64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1

In general, what happens with the output from init-scripts and/or the daemons started?  I know I can get to see the output by running the init-script from /etc/init.d, but what about the output during startup or when you run 'rcxxxxx start'?  For anyone installing third party stuff (e.g. HP PSP) or writing their own, it's not very helpful. 

Example - because of bug#730753, I am using the snmpd from 11.4. It won't start:

temp65:~ # rcsnmpd start
redirecting to systemctl
temp65:~ # systemctl status snmpd.service
snmpd.service - LSB: Net-SNMP snmpd
    Loaded: loaded (/etc/init.d/snmpd)
    Active: active (exited) since Wed, 23 Nov 2011 11:28:17 +0100; 4h 12min ago
    Process: 1886 ExecStart=/etc/init.d/snmpd start (code=exited, status=0/SUCCESS)
    CGroup: name=systemd:/system/snmpd.service


temp65:~ # cd /etc/init.d
temp65:/etc/init.d # ./snmpd start
redirecting to systemctl
Starting snmpd/usr/sbin/snmpd: error while loading shared libraries: libperl.so: cannot open shared object file: No such file or directory
startproc:  exit status of parent of /usr/sbin/snmpd: 127
                                                                      failed


Reproducible: Always

Steps to Reproduce:
On a vanilla 12.1 system, install snmpd 5.6.1 (from 11.4) and try to start it.
Comment 1 Frederic Crozat 2011-11-29 12:56:28 UTC
did you check dmesg or /var/log/messages ?

(the long term plan is to use "Journal" so output from each service will be available from systemctl status ..)
Comment 2 Per Jessen 2011-11-29 13:39:06 UTC
(In reply to comment #1)
> did you check dmesg or /var/log/messages ?
> 

Yes, checked both of those, nothing found. 

I seem to have very little systemd related in dmesg: 

# dmesg | grep systemd
[    2.848253] systemd[1]: systemd 37 running in system mode. (+PAM +LIBWRAP +AUDIT +SELINUX +SYSVINIT +LIBCRYPTSETUP; suse)
[    3.089812] systemd[1]: Set hostname to <temp65.local.net>.
[    4.917212] systemd-readahead-replay[301]: Bumped block_nr parameter of 104:0 to 16384. This is a temporary hack and should be removed one day.
[    8.194402] systemd-fsck[553]: fsck.jfs version 1.1.15, 04-Mar-2011
[    8.197767] systemd-fsck[553]: processing started: 11/26/2011 10:28:16
[    8.197800] systemd-fsck[553]: The current device is:  /dev/cciss/c0d0p3
[    8.200386] systemd-fsck[456]: Block size in bytes:  4096
[    8.200803] systemd-fsck[456]: Filesystem size in blocks:  2248960
[    8.205442] systemd-fsck[456]: **Phase 0 - Replay Journal Log
[    8.206523] systemd-fsck[456]: Filesystem is clean.
Comment 3 Frederic Crozat 2011-11-29 13:52:37 UTC
could you give systemctl show -p StandardOutput snmp.service output ?

and paste /etc/systemd/system.conf too.
Comment 4 Per Jessen 2011-11-30 13:56:44 UTC
systemctl show -p StandardOutput snmp.service :

StandardOutput=tty

/etc/systemd/system.conf :

[Manager]
#LogLevel=info
#LogTarget=syslog-or-kmsg
#LogColor=yes
#LogLocation=no
#DumpCore=yes
#CrashShell=no
#ShowStatus=yes
#SysVConsole=yes
#CrashChVT=1
#CPUAffinity=1 2
#MountAuto=yes
#SwapAuto=yes
#DefaultControllers=cpu
#DefaultStandardOutput=syslog
#DefaultStandardError=inherit
#JoinControllers=cpu,cpuacct
Comment 5 Frederic Crozat 2011-12-02 16:15:57 UTC
ok, got the explanation.

when system is booted with "quiet" option, sysv scripts output is redirected to syslog. When "quiet" isn't present, it is redirected to "tty", except it doesn't work once you are logged (since tty is already used).

You can workaround this issue by setting in /etc/systemd/systemd.conf:
SysVConsole=no

so everything will be logged in syslog.

upstream is wondering about always redirecting to syslog, even when "quiet" isn't set.
Comment 6 Frederic Crozat 2011-12-20 15:56:53 UTC
*** Bug 681127 has been marked as a duplicate of this bug. ***
Comment 7 Frederic Crozat 2013-03-11 17:24:51 UTC
This has been fixed upstream and improved in 12.2 and 12.3