-
Nagios 401 error
Authorization Required
This server could not verify that you are authorized to access the document r
requested. Either you supplied the wrong credentials (e.g., bad password), or
your browser doesn't understand how to supply the credentials required.
Apache/2.2.3 (Red Hat) Server at localhost Port 80
The above is despite httpd and nagios running.
with
service nagios stop
service httpd restart
service nagios start
all service httpd status and service nagios status show good pids running.
Last few lines of nagios.log:
[1285956117] LOG VERSION: 2.0
[1285956117] Finished daemonizing... (New PID=3617)
[1285956237] SERVICE ALERT: localhost;HTTP;CRITICAL;HARD;4;Connection refused
[1285956498] Caught SIGTERM, shutting down...
[1285956498] Successfully shutdown... (PID=3617)
[1285956508] Nagios 3.2.2 starting... (PID=4947)
[1285956508] Local time is Fri Oct 01 11:08:28 PDT 2010
[1285956508] LOG VERSION: 2.0
[1285956508] Finished daemonizing... (New PID=4948)
[1285956538] SERVICE ALERT: localhost;HTTP;WARNING;HARD;4;HTTP WARNING: HTTP/1.1 403 Forbidden
[1285956575] Caught SIGTERM, shutting down...
[1285956575] Successfully shutdown... (PID=4948)
[1285956591] Nagios 3.2.2 starting... (PID=5104)
[1285956591] Local time is Fri Oct 01 11:09:51 PDT 2010
[1285956591] LOG VERSION: 2.0
[1285956591] Finished daemonizing... (New PID=5105)
[1285956609] Caught SIGTERM, shutting down...
[1285956609] Successfully shutdown... (PID=5105)
[1285956616] Nagios 3.2.2 starting... (PID=5221)
[1285956616] Local time is Fri Oct 01 11:10:16 PDT 2010
[1285956616] LOG VERSION: 2.0
[1285956616] Finished daemonizing... (New PID=5222)
Last few lines of httpd's access_log
127.0.0.1 - - [01/Oct/2010:11:14:57 -0700] "GET /favicon.ico HTTP/1.1" 404 284 "-" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100830 Red Hat/3.6-2.el5 Firefox/3.6.9"
127.0.0.1 - - [01/Oct/2010:11:15:15 -0700] "GET /nagios/index.php HTTP/1.1" 401 476 "-" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100830 Red Hat/3.6-2.el5 Firefox/3.6.9"
127.0.0.1 - - [01/Oct/2010:11:15:15 -0700] "GET /nagios/docs/ HTTP/1.1" 401 476 "-" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100830 Red Hat/3.6-2.el5 Firefox/3.6.9"
127.0.0.1 - - [01/Oct/2010:11:18:49 -0700] "GET / HTTP/1.0" 403 3985 "-" "check_http/v1861 (nagios-plugins 1.4.11)"
127.0.0.1 - - [01/Oct/2010:11:23:49 -0700] "GET / HTTP/1.0" 403 3985 "-" "check_http/v1861 (nagios-plugins 1.4.11)"
127.0.0.1 - - [01/Oct/2010:11:28:49 -0700] "GET / HTTP/1.0" 403 3985 "-" "check_http/v1861 (nagios-plugins 1.4.11)"
Last few lines of error_log:
[Fri Oct 01 11:14:25 2010] [error] [client 127.0.0.1] access to /nagios/index.php failed, reason: verification of user id 'nagiosadmin' not configured
[Fri Oct 01 11:14:45 2010] [error] [client 127.0.0.1] (2)No such file or directory: Could not open password file: /usr/local/nagios/etc/nagios.users
[Fri Oct 01 11:14:45 2010] [error] [client 127.0.0.1] access to /nagios/index.php failed, reason: verification of user id 'nagiosadmin' not configured
[Fri Oct 01 11:14:45 2010] [error] [client 127.0.0.1] (2)No such file or directory: Could not open password file: /usr/local/nagios/etc/nagios.users
[Fri Oct 01 11:14:45 2010] [error] [client 127.0.0.1] access to /nagios/docs/ failed, reason: verification of user id 'nagiosadmin' not configured
[Fri Oct 01 11:14:57 2010] [error] [client 127.0.0.1] File does not exist: /usr/local/favicon.ico
[Fri Oct 01 11:14:57 2010] [error] [client 127.0.0.1] File does not exist: /usr/local/favicon.ico
[Fri Oct 01 11:18:49 2010] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /usr/local/
[Fri Oct 01 11:23:49 2010] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /usr/local/
[Fri Oct 01 11:28:49 2010] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /usr/local/
[root@localhost httpd]#
Stuart
-
Authorization Required
This server could not verify that you are authorized to access the document r
requested. Either you supplied the wrong credentials (e.g., bad password), or
your browser doesn't understand how to supply the credentials required.
Apache/2.2.3 (Red Hat) Server at localhost Port 80
Did you check the Documentation links I provided you in the other Nagios thread?
You need to do
Code:
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
taken from the "Quickstart Installation Guides" section of the nagios-3.pdf link in the prior thread.
Last edited by JRefL5; 10-01-2010 at 05:55 PM.
Reason: add link to document
-
Does not work:
[root@localhost httpd]# htpasswd -cs /usr/local/nagios/etc/htpasswd.users nagiosadmin
New password:
Re-type new password:
Adding password for user nagiosadmin
[root@localhost httpd]#
--- Then tried to visit site and same 401 error:
Authorization Required
This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.
Apache/2.2.3 (Red Hat) Server at localhost Port 80
Despite having prompted me for password for nagiosadmin and typed in
what I gave to htpasswd.
-
Additional info:
[Fri Oct 01 20:49:11 2010] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /usr/local/nagios/
[Fri Oct 01 20:49:48 2010] [notice] caught SIGTERM, shutting down
[Fri Oct 01 20:49:51 2010] [notice] SELinux policy enabled; httpd running as context root:system_r:httpd_t
[Fri Oct 01 20:49:51 2010] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Oct 01 20:49:51 2010] [notice] Digest: generating secret for digest authentication ...
[Fri Oct 01 20:49:51 2010] [notice] Digest: done
[Fri Oct 01 20:49:51 2010] [notice] Apache/2.2.3 (Red Hat) configured -- resuming normal operations
[Fri Oct 01 20:50:22 2010] [error] [client 127.0.0.1] (2)No such file or directory: Could not open password file: /usr/local/nagios/etc/nagios.users
[Fri Oct 01 20:50:22 2010] [error] [client 127.0.0.1] access to /nagios/docs/ failed, reason: verification of user id 'nagiosadmin' not configured
[Fri Oct 01 20:54:11 2010] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /usr/local/nagios/
[root@localhost logs]#
-
Okay, I copied
cp -p /usr/local/nagios/etc/htpasswd.users /usr/local/nagios/etc/nagios.users
and restarted nagios and Apache:
service nagios stop; service httpd restart; service nagios start
tailed access_log ... error_log and nagio.log
and then revisited the url and typed in the htpasswd-set passwd.
http://localhost/nagios/docs/
now shows the docs after login. so that is good.
http://localhost/nagios/index.php
however shows
Not Found
The requested URL /nagios/< was not found on this server.
Apache/2.2.3 (Red Hat) Server at localhost Port 80
in the center and on the left unconfigured stuff like:
Current Status
* /tac.cgi" target="">Tactical Overview
* /statusmap.cgi?host=all" target="">Map
* /status.cgi?hostgroup=all&style=hostdetail" target="">Hosts
* /status.cgi?host=all" target="">Services
* /status.cgi?hostgroup=all&style=overview" target="">Host Groups
o /status.cgi?hostgroup=all&style=summary" target="">Summary
o /status.cgi?hostgroup=all&style=grid" target="">Grid
* /status.cgi?servicegroup=all&style=overview" target="">Service Groups
o /status.cgi?servicegroup=all&style=summary" target="">Summary
Perhaps all I need now is just a super-simple set of .cfg files for
basic stuff like cpu, memory, disk, etc.
Isn't there a straightforward way to set this up????
Without having to become an expert?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|