LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 07-20-2010, 12:03 PM   #16
Spuddy
Member
 
Registered: Jul 2010
Posts: 83

Original Poster
Rep: Reputation: 15

Quote:
Originally Posted by rfelsburg View Post
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)
 
Old 07-20-2010, 12:11 PM   #17
rfelsburg
Member
 
Registered: Nov 2008
Posts: 52

Rep: Reputation: 18
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.
 
Old 07-20-2010, 02:54 PM   #18
Spuddy
Member
 
Registered: Jul 2010
Posts: 83

Original Poster
Rep: Reputation: 15
Code:
drwxrwsr-x 5 nagios nagios 4096 2010-07-20 17:38 /usr/local/nagios/var
Thanks!
 
Old 07-20-2010, 04:58 PM   #19
rfelsburg
Member
 
Registered: Nov 2008
Posts: 52

Rep: Reputation: 18
Does that mean you got it working?
 
Old 07-20-2010, 04:59 PM   #20
Spuddy
Member
 
Registered: Jul 2010
Posts: 83

Original Poster
Rep: Reputation: 15
sorry, no it doesn't. Just posted the output and thanked you for your help.
 
Old 07-20-2010, 05:02 PM   #21
rfelsburg
Member
 
Registered: Nov 2008
Posts: 52

Rep: Reputation: 18
Gotcha,

Can you run this:

Code:
ls -la /usr/local/nagios/var/nagios.lock
Also, what distro are you running, fedora, centOS, ubuntu...
 
Old 07-21-2010, 02:49 AM   #22
Spuddy
Member
 
Registered: Jul 2010
Posts: 83

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by rfelsburg View Post
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.
 
Old 07-21-2010, 02:50 AM   #23
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
the system is debian. this was said in the first post

send the output from

Code:
ls -la /usr/local/nagios/var/
 
Old 07-21-2010, 02:54 AM   #24
Spuddy
Member
 
Registered: Jul 2010
Posts: 83

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by centosboy View Post
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.
 
Old 07-21-2010, 03:09 AM   #25
Spuddy
Member
 
Registered: Jul 2010
Posts: 83

Original Poster
Rep: Reputation: 15
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:/#
 
Old 07-21-2010, 04:06 AM   #26
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

Rep: Reputation: 113Reputation: 113
Have you change any user or group before this?
Which user and group you had create at installation time ?
 
Old 07-21-2010, 05:28 AM   #27
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
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
 
Old 07-21-2010, 05:30 AM   #28
Spuddy
Member
 
Registered: Jul 2010
Posts: 83

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by centosboy View Post
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.
 
Old 07-21-2010, 05:40 AM   #29
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by Spuddy View Post
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.
 
Old 07-21-2010, 06:12 AM   #30
angel115
Member
 
Registered: Jul 2005
Location: France / Ireland
Distribution: Debian mainly, and Ubuntu
Posts: 542

Rep: Reputation: 79
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.
 
  


Reply

Tags
debian, error, nagios



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Nagios and Oreon (Nagios web front end) installation and Configuration LXer Syndicated Linux News 1 05-31-2016 07:26 AM
Nagios 3.1.2 + RHEL 5.3 You don't have permission to access /nagios/ on this server psix Linux - Server 13 08-04-2015 02:25 AM
cannot find Nagios web interface (Nagios 3.2.0) and O/S = Fedora 10 gutiojj Linux - Newbie 7 02-04-2010 08:55 AM
Nagios Daemon, PID not found but rc.nagios runs agentc0re Slackware 1 07-03-2007 02:47 PM
LXer: Nagios 2.5 and Oreon 1.3 (Nagios web front end) installation with screenshots LXer Syndicated Linux News 0 08-11-2006 05:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration