Can't start nagios if apache is in custom location
-
vinothsethuram
- Posts: 147
- Joined: Thu Nov 07, 2013 11:44 am
Can't start nagios if apache is in custom location
I couldn't start nagios due to apache's custom location.
service nagios start
/etc/init.d/nagios: 20: .: Can't open /etc/rc.d/init.d/functions
Can you please help to start nagios?
service nagios start
/etc/init.d/nagios: 20: .: Can't open /etc/rc.d/init.d/functions
Can you please help to start nagios?
Re: Can't start nagios if apache is in custom location
The error you are receiving is due to missing LSB init functions, not a custom apache location. What distribution are you running?vinothsethuram wrote:I couldn't start nagios due to apache's custom location.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
vinothsethuram
- Posts: 147
- Joined: Thu Nov 07, 2013 11:44 am
Re: Can't start nagios if apache is in custom location
Ubuntu 13.10abrist wrote:The error you are receiving is due to missing LSB init functions, not a custom apache location. What distribution are you running?vinothsethuram wrote:I couldn't start nagios due to apache's custom location.
Re: Can't start nagios if apache is in custom location
I presume you are running core 4. There have been issues with debian systems and the init scripts. See the following thread:
http://support.nagios.com/forum/viewtop ... nit#p76464
http://support.nagios.com/forum/viewtop ... nit#p76464
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
vinothsethuram
- Posts: 147
- Joined: Thu Nov 07, 2013 11:44 am
Re: Can't start nagios if apache is in custom location
I executed below command
apt-get install daemon.
But confused with hack script. Which File I need to edit and where is the contents be copied or replaced?
apt-get install daemon.
But confused with hack script. Which File I need to edit and where is the contents be copied or replaced?
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Can't start nagios if apache is in custom location
You need to follow the other post in that thread which links back to the altered nagios init script.
http://support.nagios.com/forum/viewtop ... =20#p64091
It is a drop in replacement for the nagios init script.
http://support.nagios.com/forum/viewtop ... =20#p64091
It is a drop in replacement for the nagios init script.
-
vinothsethuram
- Posts: 147
- Joined: Thu Nov 07, 2013 11:44 am
Re: Can't start nagios if apache is in custom location
After replacing the script, I am getting error
sudo service nagios restart
$Stopping nagios:
$Starting nagios:
But nagios dashboard is not working .. http://ipaddress/nagios/ is giving following error
Not Found
The requested URL /nagios/ was not found on this server.
sudo service nagios restart
$Stopping nagios:
$Starting nagios:
But nagios dashboard is not working .. http://ipaddress/nagios/ is giving following error
Not Found
The requested URL /nagios/ was not found on this server.
Re: Can't start nagios if apache is in custom location
Restart httpd:
Or:
Do you have a vhost file for nagios?
Or:
Code: Select all
service httpd restartCode: Select all
service apache2 restartCode: Select all
ls -la /etc/httpd/conf.dCode: Select all
ls -la /etc/apache2/sites-available/Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
vinothsethuram
- Posts: 147
- Joined: Thu Nov 07, 2013 11:44 am
Re: Can't start nagios if apache is in custom location
abrist wrote:Restart httpd:Or:Code: Select all
service httpd restartDo you have a vhost file for nagios?Code: Select all
service apache2 restartOr:Code: Select all
ls -la /etc/httpd/conf.dCode: Select all
ls -la /etc/apache2/sites-available/
service apache2 command executed fine. But still getting page not found error.
log for ls -la /etc/httpd/conf.d
total 12
drwxr-xr-x 3 root root 4096 Nov 19 16:30 .
drwxr-xr-x 3 root root 4096 Nov 19 16:30 ..
drwxr-xr-x 2 root root 4096 Nov 25 05:27 nagios.conf
log for ls -la /etc/apache2/sites-available/
total 20
drwxr-xr-x 2 root root 4096 Nov 21 03:53 .
drwxr-xr-x 8 root root 4096 Nov 21 03:53 ..
-rw-r--r-- 1 root root 1327 Jul 24 06:45 000-default.conf
-rw-r--r-- 1 root root 6432 Jul 20 16:44 default-ssl.conf
Re: Can't start nagios if apache is in custom location
Lets copy the nagios vhost fole to sites-available:
And then restart apache:
Code: Select all
cp /etc/httpd/conf.d/nagios.conf /etc/apache2/sites-available/Code: Select all
service apache2 restartFormer Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.