internal error on solaris10 - nagios-3.5.1

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
jacastronuens
Posts: 4
Joined: Fri Dec 06, 2013 5:31 am

internal error on solaris10 - nagios-3.5.1

Post by jacastronuens »

hello,

I have installed nagios on a solaris 10 box.

Everything went fine, but when i access a cgi, example tac.cgi i get internal error, although i can execute the cgi manually a get correct output.

apache config:

Code: Select all

<VirtualHost *:8084>
        CustomLog "/var/SP/log/nagios/access_log_3.5.1" combined
        ErrorLog "/var/SP/log/nagios/error_log_3.5.1"
       ScriptAlias /nagios/cgi-bin /opt/SP/apps/nagios/nagios-3.5.1/sbin

        <Directory "/opt/SP/apps/nagios/nagios-3.5.1/sbin">
                Options ExecCGI
                AllowOverride None
                Order allow,deny
                Allow from all
                AuthName "Nagios Access"
                AuthType Basic
                AuthUserFile /opt/SP/apps/apache/current/conf/htpasswd.users
                Require valid-user
        </Directory>

        Alias /nagios /opt/SP/apps/nagios/nagios-3.5.1/share

        <Directory "/opt/SP/apps/nagios/nagios-3.5.1/share">
                Options None
                AllowOverride None
                Order allow,deny
                Allow from all
                AuthName "Nagios Access"
                AuthType Basic
                AuthUserFile /opt/SP/apps/apache/current/conf/htpasswd.users
                Require valid-user
        </Directory>
</VirtualHost>
manual curl output of tac.cgi

Code: Select all

<HTML>
<HEAD>
<link rel="shortcut icon" href="/nagios/images/favicon.ico" type="image/ico">
<TITLE>
Nagios Tactical Monitoring Overview
</TITLE>
<LINK REL='stylesheet' TYPE='text/css' HREF='/nagios/stylesheets/common.css'>
<LINK REL='stylesheet' TYPE='text/css' HREF='/nagios/stylesheets/tac.css'>
</HEAD>
<BODY CLASS='tac' marginwidth=2 marginheight=2 topmargin=0 leftmargin=0 rightmargin=0>

<!-- Produced by Nagios (http://www.nagios.org).  Copyright (c) 1999-2007 Ethan Galstad. -->
<p align=left>
<table border=0 align=left width=100% cellspacing=4 cellpadding=0>
<tr>
<td align=left valign=top width=50%>
<TABLE CLASS='infoBox' BORDER=1 CELLSPACING=0 CELLPADDING=0>
<TR><TD CLASS='infoBox'>
<DIV CLASS='infoBoxTitle'>Tactical Monitoring Overview</DIV>
Last Updated: Fri Dec 6 11:37:05 CET 2013<BR>
Updated every 90 seconds<br>
Nagios® Core™ 3.5.1 - <A HREF='http://www.nagios.org' TARGET='_new' CLASS='homepageURL'>www.nagios.org</A><BR>
Logged in as <i>njose</i><BR>
</TD></TR>
</TABLE>
</td>
<td align=right valign=bottom width=50%>
<table border=0 cellspacing=0 cellspadding=0>
<tr>
<td valign=bottom align=right>
</td>
<td>
<table border=0 cellspacing=4 cellspadding=0>
<tr>
<td class='perfTitle'> <a href='extinfo.cgi?type=4' class='perfTitle'>Monitoring Performance</a></td>
</tr>
<tr>
<td>
<table border=0 cellspacing=0 cellspadding=0>
<tr>
<td class='perfBox'>
<table border=0 cellspacing=4 cellspadding=0>
<tr>
<td align=left valign=center class='perfItem'><a href='extinfo.cgi?type=4' class='perfItem'>Service Check Execution Time:</a></td><td valign=top class='perfValue' nowrap><a href='extinfo.cgi?type=4' class='perfValue'>0.01 / 0.04 / 0.016 sec</a></td>
</tr>
<tr>
<td align=left valign=center class='perfItem'><a href='extinfo.cgi?type=4' class='perfItem'>Service Check Latency:</a></td><td valign=top class='perfValue' nowrap><a href='extinfo.cgi?type=4' class='perfValue'>0.02 / 0.25 / 0.139 sec</a></td>
</tr>
<tr>
<td align=left valign=center class='perfItem'><a href='extinfo.cgi?type=4' class='perfItem'>Host Check Execution Time:</a></td><td valign=top class='perfValue' nowrap><a href='extinfo.cgi?type=4' class='perfValue'>0.01 / 0.01 / 0.012 sec</a></td>
</tr>
<tr>
<td align=left valign=center class='perfItem'><a href='extinfo.cgi?type=4' class='perfItem'>Host Check Latency:</a></td><td valign=top class='perfValue' nowrap><a href='extinfo.cgi?type=4' class='perfValue'>0.00 / 0.00 / 0.000 sec</a></td>
</tr>
<tr>
<td align=left valign=center class='perfItem'><a href='status.cgi?host=all&serviceprops=131072' class='perfItem'># Active Host / Service Checks:</a></td><td valign=top class='perfValue' nowrap><a href='status.cgi?hostgroup=all&hostprops=131072&style=hostdetail' class='perfValue'>1</a> / <a href='status.cgi?host=all&serviceprops=131072' class='perfValue'>8</a></td>
</tr>
<tr>
<td align=left valign=center class='perfItem'><a href='status.cgi?host=all&serviceprops=65536' class='perfItem'># Passive Host / Service Checks:</a></td><td valign=top class='perfValue' nowrap><a href='status.cgi?hostgroup=all&hostprops=65536&style=hostdetail' class='perfValue'>0</a> / <a href='status.cgi?host=all&serviceprops=65536' class='perfValue'>0</a></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</p>
<br clear=all>
<br>
<table border=0 cellspacing=0 cellpadding=0 width=100%>
<tr>
<td valign=top align=left width=50%>
<p>
<table class='tac' width=125 cellspacing=4 cellpadding=0 border=0>
<tr><td colspan=1 height=20 class='outageTitle'> Network Outages</td></tr>
<tr>
<td class='outageHeader' width=125><a href='outages.cgi' class='outageHeader'>0 Outages</a></td>
</tr>
<tr>
<td valign=top>
<table border=0 width=125 cellspacing=0 cellpadding=0>
<tr>
<td valign=bottom width=25>   </td>
<Td width=10> </td>
<Td valign=top width=100%>
<table border=0 width=100%>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</p>
</td>
<td valign=top align=right width=50%>
<table border=0 cellspacing=0 cellspadding=0>
<tr>
<td>
<table border=0 cellspacing=4 cellspadding=0>
<tr>
<td class='healthTitle'> Network Health</td>
</tr>
<tr>
<td>
<table border=0 cellspacing=0 cellspadding=0>
<tr>
<td class='healthBox'>
<table border=0 cellspacing=4 cellspadding=0>
<tr>
<td align=left valign=center class='healthItem'>Host Health:</td><td valign=top width=100 class='healthBar'><img src='/nagios/images/thermcrit.png' border=0 width=5 height=20 alt='0.0% Health' title='0.0% Health'></td>
</tr>
<tr>
<td align=left valign=center class='healthItem'>Service Health:</td><td valign=top width=100 class='healthBar'><img src='/nagios/images/thermcrit.png' border=0 width=68 height=20 alt='68.8% Health' title='68.8% Health'></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p>
<table class='tac' width=516 cellspacing=4 cellpadding=0 border=0>
<tr><td colspan=4 height=20 class='hostTitle'> Hosts</td></tr>
<tr>
<td class='hostHeader' width=125><a href='status.cgi?hostgroup=all&style=hostdetail&hoststatustypes=4' class='hostHeader'>1 Down</a></td>
<td class='hostHeader' width=125><a href='status.cgi?hostgroup=all&style=hostdetail&hoststatustypes=8' class='hostHeader'>0 Unreachable</a></td>
<td class='hostHeader' width=125><a href='status.cgi?hostgroup=all&style=hostdetail&hoststatustypes=2' class='hostHeader'>0 Up</a></td>
<td class='hostHeader' width=125><a href='status.cgi?hostgroup=all&style=hostdetail&hoststatustypes=1' class='hostHeader'>0 Pending</a></td>
</tr>
<tr>
<td valign=top>
<table border=0 width=125 cellspacing=0 cellpadding=0>
<tr>
<td valign=bottom width=25>   </td>
<Td width=10> </td>
<Td valign=top width=100%>
<table border=0 width=100%>
<tr><td width=100% class='hostImportantProblem'><a href='status.cgi?hostgroup=all&style=hostdetail&hoststatustypes=4&hostprops=42'>1 Unhandled Problems</a></td></tr>
</table>
</td>
</tr>
</table>
</td>
<td valign=top>
<table border=0 width=125 cellspacing=0 cellpadding=0>
<tr>
<td valign=bottom width=25> </td>
<Td width=10> </td>
<Td valign=top width=100%>
<table border=0 width=100%>
</table>
</td>
</tr>
</table>
</td>
<td valign=top>
<table border=0 width=125 cellspacing=0 cellpadding=0>
<tr>
<td valign=bottom width=25> </td>
<Td width=10> </td>
<Td valign=top width=100%>
<table border=0 width=100%>
</table>
</td>
</tr>
</table>
</td>
<td valign=top>
<table border=0 width=125 cellspacing=0 cellpadding=0>
<tr>
<td valign=bottom width=25> </td>
<Td width=10> </td>
<Td valign=top width=100%>
<table border=0 width=100%>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</p>
<p>
<table class='tac' width=641 cellspacing=4 cellpadding=0 border=0>
<tr><td colspan=5 height=20 class='serviceTitle'> Services</td></tr>
<tr>
<td class='serviceHeader' width=125><a href='status.cgi?host=all&style=detail&servicestatustypes=16' class='serviceHeader'>1 Critical</a></td>
<td class='serviceHeader' width=125><a href='status.cgi?host=all&style=detail&servicestatustypes=4' class='serviceHeader'>1 Warning</a></td>
<td class='serviceHeader' width=125><a href='status.cgi?host=all&style=detail&servicestatustypes=8' class='serviceHeader'>2 Unknown</a></td>
<td class='serviceHeader' width=125><a href='status.cgi?host=all&style=detail&servicestatustypes=2' class='serviceHeader'>4 Ok</a></td>
<td class='serviceHeader' width=125><a href='status.cgi?host=all&style=detail&servicestatustypes=1' class='serviceHeader'>0 Pending</a></td>
</tr>
<tr>
<td valign=top>
<table border=0 width=125 cellspacing=0 cellpadding=0>
<tr>
<td valign=bottom width=25>   </td>
<Td width=10> </td>
<Td valign=top width=100%>
<table border=0 width=100%>
<tr><td width=100% class='serviceUnimportantProblem'><a href='status.cgi?host=all&type=detail&servicestatustypes=16&hoststatustypes=12'>1 on Problem Hosts</a></td></tr>
</table>
</td>
</tr>
</table>
</td>
<td valign=top>
<table border=0 width=125 cellspacing=0 cellpadding=0>
<tr>
<td valign=bottom width=25> </td>
<Td width=10> </td>
<Td valign=top width=100%>
<table border=0 width=100%>
<tr><td width=100% class='serviceUnimportantProblem'><a href='status.cgi?host=all&type=detail&servicestatustypes=4&hoststatustypes=12'>1 on Problem Hosts</a></td></tr>
</table>
</td>
</tr>
</table>
</td>
<td valign=top>
<table border=0 width=125 cellspacing=0 cellpadding=0>
<tr>
<td valign=bottom width=25> </td>
<Td width=10> </td>
<Td valign=top width=100%>
<table border=0 width=100%>
<tr><td width=100% class='serviceUnimportantProblem'><a href='status.cgi?host=all&type=detail&servicestatustypes=8&hoststatustypes=12'>2 on Problem Hosts</a></td></tr>
</table>
</td>
</tr>
</table>
</td>
<td valign=top>
<table border=0 width=125 cellspacing=0 cellpadding=0>
<tr>
<td valign=bottom width=25> </td>
<Td width=10> </td>
<Td valign=top width=100%>
<table border=0 width=100%>
</table>
</td>
</tr>
</table>
</td>
<td valign=top>
<table border=0 width=125 cellspacing=0 cellpadding=0>
<tr>
<td valign=bottom width=25> </td>
<Td width=10> </td>
<td valign=top width=100%>
<table border=0 width=100%>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</p>
<p>
<table class='tac' cellspacing=4 cellpadding=0 border=0>
<tr><td colspan=5 height=20 class='featureTitle'> Monitoring Features</td></tr>
<tr>
<td class='featureHeader' width=135>Flap Detection</td>
<td class='featureHeader' width=135>Notifications</td>
<td class='featureHeader' width=135>Event Handlers</td>
<td class='featureHeader' width=135>Active Checks</td>
<td class='featureHeader' width=135>Passive Checks</td>
</tr>
<tr>
<td valign=top>
<table border=0 width=135 cellspacing=0 cellpadding=0>
<tr>
<td valign=top><a href='cmd.cgi?cmd_typ=62'><img src='/nagios/images/tacenabled.png' border=0 alt='Flap Detection Enabled' title='Flap Detection Enabled'></a></td>
<Td width=10> </td>
<Td valign=top width=100% class='featureEnabledFlapDetection'>
<table border=0 width=100%>
<tr><td width=100% class='featureItemEnabledServiceFlapDetection'>All Services Enabled</td></tr>
<tr><td width=100% class='featureItemServicesNotFlapping'>No Services Flapping</td></tr>
<tr><td width=100% class='featureItemEnabledHostFlapDetection'>All Hosts Enabled</td></tr>
<tr><td width=100% class='featureItemHostsNotFlapping'>No Hosts Flapping</td></tr>
</table>
</td>
</tr>
</table>
</td>
<td valign=top>
<table border=0 width=135 cellspacing=0 cellpadding=0>
<tr>
<td valign=top><a href='cmd.cgi?cmd_typ=11'><img src='/nagios/images/tacenabled.png' border=0 alt='Notifications Enabled' title='Notifications Enabled'></a></td>
<Td width=10> </td>
<Td valign=top width=100% class='featureEnabledNotifications'>
<table border=0 width=100%>
<tr><td width=100% class='featureItemDisabledServiceNotifications'><a href='status.cgi?host=all&type=detail&serviceprops=4096'>2 Services Disabled</a></td></tr>
<tr><td width=100% class='featureItemEnabledHostNotifications'>All Hosts Enabled</td></tr>
</table>
</td>
</tr>
</table>
</td>
<td valign=top>
<table border=0 width=135 cellspacing=0 cellpadding=0>
<tr>
<td valign=top><a href='cmd.cgi?cmd_typ=42'><img src='/nagios/images/tacenabled.png' border=0 alt='Event Handlers Enabled' title='Event Handlers Enabled'></a></td>
<Td width=10> </td>
<Td valign=top width=100% class='featureEnabledHandlers'>
<table border=0 width=100%>
<tr><td width=100% class='featureItemEnabledServiceHandlers'>All Services Enabled</td></tr>
<tr><td width=100% class='featureItemEnabledHostHandlers'>All Hosts Enabled</td></tr>
</table>
</td>
</tr>
</table>
</td>
<td valign=top>
<table border=0 width=135 cellspacing=0 cellpadding=0>
<tr>
<td valign=top><a href='extinfo.cgi?type=0'><img src='/nagios/images/tacenabled.png' border='0' alt='Active Checks Enabled' title='Active Checks Enabled'></a></td>
<Td width=10> </td>
<Td valign=top width=100% class='featureEnabledActiveChecks'>
<table border=0 width=100%>
<tr><td width=100% class='featureItemEnabledActiveServiceChecks'>All Services Enabled</td></tr>
<tr><td width=100% class='featureItemEnabledActiveHostChecks'>All Hosts Enabled</td></tr>
</table>
</td>
</tr>
</table>
</td>
<td valign=top>
<table border=0 width=135 cellspacing=0 cellpadding=0>
<tr>
<td valign=top><a href='extinfo.cgi?type=0'><img src='/nagios/images/tacenabled.png' border='0' alt='Passive Checks Enabled' title='Passive Checks Enabled'></a></td>
<Td width=10> </td>
<Td valign=top width=100% class='featureEnabledPassiveChecks'>
<table border=0 width=100%>
<tr><td width=100% class='featureItemEnabledPassiveServiceChecks'>All Services Enabled</td></tr>
<tr><td width=100% class='featureItemEnabledPassiveHostChecks'>All Hosts Enabled</td></tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</p>

<!-- Produced by Nagios (http://www.nagios.org).  Copyright (c) 1999-2007 Ethan Galstad. -->
</BODY>
</HTML>
if i copy the cgi's from my previous installed version(3.2.0) they work, so i don't thinks its a apache problem.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: internal error on solaris10 - nagios-3.5.1

Post by abrist »

What was the error in full?
Do you have the log from the compile?
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.
jacastronuens
Posts: 4
Joined: Fri Dec 06, 2013 5:31 am

Re: internal error on solaris10 - nagios-3.5.1

Post by jacastronuens »

Hi,

I can provide the log, when i get home.
The output from curl seems ok, the problem is on the browser, when i open a cgi, i get a 500 internal error.
I tried to add script_log for cgi and i get :

Code: Select all

%% [Fri Dec 06 11:20:02 2013] GET /nagios/cgi-bin/tac.cgi HTTP/1.1
%% 500 /opt/SP/apps/nagios/nagios-3.5.1/sbin/tac.cgi
%request
Host: now-ena-bac59.prd:8084
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:25.0) Gecko/20100101 Firefox/25.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: pt-pt,pt;q=0.8,en;q=0.5,en-us;q=0.3
Accept-Encoding: gzip, deflate
Referer: http://now-ena-bac59.prd:8084/nagios/side.php
Connection: keep-alive
%response



abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: internal error on solaris10 - nagios-3.5.1

Post by abrist »

Great. Let us know.
It would be nice to see the compile log and a tail from apache's error log.
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.
jacastronuens
Posts: 4
Joined: Fri Dec 06, 2013 5:31 am

Re: internal error on solaris10 - nagios-3.5.1

Post by jacastronuens »

Hi guys.

Apache output:

Code: Select all

85.205.246.205 - njose [09/Dec/2013:09:31:43 +0100] "GET /nagios/cgi-bin/tac.cgi HTTP/1.1" 500 535 "http://now-ena-bac59.prd:8084/nagios/side.php" "Mozilla/5.0 (Windows NT 6.1; rv:25.0) Gecko/20100101 Firefox/25.0"
jacastronuens
Posts: 4
Joined: Fri Dec 06, 2013 5:31 am

Re: internal error on solaris10 - nagios-3.5.1

Post by jacastronuens »

Hi,

More updates,

I have found that the Headers Accept-language is the one causing the 500

Code: Select all

curl -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" -H "User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:25.0) Gecko/20100101 Firefox/25.0" -H "Accept-Encoding: gzip, deflate"   -H "Accept-Language: " -H "Authorization: Basic bmpvc2U6bmpvc2UwMQ==" http://localhost:8084/nagios/cgi-bin/tac.cgi
Without the header works
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: internal error on solaris10 - nagios-3.5.1

Post by abrist »

Yep. There were some localization issue that were not resolved until 3.99x - essentially core 4. You could try just specifying a single language "en-us", or just forego the Accept-Language header all together. Or upgrade to 4.x on solaris (gulp!).
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.
Locked