check_by_ssh against localhost segfaults?

Petersen, Mark MPetersen at gs1us.org
Thu Jan 3 18:35:22 CET 2008


I'm trying to run check_by_ssh against my localhost (for consistency
purposes.)  I'm using forced command execution with ssh:

`cat /home/nagios/.ssh/authorized_keys2`
command="/home/nagios/bin/check_by_ssh.sh" ssh-dss AAAAB3N<snip>
nagios_check_by_ssh

/usr/lib/nagios/plugins/check_by_ssh -i /etc/nagios2/keys/check_by_ssh
-l nagios -H localhost -C 'Disk_Space -m /root -w 15% -c 10%' -t 20

This check works fine (same authorized_keys, same script) on remote
hosts, but segfaults against localhost.

Localhost kernel: [5081242.311916] check_by_ssh[15109]: segfault at
0000000000000000 rip 00002b68aaa130f0 rsp 00007fff00450888 error 4

As the nagios user I run:
`ssh -v -i /etc/nagios2/keys/check_by_ssh localhost 'Disk_Space -m /root
-w 15% -c 10%'`

<snip>
debug1: read PEM private key done: type DSA
debug1: Remote: Forced command: /home/nagios/bin/check_by_ssh.sh
debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
debug1: Sending command: Disk_Space -m /root -w 15% -c 10%
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: channel 0: free: client-session, nchannels 1
debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 0.0 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0
debug1: Exit status 1

`ssh -v -i /etc/nagios2/keys/check_by_ssh otherhost 'Disk_Space -m /root
-w 15% -c 10%'`

debug1: read PEM private key done: type DSA
debug1: Remote: Forced command: /home/nagios/bin/check_by_ssh.sh
debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
debug1: Sending command: Disk_Space -m /root -w 15% -c 10%
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
DISK OK - free space: / 320 MB (67% inode=96%);| /=159MB;407;431;96;479
debug1: channel 0: free: client-session, nchannels 1
debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 0.0 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0
debug1: Exit status 0

The only difference is the output from check_by_ssh.sh on the remote
host (and an exit code.)  Since the check_by_ssh.sh (/home/nagios
actually) was rsynced from localhost to otherhost it seems it should be
ok.  If I export SSH_ORIGINAL_COMMAND and run check_by_ssh.sh on
localhost it works ok, so I don't think it's the script.

Nagios is reporting status as "(Return code of 139 is out of bounds)."
This is on Ubuntu 6.10, all versions of everything (ssh client, server,
nagios-plugins, etc.) are the same.

Any ideas, I'm kind of at a loss...

mark

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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