Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

[dev.icinga.com #547] 1.0.2 command_line "sipsak -v -s sip:100@$HOSTADDRESS$:5060" always returns (null) #266

Closed
icinga-migration opened this issue Jun 30, 2010 · 11 comments

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/547

Created by brian on 2010-06-30 11:03:26 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2010-07-18 19:35:09 +00:00)
Target Version: 1.0.3
Last Update: 2010-07-18 19:35:09 +00:00 (in Redmine)


Hi Guys,

Ran the upgrade to 1.02 and it killed my SIP checking.

I use SIPSAK to check SIP proxies etc..

define command{
command_name check_sip
command_line sipsak -v -s sip:100@$HOSTADDRESS$:5060
}

This now returns (null) no matter what.

I'm not sure how to help you debug this and have reverted to 1.01 which fixes my issue.

Regards,
Brian


Relations:

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2010-06-30 11:08:06 +00:00

what does this plugin produce when you run that on the shell?

@icinga-migration
Copy link
Author

Updated by brian on 2010-06-30 11:11:13 +00:00

x-ing out IP's and other sensitive info

lisa:# sipsak -v -s sip:100@xxxxxxx:5060
SIP/2.0 200 OK
Via: SIP/2.0/UDP xxxxxx:57402;branch=z9hG4bK.79edc37d;rport=57402;alias
From: sip:sipsak@xxxxxx:57402;tag=2324c46f
To: sip:100@xx.xxxxx.xx:5060;tag=7c77d79a329cd18e0b56b5b1293e6ddc.9f87
Call-ID: 589612143@xxxxxxxxx
CSeq: 1 OPTIONS
Server: xxxx (xxxx-xxxx (i386/linux))
Content-Length: 0

@icinga-migration
Copy link
Author

Updated by VK7HSE on 2010-06-30 11:58:19 +00:00

  • Category set to Other

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2010-06-30 15:29:19 +00:00

  • Subject changed from Upgrade to 1.02 to 1
  • Priority changed from High to Normal

changed topic in order to reflect the problem.

maybe you can set sip:100@$HOSTADDRESS$:5060 into single quoting like 'sip:100@$HOSTADDRESS$:5060' and test that.

@icinga-migration
Copy link
Author

Updated by elagon on 2010-06-30 19:11:52 +00:00

  • Assigned to set to elagon

Hi, can you modify the command definition with the full path for the binary?
e.g. /usr/sbin/sipsak

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2010-07-01 15:54:45 +00:00

  • Subject changed from 1 to 1

https://git.icinga.org/?p=icinga-core.git;a=commit;h=3b1ab48db98baf76c92f7fbf8c33d102931a3cf2

this adds the (null) ptr on the output buffer if it is NULL. I suspect this to be faulty regarding this bug (but it could also lead into the wrong direction).

maybe it has also to do with the execv implementation returning wrong output.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2010-07-01 16:12:54 +00:00

another idea.

the new execv check returns other error ids than the popen and shell 126 or 127.

apparently we had

command_line $USER1$/check_imap_receive -H $HOSTADDRESS$ -U $ARG1$ -P $ARG2$ -w $ARG3$ -c $ARG4$ -s SUBJECT -s $ARG5$ --ssl --nodelete

with

/usr/lib/nagios/plugins/check_imap_receive -H mail.xxxx.com -U icinga-test@xxxx.com -P removed -w 15 -c 30 -s SUBJECT -s Icinga testing static email --ssl --nodelete

where -s was not quoted, it just failed and the result output was (null) (since dbug was NULL).

maybe over here this is a quoting problem too.

it could be that the @ is failing in the command arg.

@icinga-migration
Copy link
Author

Updated by Meier on 2010-07-04 06:38:44 +00:00

I don't think the @ is a problem i did some tests with random @-signs in the command line and did not see a similar behaviour. Is there a reason you use "-v" in the command?

one case where "null" is returned is when the permissions on the plugin are wrong.

@icinga-migration
Copy link
Author

Updated by Meier on 2010-07-04 17:01:22 +00:00

I did some testing both @-signs and multiline outputs provide the same result with popen and execv.

popen-execution

command_line /usr/lib64/nagios/plugins/check_ping \"\" @ -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5 -vvvv

execv-execution

command_line /usr/lib64/nagios/plugins/check_ping @ -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5 -vvvv

Both command lines work.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2010-07-09 14:45:35 +00:00

  • Category changed from Other to Active Checks

@icinga-migration
Copy link
Author

Updated by Meier on 2010-07-18 19:35:09 +00:00

  • Status changed from New to Resolved
  • Assigned to changed from elagon to mfriedrich
  • Target Version set to 1.0.3
  • Done % changed from 0 to 100

This is also due to #436, the op uses a command_line without path.
This will be resolved by 67420d5

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant