Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to
LinuxQuestions.org , a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free.
Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please
contact us . If you need to reset your password,
click here .
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a
virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month.
Click here for more info.
07-20-2010, 12:03 PM
#16
Member
Registered: Jul 2010
Posts: 83
Original Poster
Rep:
Quote:
Originally Posted by
rfelsburg
Check /var/log/messages not /var/log/nagios3/nagios.log
It's a system error, not a nagios error.
My apologies.
Code:
Jul 18 06:25:01 ODB2 kernel: imklog 3.18.6, log source = /proc/kmsg started.
Jul 18 06:25:01 ODB2 rsyslogd: [origin software="rsyslogd" swVersion="3.18.6" x-pid="3125" x-info="http://www.rsyslog.com"] restart
Jul 19 06:25:01 ODB2 kernel: imklog 3.18.6, log source = /proc/kmsg started.
Jul 19 06:25:01 ODB2 rsyslogd: [origin software="rsyslogd" swVersion="3.18.6" x-pid="3125" x-info="http://www.rsyslog.com"] restart
Jul 20 06:25:01 ODB2 kernel: imklog 3.18.6, log source = /proc/kmsg started.
Jul 20 06:25:01 ODB2 rsyslogd: [origin software="rsyslogd" swVersion="3.18.6" x-pid="3125" x-info="http://www.rsyslog.com"] restart
Jul 20 12:29:20 ODB2 nagios3: Nagios 3.2.1 starting... (PID=8326)
Jul 20 12:29:20 ODB2 nagios3: Local time is Tue Jul 20 12:29:20 BST 2010
Jul 20 12:29:20 ODB2 nagios3: LOG VERSION: 2.0
Jul 20 12:29:20 ODB2 nagios3: Finished daemonizing... (New PID=8327)
Jul 20 13:13:59 ODB2 nagios3: Caught SIGTERM, shutting down...
Jul 20 13:13:59 ODB2 nagios3: Successfully shutdown... (PID=8327)
Jul 20 17:37:22 ODB2 nagios: Nagios 3.2.1 starting... (PID=29880)
Jul 20 17:37:22 ODB2 nagios: Local time is Tue Jul 20 17:37:22 BST 2010
Jul 20 17:37:22 ODB2 nagios: LOG VERSION: 2.0
Jul 20 17:37:22 ODB2 nagios: Failed to obtain lock on file /usr/local/nagios/var/nagios.lock: Permission denied
Jul 20 17:37:22 ODB2 nagios: Bailing out due to errors encountered while attempting to daemonize... (PID=29880)
Jul 20 17:37:40 ODB2 nagios: Nagios 3.2.1 starting... (PID=29893)
Jul 20 17:37:40 ODB2 nagios: Local time is Tue Jul 20 17:37:40 BST 2010
Jul 20 17:37:40 ODB2 nagios: LOG VERSION: 2.0
Jul 20 17:37:40 ODB2 nagios: Failed to obtain lock on file /usr/local/nagios/var/nagios.lock: Permission denied
Jul 20 17:37:40 ODB2 nagios: Bailing out due to errors encountered while attempting to daemonize... (PID=29893)
Jul 20 17:38:04 ODB2 nagios: Nagios 3.2.1 starting... (PID=29908)
Jul 20 17:38:04 ODB2 nagios: Local time is Tue Jul 20 17:38:04 BST 2010
Jul 20 17:38:04 ODB2 nagios: LOG VERSION: 2.0
Jul 20 17:38:04 ODB2 nagios: Failed to obtain lock on file /usr/local/nagios/var/nagios.lock: Permission denied
Jul 20 17:38:04 ODB2 nagios: Bailing out due to errors encountered while attempting to daemonize... (PID=29908)
07-20-2010, 12:11 PM
#17
Member
Registered: Nov 2008
Posts: 52
Rep:
lets start with the lock file error and go from there.
Type
Code:
ls -lad /usr/local/nagios/var
and post the output
Last edited by rfelsburg; 07-20-2010 at 12:12 PM .
07-20-2010, 02:54 PM
#18
Member
Registered: Jul 2010
Posts: 83
Original Poster
Rep:
Code:
drwxrwsr-x 5 nagios nagios 4096 2010-07-20 17:38 /usr/local/nagios/var
Thanks!
07-20-2010, 04:58 PM
#19
Member
Registered: Nov 2008
Posts: 52
Rep:
Does that mean you got it working?
07-20-2010, 04:59 PM
#20
Member
Registered: Jul 2010
Posts: 83
Original Poster
Rep:
sorry, no it doesn't. Just posted the output and thanked you for your help.
07-20-2010, 05:02 PM
#21
Member
Registered: Nov 2008
Posts: 52
Rep:
Gotcha,
Can you run this:
Code:
ls -la /usr/local/nagios/var/nagios.lock
Also, what distro are you running, fedora, centOS, ubuntu...
07-21-2010, 02:49 AM
#22
Member
Registered: Jul 2010
Posts: 83
Original Poster
Rep:
Quote:
Originally Posted by
rfelsburg
Gotcha,
Can you run this:
Code:
ls -la /usr/local/nagios/var/nagios.lock
Also, what distro are you running, fedora, centOS, ubuntu...
Code:
-rw-r--r-- 1 root nagios 0 2010-07-20 17:38 /usr/local/nagios/var/nagios.lock
It is Debian Squeeze. Thanks.
07-21-2010, 02:50 AM
#23
Senior Member
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137
Rep:
the system is debian. this was said in the first post
send the output from
Code:
ls -la /usr/local/nagios/var/
07-21-2010, 02:54 AM
#24
Member
Registered: Jul 2010
Posts: 83
Original Poster
Rep:
Quote:
Originally Posted by
centosboy
the system is debian. this was said in the first post
send the output from
Code:
ls -la /usr/local/nagios/var/
Code:
ODB2:/var/log# ls -la /usr/local/nagios/var/
total 40
drwxrwsr-x 5 nagios nagios 4096 2010-07-20 17:38 .
drwxr-sr-x 12 nagios nagios 4096 2010-07-20 14:09 ..
drwxrwsr-x 2 nagios nagios 4096 2010-07-20 12:57 archives
-rw-r--r-- 1 root nagios 0 2010-07-20 17:38 nagios.lock
-rw-r--r-- 1 nagios nagios 984 2010-07-20 17:38 nagios.log
-rw-r--r-- 1 nagios nagios 12943 2010-07-20 17:38 objects.cache
drwxrwsr-x 2 nagios nagios 4096 2010-07-20 12:57 rw
drwxr-sr-x 3 root nagios 4096 2010-07-20 12:57 spool
Thanks for your help guys.
07-21-2010, 03:09 AM
#25
Member
Registered: Jul 2010
Posts: 83
Original Poster
Rep:
Some further information.
Code:
ODB2:/# /etc/init.d/nagios start
Starting nagios:Unknown id: nagiosadmin
chown: invalid user: `nagiosadmin:nagios'
done.
ODB2:/# /etc/init.d/nagios ?
Usage: nagios {start|stop|restart|reload|force-reload|status|checkconfig}
ODB2:/# /etc/init.d/nagios status
nagios is not running
ODB2:/#
07-21-2010, 04:06 AM
#26
Member
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638
Rep:
Have you change any user or group before this?
Which user and group you had create at installation time ?
07-21-2010, 05:28 AM
#27
Senior Member
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137
Rep:
nagios lock file was created with root ownership, but this was yesterday evening...
Code:
-rw-r--r-- 1 root nagios 0 2010-07-20 17:38 nagios.lock
--
Code:
chown nagios /usr/local/nagios/var/nagios.lock
then restart nagios
07-21-2010, 05:30 AM
#28
Member
Registered: Jul 2010
Posts: 83
Original Poster
Rep:
Quote:
Originally Posted by
centosboy
nagios lock file was created with root ownership, but this was yesterday evening...
Code:
-rw-r--r-- 1 root nagios 0 2010-07-20 17:38 nagios.lock
--
Code:
chown nagios /usr/local/nagios/var/nagios.lock
then restart nagios
Code:
ODB2:/# chown nagios /usr/local/nagios/var/nagios.lock
ODB2:/# /etc/init.d/nagios ?
Usage: nagios {start|stop|restart|reload|force-reload|status|checkconfig}
ODB2:/# /etc/init.d/nagios restart
Running configuration check...done.
Stopping nagios: kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
done.
Starting nagios:Unknown id: nagiosadmin
chown: invalid user: `nagiosadmin:nagios'
done.
Bizarre considering I log into Nagios HTTP page using nagiosadmin.
07-21-2010, 05:40 AM
#29
Senior Member
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137
Rep:
Quote:
Originally Posted by
Spuddy
Code:
ODB2:/# chown nagios /usr/local/nagios/var/nagios.lock
ODB2:/# /etc/init.d/nagios ?
Usage: nagios {start|stop|restart|reload|force-reload|status|checkconfig}
ODB2:/# /etc/init.d/nagios restart
Running configuration check...done.
Stopping nagios: kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
done.
Starting nagios:Unknown id: nagiosadmin
chown: invalid user: `nagiosadmin:nagios'
done.
Bizarre considering I log into Nagios HTTP page using nagiosadmin.
no, not bizarre actually.
htaccess (which is controlling web authentication) doesnt user /etc/passwd to authenticate but
the nagiosadmin user appears to exist in the htpasswd file, but not in the /etc/passwd or /etc/group or /etc/shadow files. Maybe you could confirm this..??
It appears you may have missed a step or 2 when going throught the initial build...?
Last edited by centosboy; 07-21-2010 at 05:41 AM .
07-21-2010, 06:12 AM
#30
Member
Registered: Jul 2005
Location: France / Ireland
Distribution: Debian mainly, and Ubuntu
Posts: 542
Rep:
Hi Spuddy,
I would sugest that you check that you've created the nagios user and group
as following the output of your command
ls -la /usr/local/nagios/var/
nagios should run under nagios user and nagios group.
if you did edit your nagios.cfg
Code:
vi /usr/local/nagios/etc/nagios.cfg
and change the nagios_user and nagios_group to nagios
Code:
nagios_user=nagios
nagios_group=nagios
save it and try to restart nagios again.
Last edited by angel115; 07-21-2010 at 06:15 AM .
All times are GMT -5. The time now is 05:30 AM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News