sh: /check_ping: No such file or directory

Paul O'Rorke paul at paulororke.net
Thu Oct 20 13:06:47 CEST 2005


OK - I have taken your advice to heart and tried the .configure again. 
Infact I have done the entire build/install process again and documented
it as I went but still have similar results.  I must be missing
something REALLY simple...

I have disabled SElinux.

After running
./configure --prefix=/usr/local/nagios --with-cgiurl=/nagios/cgi-bin
--with-htmurl=/nagios/ --with-nagios-user=nagios
--with-nagios-group=nagios --with-command-group=nagios
I got:
[snip]

*** Configuration summary for nagios 2.0b4 08-02-2005 ***:

 General Options:
 -------------------------
        Nagios executable:  nagios
        Nagios user/group:  nagios,nagios
       Command user/group:  nagios,nagios
            Embedded Perl:  no
             Event Broker:  yes
        Install ${prefix}:  /usr/local/nagios
                Lock file:  ${prefix}/var/nagios.lock
           Init directory:  /etc/rc.d/init.d
                  Host OS:  linux-gnu

 Web Interface Options:
 ------------------------
                 HTML URL:  http://localhost/nagios/
                  CGI URL:  http://localhost/nagios/cgi-bin/
 Traceroute (used by WAP):  /bin/traceroute

full output text:  http://docs.paulororke.net/nagios_fc4/config-output.txt

I did however get errors on doing 'make all'.  They seemed to all be related to gd.  Important or not?  http://docs.paulororke.net/nagios_fc4/make_all-error.txt
  
I still get no status.log in status.logstatus_file=/usr/local/nagios/var/status.log  http://docs.paulororke.net/nagios_fc4/nagios.cfg.txt though I'm sure nagios has write permissions.

I have documented my setup here: http://docs.paulororke.net/nagios_fc4/nagios_fc4.php


Perhaps I've been looking at the same mistake all day...



Lori Adams wrote:

>You error message tells you that it's a permissions problem.  This may
>have something to do with your ./configure arguments for user and group
>having a leading '/'.  (See Marc Powell's response).  It looks like your
>nagios instance is running as user '3nagios'.  Try running ./configure
>again. 
>
>  
>
>>-----Original Message-----
>>From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
>>admin at lists.sourceforge.net] On Behalf Of Paul O'Rorke
>>Sent: Tuesday, October 18, 2005 8:02 PM
>>To: Nagios Users
>>Subject: Re: [Nagios-users] sh: /check_ping: No such file or directory
>>
>>Perhaps I was premature saying that Nagios is running nicely...
>>
>>whoops!
>>Error:  Could not read host and service status information!
>>
>>In the FAQ about this it mentions disk space limitations for the
>>partition with the status.log and where nagios is installed but I gave
>>several GB of space.  I can find no evidence of a status.log or
>>status.dat file anywhere on the system even though a ps listing shows
>>nagios to be running.  I also get an error in
>>    
>>
>/var/log/nagios/nagios.log
>  
>
>>about a failure to daemonize
>>
>># service nagios start
>>[1129687596] Nagios 2.0b4 starting... (PID=5145)
>>[1129687596] LOG VERSION: 2.0
>>[1129687596] You do not have permission to write to
>>    
>>
>/var/run/nagios.pid
>  
>
>>[1129687596] Bailing out due to errors encountered while attempting to
>>daemonize... (PID=5145)
>>[1129688753] Nagios 2.0b4 starting... (PID=5337)
>>[1129688753] LOG VERSION: 2.0
>>
>># ps aux |grep -i nagios
>>3nagios    5337  0.0  0.2  12548  1220 pts/2    Sl   19:25   0:00
>>/usr/local/nagios/bin/nagios /usr/local/nagios/etc/nagios.cfg
>>root      5905  0.0  0.1   3764   712 pts/0    S+   19:46   0:00 grep
>>    
>>
>-i
>  
>
>>nagios
>>
>>from "/usr/local/nagios/etc/nagios.cfg" line 71
>>status_file=/usr/local/nagios/var/status.log
>>
>>If Nagios has started (PID=5337) why does it not create the status.log
>>file for the CGIs to read?
>>
>>
>>John P. Rouillard wrote:
>>
>>    
>>
>>>In message <43556437.5090507 at paulororke.net>,
>>>"Paul O'Rorke" writes:
>>>
>>>
>>>      
>>>
>>>>Subhendu Ghosh wrote:
>>>>
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>>>>Paul O'Rorke wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>            
>>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>>>>>*Hi all,
>>>>>>>>
>>>>>>>>I'm sure this is covered somewhere in the docs but I can't seem
>>>>>>>>                
>>>>>>>>
>to
>  
>
>>find
>>    
>>
>>>>>>>>it.  I've read a lot of posts but I'm just not gettign it.  I've
>>>>>>>>installed Nagios in the past successfully but have run into a
>>>>>>>>                
>>>>>>>>
>bit of
>  
>
>>a
>>    
>>
>>>>>>>>problem here that I can't figure out.
>>>>>>>>
>>>>>>>>After building Nagios and the plugins on **Fedora Core4 **with :
>>>>>>>>                
>>>>>>>>
>>(from
>>    
>>
>>>>>>>>the docs)
>>>>>>>>[...]
>>>>>>>>   Nagios 2.0b4 starting... (PID=21936)
>>>>>>>>   sh: /check_ping: No such file or directory
>>>>>>>>   Warning: Return code of 127 for check of service 'PING' on
>>>>>>>>                
>>>>>>>>
>host
>  
>
>>>>>>>>'BEFVP41' was out of bounds. Make sure the plugin you're trying
>>>>>>>>                
>>>>>>>>
>to
>  
>
>>run
>>    
>>
>>>>>>>>actually exists.
>>>>>>>>   sh: /check_ping: No such file or directory
>>>>>>>>
>>>>>>>>
>>>>>>>>                
>>>>>>>>
>>>Above is clue 1.
>>>
>>>
>>>
>>>      
>>>
>>>>>>>>   Warning: Attempting to execute the command "/check_ping -H
>>>>>>>>
>>>>>>>>
>>>>>>>>                
>>>>>>>>
>>>Here is clue 2.
>>>
>>>
>>>
>>>      
>>>
>>>>>>>>192.168.123.1 -w 3000.0,80% -c 5000.0,100% -p 1" resulted in a
>>>>>>>>                
>>>>>>>>
>>return
>>    
>>
>>>>>>>>code of 127.   Make sure the script or binary you are trying to
>>>>>>>>                
>>>>>>>>
>>execute
>>    
>>
>>>>>>>>actually exists...
>>>>>>>>
>>>>>>>>I believe the plugin is there because I can run the folowing:
>>>>>>>># /usr/local/nagios/libexec/check_ping -H 192.168.123.1 -w
>>>>>>>>                
>>>>>>>>
>>3000.0,80% -c
>>    
>>
>>>>>>>>5000.0,100% -p 1
>>>>>>>>PING OK - Packet loss = 0%, RTA = 6.09 ms
>>>>>>>>
>>>>>>>>
>>>>>>>>                
>>>>>>>>
>>>Nagios doesn't think its in /usr/local/.../check_ping.
>>>
>>>
>>>
>>>      
>>>
>>>>>>Take a look at the service definition for PING on BEFVP41.
>>>>>>Follow that to the command definition.  Most likely a mis-typed
>>>>>>            
>>>>>>
>MACRO.
>  
>
>>>>>>nagios -v does not verify the existence of the plugins - only the
>>>>>>logic of the config files.
>>>>>>
>>>>>>
>>>>>>            
>>>>>>
>>>>>From /usr/local/nagios/etc/services.cfg
>>>># Service definition
>>>>define service{
>>>>      use                             generic-service         ;
>>>>        
>>>>
>Name
>  
>
>>>>of service template to use
>>>>
>>>>      host_name                       BEFVP41
>>>>      service_description             PING
>>>>      is_volatile                     0
>>>>      check_period                    24x7
>>>>      max_check_attempts              3
>>>>      normal_check_interval           5
>>>>      retry_check_interval            1
>>>>      contact_groups                  admin
>>>>      notification_interval           240
>>>>      notification_period             24x7
>>>>      notification_options            c,r
>>>>      check_command
>>>>        
>>>>
>check_ping!100.0,20%!500.0,60%
>  
>
>>>>      }
>>>>
>>>>
>>>>and from /usr/local/nagios/etc/checkcommands.cfg :
>>>># 'check_ping' command definition
>>>>define command{
>>>>      command_name    check_ping
>>>>      command_line    $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$
>>>>        
>>>>
>-c
>  
>
>>>>$ARG2$ -p 5
>>>>      }
>>>>
>>>>I can't see what's wrong here.
>>>>
>>>>
>>>>        
>>>>
>>>What is your resource file setting and what is $USER1$ defined to be?
>>>Look at the error, sh is trying to exec /check_ping not
>>>/usr/local/.../check_ping. Got to be $USER1$ macro misfiring.
>>>
>>>				-- rouilj
>>>John Rouillard
>>>      
>>>
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by:
>Power Architecture Resource Center: Free content, downloads, discussions,
>and more. http://solutions.newsforge.com/ibmarch.tmpl
>_______________________________________________
>Nagios-users mailing list
>Nagios-users at lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/nagios-users
>::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
>::: Messages without supporting info will risk being sent to /dev/null
>  
>


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list