Created attachment 716959 [details] NSCA configuration Description of problem: Nsca daemon can't be started using systemd; manual start works fine. Version-Release number of selected component (if applicable): nsca-2.9.1-4.fc18.x86_64 How reproducible: systemctl start nsca.service Steps to Reproduce: 1. Make sure that the nsca daemon is not running 2. systemctl start nsca.service 3. Take a look at /var/log/messages. There will be a message like "monitoring systemd[1]: Started Nagios Service Check Acceptor." 4. Neither "netstat -panto | grep 5667" nor "ps waux | grep nsca" will show a result Actual results: Nsca is not running. Expected results: Nsca should be up and running. Additional info: 1. It's possible to start the nsca daemon using the following command: /usr/sbin/nsca -c /etc/nagios/nsca.cfg 2. IMHO the problem is NOT caused by SELinux. Even if SELinux is in permissive modus (setenforce 0; sestatus) nsca won't start. 3. Neither "/var/log/messages" nor "/var/spool/nagios/cmd/nagios.cmd" or /var/log/nagios/nagios.log" shows an error 4. /lib/systemd/system/nsca.service was not changed 5. /etc/sysconfig/nsca doesn't contain any options 6. As expected, the nsca daemon won't start if an old sysinitv script is used
I have tried with this modified nsca.service file and it seems to work: [Unit] Description=Nagios Service Check Acceptor After=syslog.target network.target auditd.service [Service] Type=forking EnvironmentFile=-/etc/sysconfig/nsca ExecStart=/usr/sbin/nsca $OPTIONS -c /etc/nagios/nsca.cfg --daemon ExecReload=/bin/kill -HUP $MAINPID [Install] WantedBy=multi-user.target
I think the issue will be resolved if you force the OPTIONS variable to either --single or --daemon in /etc/sysconfig/nsca (with the original systemd unit file). --single is the default, but it seems nsca won't start with systemd if no option is specified. Thanks for putting me on the right track Sergio, I was really at lost with this bug.
Here's the url from a scratch build : http://koji.fedoraproject.org/koji/taskinfo?taskID=5663931 When you'll confirm it fixes the issue, I'll make a real build and push it to updates-testing.
I can't download the rpm from there. Why not push an update to testing?
The problem is still there in Fedora 19. --single option (the default) for nsca needs Type=Forking in the .service file (well, another bug that systemd doesn't really logs why it kills the nsca daemon with the wrong Type)
(In reply to Szombathelyi György from comment #5) > The problem is still there in Fedora 19. > --single option (the default) for nsca needs Type=Forking in the .service > file > (well, another bug that systemd doesn't really logs why it kills the nsca > daemon with the wrong Type) Thanks, I guess I still have a lot to learn about systemd. I pushed the fix to git master and launched a build for rawhide : http://koji.fedoraproject.org/koji/taskinfo?taskID=6044405 I'll push the fix to earlier branches when confirmed it's ok.
nsca-2.9.1-8.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/nsca-2.9.1-8.fc19
nsca-2.9.1-8.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/nsca-2.9.1-8.fc20
nsca-2.9.1-8.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/nsca-2.9.1-8.fc18
Package nsca-2.9.1-8.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing nsca-2.9.1-8.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-19705/nsca-2.9.1-8.fc20 then log in and leave karma (feedback).
nsca-2.9.1-8.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report.
nsca-2.9.1-8.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.
nsca-2.9.1-8.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.
Seems systemd doesn't accept Forking with capital 'F' anymore, it has to be changed to Type=forking (Type with captial 'T', forking with 'f'). Not commenting...
nsca-2.9.1-9.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/nsca-2.9.1-9.fc19
nsca-2.9.1-9.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/nsca-2.9.1-9.fc20
nsca-2.9.1-9.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.
nsca-2.9.1-9.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.