service nagios restart not restarting nagios

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Re: service nagios restart not restarting nagios

Postby t3dus » Wed Feb 07, 2018 1:42 pm

kyang wrote:Are they using different network devices?


Separate networks, separate systems.

kyang wrote:Will you stop using this Nagios server? Or did you want to continue troubleshooting this?

Let us know how you would like to continue. Thanks!


I may stop using that system because I simply don't understand why it thinks everything is down/up when it isn't...

But I have an issue where nagios isn't starting on startup on my VPS server. No idea why that isn't working right.

I ran this command below to create a symbolic link to fix the startup issue but it already exists.

Code: Select all
# ln -s /etc/init.d/nagios /etc/rc
ln: failed to create symbolic link '/etc/rc': File exists


Nagios still doens't start up on boot.

If I edit /etc/rc I see this in the file.

Code: Select all
DESC="Nagios"
NAME=nagios
DAEMON=/usr/local/nagios/bin/$NAME
DAEMON_ARGS="-d /usr/local/nagios/etc/nagios.cfg"
PIDFILE=/usr/local/nagios/var/$NAME.lock
User avatar
t3dus
 
Posts: 109
Joined: Thu Feb 04, 2016 3:46 pm
Location: IA

Re: service nagios restart not restarting nagios

Postby kyang » Wed Feb 07, 2018 2:24 pm

Could you run this command and post the output?

Code: Select all
dpkg --list | grep upstart
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
kyang
Support Tech
 
Posts: 1788
Joined: Tue Jul 25, 2017 3:35 pm

Re: service nagios restart not restarting nagios

Postby t3dus » Wed Feb 07, 2018 2:27 pm

kyang wrote:Could you run this command and post the output?

Code: Select all
dpkg --list | grep upstart


did nothing but bring me back to a command prompt.
User avatar
t3dus
 
Posts: 109
Joined: Thu Feb 04, 2016 3:46 pm
Location: IA

Re: service nagios restart not restarting nagios

Postby kyang » Wed Feb 07, 2018 4:26 pm

On your VPS server what's the output of this?

Code: Select all
sudo update-rc.d nagios default
sudo update-rc.d nagios enable


Any errors?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
kyang
Support Tech
 
Posts: 1788
Joined: Tue Jul 25, 2017 3:35 pm

Re: service nagios restart not restarting nagios

Postby t3dus » Wed Feb 07, 2018 4:42 pm

Code: Select all
# sudo update-rc.d nagios default
usage: update-rc.d [-n] [-f] <basename> remove
       update-rc.d [-n] <basename> disable|enable [S|2|3|4|5]
                -n: not really
                -f: force

The disable|enable API is not stable and might change in the future.


Code: Select all
# sudo update-rc.d nagios enable
update-rc.d: error: no runlevel symlinks to modify, aborting!
User avatar
t3dus
 
Posts: 109
Joined: Thu Feb 04, 2016 3:46 pm
Location: IA

Re: service nagios restart not restarting nagios

Postby kyang » Wed Feb 07, 2018 5:00 pm

Could you run an strace for us and give us the output?

You may have to install strace first.

Code: Select all
apt-get install strace

Then run this.
Code: Select all
strace service nagios restart &> /tmp/strace.txt


You will have to use something like Filezilla to get the file to us.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
kyang
Support Tech
 
Posts: 1788
Joined: Tue Jul 25, 2017 3:35 pm

Re: service nagios restart not restarting nagios

Postby t3dus » Thu Feb 08, 2018 10:53 am

Here you go.
Attachments
strace.txt
(26.97 KiB) Downloaded 55 times
User avatar
t3dus
 
Posts: 109
Joined: Thu Feb 04, 2016 3:46 pm
Location: IA

Re: service nagios restart not restarting nagios

Postby kyang » Thu Feb 08, 2018 1:11 pm

It didn't actually go through.

Could you run the command as root or sudo.

Code: Select all
strace sudo service nagios restart &> /tmp/strace.txt
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
kyang
Support Tech
 
Posts: 1788
Joined: Tue Jul 25, 2017 3:35 pm

Previous

Return to Nagios Core

Who is online

Users browsing this forum: No registered users and 25 guests