[Home]

Summary:ASTERISK-22410: [patch] Change "Error isn't a PubSub error ..." error log to a debug log
Reporter:abelbeck (abelbeck)Labels:
Date Opened:2013-08-26 22:50:51Date Closed:2013-10-17 10:30:03
Priority:MinorRegression?
Status:Closed/CompleteComponents:Resources/res_jabber Resources/res_xmpp
Versions:1.8.23.0 11.5.0 Frequency of
Occurrence
Related
Issues:
is related toASTERISK-22469 crash when res_jabber receives an XMPP IQ stanza with no 'from'
is related toASTERISK-22681 RES XMPP
Environment:AstLinux 1.1.xAttachments:( 0) asterisk-1.8-res_jabber-log-nonpubsub-error-to-debug.patch
( 1) asterisk-11-res_xmpp-log-nonpubsub-error-to-debug.patch
Description:[Edit by Rusty Newton - removed some lines, as that info was moved to issue ASTERISK-22469, a separate issue]

More good news, Prosody 0.9.0 supports pubsub.

The bad news, when enabling distributed device state via XMPP/PubSub I'm seeing a lot of "Error isn't a PubSub error, why are we here?" error logs.

According to Matthew Wild, Prosody developer, he gives this synopsis:

-- SERVER: Error: node with this name already exists
<iq id='aaaah' type='error' to='asterisk1@pbx.example.tld/asterisk' from='pubsub.pbx.example.tld'><error type='cancel'><conflict xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></iq>

-- SERVER: Stanza not handled (Prosody doesn't currently support modification of ACLs over XMPP)
<iq id='aaaai' type='error' to='asterisk1@pbx.example.tld/asterisk' from='pubsub.pbx.example.tld'><error type='cancel'><service-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></iq>

The ACL issue can be worked around by defining "admins" for Prosody's pubsub configuration and the pre-existing node error seems to be safely ignored.

All in all, distributed device state seems to work with Prosody 0.9.0 and Asterisk 1.8/11 with limited testing, though the many error logs are annoying.

Suggested is changing the non-pubsub error log to a debug log.  Patches to follow.
Comments:By: abelbeck (abelbeck) 2013-08-26 22:53:11.883-0500

Asterisk 1.8 change non-pubsub error log to debug log.

By: abelbeck (abelbeck) 2013-08-26 22:53:34.856-0500

Asterisk 11 change non-pubsub error log to debug log.

By: Rusty Newton (rnewton) 2013-08-28 08:54:15.346-0500

[Edit by Rusty Newton - removed some lines, as that info was moved to issue ASTERISK-22469, a separate issue]

Is this segfault you mention an issue that is already fixed in Asterisk? Or has it not been reported? If there is a situation in which Asterisk segfaults we would like to fix it.

By: abelbeck (abelbeck) 2013-08-28 11:42:04.473-0500

Attached file: res_jabber-prosody-0.8.2-vs-0.9.0.txt

By: abelbeck (abelbeck) 2013-08-28 11:44:23.262-0500

The focus of this 'issue' is to point out that in general XMPP servers may return superfluous non-pubsub errors for any number of reasons.  I'm suggesting this sort of error should not be logged as an Asterisk error, but rather as a level 1 debug error.

Case in point, while using Prosody 0.9.0 the number of error messages generated are quite misleading.

Rusty, to further elaborate on the segfault issue…

[Edit by Rusty Newton - removed some lines, as that info was moved to issue ASTERISK-22469, a separate issue]

Attached file: res_jabber-prosody-0.8.2-vs-0.9.0.txt


By: Rusty Newton (rnewton) 2013-09-04 18:03:58.206-0500

Thanks for the additional detail. The report was a little confusing since it appears to be two issues reported in one.  We try not to track multiple problems in a single issue report.

Regarding the crash: Can you get a backtrace following the instructions here: https://wiki.asterisk.org/wiki/display/AST/Getting+a+Backtrace ? Then open a new issue for the crash, attaching the backtrace and other info you provided.  After you create the new issue, I'll remove the confusing lines from the description here to make it more clear what this report is for.

The log message modification has been acknowledged and is in the queue of issues.


By: abelbeck (abelbeck) 2013-09-04 18:18:37.582-0500

Thanks, The log message modification is all I intended with this issue.

I can't be any help with the backtrace since we cross-compile an embedded image with stripped symbols.

[Edit by Rusty Newton - removed some lines, as that info was moved to issue ASTERISK-22469, a separate issue]


By: Rusty Newton (rnewton) 2013-09-05 14:52:19.238-0500

Thanks for the response. I've sanitized this issue and moved the potential vulnerability to  ASTERISK-22469

By: Michael Keuter (mkeuter) 2013-09-06 03:54:11.756-0500

Rusty, the crash was only in Asterisk 1.8.x and not in 11 or higher versions.
Update: sorry I was incorrect, we tested only res_jabber in 1.8.x, and didn't tested res_jabber in 11, but used res_xmpp instead, which worked fine.