Page 1 of 1

Error while upgrading ./manage_services.sh: line 69

Posted: Mon Dec 29, 2014 3:52 pm
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

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

Posted: Mon Dec 29, 2014 3:52 pm
by tmcdonald
What OS and version are you on? Also, are you running the upgrade as root?

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

Posted: Mon Dec 29, 2014 3:55 pm
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

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

Posted: Mon Dec 29, 2014 4:01 pm
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

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

Posted: Mon Dec 29, 2014 4:05 pm
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.

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

Posted: Mon Dec 29, 2014 4:28 pm
by tecnalb
[root@nagios ~]# which service
/sbin/service


Which script are you referencing that I change?

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

Posted: Mon Dec 29, 2014 4:35 pm
by tmcdonald
Within the upgrade directory with the fullinstall script, it is the ./nagiosxi/basedir/scripts/manage_services.sh file.

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

Posted: Mon Dec 29, 2014 4:49 pm
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!!!

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

Posted: Mon Dec 29, 2014 4:52 pm
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.