Error while upgrading ./manage_services.sh: line 69

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
tecnalb
Posts: 133
Joined: Tue May 03, 2011 12:53 pm

Error while upgrading ./manage_services.sh: line 69

Post by tecnalb »

While updating XI to r2.2 from 2.0 I get this:

Warning: Service 'Memory Usage' on host 'xxx.xxx.com' has no default contacts or contactgroups defined!
Checked 982 services.
Checked 81 hosts.
Checked 18 host groups.
Checked 11 service groups.
Checked 14 contacts.
Checked 10 contact groups.
Checked 129 commands.
Checked 22 time periods.
Checked 8 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 81 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 22 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 21
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check
RET: 0

./manage_services.sh: line 69: service: command not found

Happens both via GUI and console
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Error while upgrading ./manage_services.sh: line 69

Post by tmcdonald »

What OS and version are you on? Also, are you running the upgrade as root?
Former Nagios employee
tecnalb
Posts: 133
Joined: Tue May 03, 2011 12:53 pm

Re: Error while upgrading ./manage_services.sh: line 69

Post by tecnalb »

CentOS 5.11 and yes, root...

I sent a request to support also, but thought this may be faster

and my GUI says this now:

2014R2.2 was released on December 26th, 2014.

Visit http://www.nagios.com to obtain the latest update.
Latest Available Version: 2014R2.2
Installed Version: 2014R2.2
Last Update Check: 2014-12-29 15:35:14
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Error while upgrading ./manage_services.sh: line 69

Post by tmcdonald »

Are you able to run the command manually as root?

Code: Select all

service nagios restart
Any security policies in place that might limit the ability to run commands as root?

It's also possible, though not incredibly likely, that the "service" command truly does not exist. Let's check:

Code: Select all

which service
Former Nagios employee
bdgoecke
Posts: 36
Joined: Wed Oct 22, 2014 3:41 pm

Re: Error while upgrading ./manage_services.sh: line 69

Post by bdgoecke »

You should change that line to use /sbin/service rather than just service.

From:

Code: Select all

        service $service $action
to use

Code: Select all

        /sbin/service $service $action
==>brian.
tecnalb
Posts: 133
Joined: Tue May 03, 2011 12:53 pm

Re: Error while upgrading ./manage_services.sh: line 69

Post by tecnalb »

[root@nagios ~]# which service
/sbin/service


Which script are you referencing that I change?
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Error while upgrading ./manage_services.sh: line 69

Post by tmcdonald »

Within the upgrade directory with the fullinstall script, it is the ./nagiosxi/basedir/scripts/manage_services.sh file.
Former Nagios employee
tecnalb
Posts: 133
Joined: Tue May 03, 2011 12:53 pm

Re: Error while upgrading ./manage_services.sh: line 69

Post by tecnalb »

tmcdonald wrote:Within the upgrade directory with the fullinstall script, it is the ./nagiosxi/basedir/scripts/manage_services.sh file.

Worked perfect, sir! Thank you!!!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Error while upgrading ./manage_services.sh: line 69

Post by tmcdonald »

I'll go ahead and close this as resolved. In the future, please open either a ticket or a thread - doing both doubles the work on both your end and ours.
Former Nagios employee
Locked