Page 1 of 1

401 Unauthorized Errors in Logwatch for HTTPD

Posted: Fri Sep 15, 2017 10:13 am
by epaulsen5
I've recently had to upgrade to a new Nagios server. Everything seems to be working fine, however, in my nightly logwatch report, I'm seeing the following:

Requests with error response codes
400 Bad Request
/: 1 Time(s)
401 Unauthorized
/nagios/cgi-bin/status.cgi?hostgroup=all&style=overview: 178 Time(s)
/nagios/images/detail.gif: 177 Time(s)
/nagios/images/logos/mac40.png: 177 Time(s)
/nagios/images/logos/ubuntu.png: 177 Time(s)
/nagios/js/jquery-1.7.1.min.js: 177 Time(s)
/nagios/images/logos/hp-printer40.png: 176 Time(s)
/nagios/images/logos/redhat.png: 176 Time(s)
/nagios/images/status3.gif: 176 Time(s)
/nagios/js/nag_funcs.js: 176 Time(s)
/nagios/images/status2.gif: 175 Time(s)
/nagios/images/logos/hub.gif: 172 Time(s)
/nagios/stylesheets/common.css: 172 Time(s)
/nagios/stylesheets/status.css: 169 Time(s)
/nagios/stylesheets/nag_funcs.css: 148 Time(s)
/nagios/images/logos/router40.png: 140 Time(s)
/nagios/images/logos/internet.gif: 125 Time(s)
/nagios/images/logos/wifi.gif: 88 Time(s)
/nagios/images/logos/windows_server.png: 67 Time(s)
/nagios/: 1 Time(s)
/nagios/cgi-bin/tac.cgi: 1 Time(s)
/nagios/images/tacenabled.png: 1 Time(s)
/nagios/images/thermok.png: 1 Time(s)
/nagios/stylesheets/tac.css: 1 Time(s)

Nothing seems out of the ordinary and permissions look OK and I don't receive any errors in the browser when using the site. Suggestions?
---
Eric

Re: 401 Unauthorized Errors in Logwatch for HTTPD

Posted: Fri Sep 15, 2017 12:19 pm
by cdienger
The 401 means the request needed to be authenticated. This can be normal in that initially requests may not provide authentication information, they get the 401 response and then make the request again with authentication information. Can you see where the requests are coming from and verify that that client isn't having a problem accessing the interface?

Re: 401 Unauthorized Errors in Logwatch for HTTPD

Posted: Fri Sep 15, 2017 2:22 pm
by epaulsen5
They are coming from my client:

10.1.60.71 - - [15/Sep/2017:10:13:56 -0500] "GET /nagios/images/status3.gif HTTP/1.1" 401 925 "https://nagios.smls.org/nagios/cgi-bin/ ... e=overview" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/603.3.8 (KHTML, like Gecko) Version/10.1.2 Safari/603.3.8"

I can say that nothing in the client seems to malfunction. I can log in without issue and the pages all render properly. There are no broken links missing images, but it seems the images are causing most of the errors.
---
Eric

Re: 401 Unauthorized Errors in Logwatch for HTTPD

Posted: Fri Sep 15, 2017 3:17 pm
by cdienger
That sounds consistent with my initial post. If you look at the logs immediately after the 401, you may see the same requests made but logging with a "200" status code instead and that would indicate that things are working as expected.