Odd error connecting to Openfire 3.6.0a

70 views
Skip to first unread message

clwaters

unread,
Sep 29, 2008, 12:56:38 PM9/29/08
to perl-net-jabber-bot
Here's my connection string and the resulting error from the module.
This is still the one using Class::STD:

/usr/bin/perl ./jwbot.pl -server centos-xen-host.jw.local -
conference_server conference.centos-xen-host.jw.local -user REMOVED -
pass REMOVED -port 5222
2008/09/29 09:37:54 ERROR (389): ERROR: Authorization failed:
2008/09/29 09:37:54 ERROR (391): error
2008/09/29 09:37:54 ERROR (391): not-authorized
Can't call method "GetUserID" on an undefined value at /usr/lib/perl5/
site_perl/5.8.8/Net/Jabber/Bot.pm line 560.

This only seems to happen on the OpenFire server. The error does not
exist with ejabberd.

Here's the related section from the module:

sub ProcessJabberMessage {
my $self = shift;
DEBUG("ProcessJabberMessage called");
my $obj_ID = $self->_get_obj_id() or return;

my $session_id = shift;
my $message = shift;

my $type = $message->GetType();
my $fromJID = $message->GetFrom("jid");
my $from_full = $message->GetFrom();

my $from = $fromJID->GetUserID(); #This is the line
it's complaining about
my $resource = $fromJID->GetResource();
my $subject = $message->GetSubject();
my $body = $message->GetBody();

my $reply_to = $from_full;
$reply_to =~ s/\/.*$// if($type eq 'groupchat');


While I suspect the issue is probably with the server, I am hoping the
error that is being generated might mean more to someone here and can
shed some light on it.

Incidentally I had to comment out lines 580 and 583 to get the bot to
stop a few other issues but I don't think they are related to this at
all.

I might try the new version on a different machine with the same bot
script I have to see if it makes any differences.

Thanks.

clwaters

unread,
Sep 29, 2008, 9:01:58 PM9/29/08
to perl-net-jabber-bot
I re-installed the Net::Jabber::Bot Module to make sure the changes I
noted above were not causing the problem. I turned on the debug and
there are the results:

l ./jwbot.pl -server centos-xen-host.jw.local -conference_server
conference.centos-xen-host.jw.local -user jenna -pass jennabot -port
5222 -debug DEBUG
2008/09/29 17:59:12 DEBUG (341): new client object.
2008/09/29 17:59:12 DEBUG (348): Set the call backs.
2008/09/29 17:59:12 DEBUG (357): Connect. hostname => centos-xen-
host.jw.local , port => 5222
2008/09/29 17:59:12 DEBUG (375): Logging in... as user jenna / jenna
2008/09/29 17:59:12 ERROR (389): ERROR: Authorization failed:
2008/09/29 17:59:12 ERROR (391): error
2008/09/29 17:59:12 ERROR (391): not-authorized
2008/09/29 17:59:12 DEBUG (963): Sending message 272-17-1 157 bytes to
exa...@conference.centos-xen-host.jw.local
2008/09/29 17:59:12 DEBUG (971): Sleeping 0.2 after sending message.
2008/09/29 17:59:13 DEBUG (550): ProcessJabberMessage called
Can't call method "GetUserID" on an undefined value at /usr/lib/perl5/
site_perl/5.8.8/Net/Jabber/Bot.pm line 560.


clwaters

unread,
Oct 1, 2008, 2:51:44 PM10/1/08
to perl-net-jabber-bot
I finally have looked at the debug log from the server and it seems to
complaining about SASL:

javax.security.sasl.SaslException: DIGEST-MD5: digest response format
violation. Mismatched URI: /; expecting: xmpp/centos-xen-host.jw.local
at
com.sun.security.sasl.digest.DigestMD5Server.validateClientResponse(Unknown
Source)
at
com.sun.security.sasl.digest.DigestMD5Server.evaluateResponse(Unknown
Source)
at
org.jivesoftware.openfire.net.SASLAuthentication.handle(SASLAuthentication.java:
296)
at
org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:
164)
at
org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandler.java:
133)
at org.apache.mina.common.support.AbstractIoFilterChain
$TailFilter.messageReceived(AbstractIoFilterChain.java:570)
at
org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:
299)
at org.apache.mina.common.support.AbstractIoFilterChain.access
$1100(AbstractIoFilterChain.java:53)
at org.apache.mina.common.support.AbstractIoFilterChain
$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:648)
at
org.apache.mina.common.IoFilterAdapter.messageReceived(IoFilterAdapter.java:
80)
at
org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:
299)
at org.apache.mina.common.support.AbstractIoFilterChain.access
$1100(AbstractIoFilterChain.java:53)
at org.apache.mina.common.support.AbstractIoFilterChain
$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:648)
at
org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(SimpleProtocolDecoderOutput.java:
58)
at
org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:
185)
at
org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:
299)
at org.apache.mina.common.support.AbstractIoFilterChain.access
$1100(AbstractIoFilterChain.java:53)
at org.apache.mina.common.support.AbstractIoFilterChain
$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:648)
at
org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:
239)
at org.apache.mina.filter.executor.ExecutorFilter
$ProcessEventsRunnable.run(ExecutorFilter.java:283)
at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
Source)
at
org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:
51)
at java.lang.Thread.run(Unknown Source)


On Sep 29, 6:01 pm, clwaters <clwat...@gmail.com> wrote:
> I re-installed the Net::Jabber::Bot Module to make sure the changes I
> noted above were not causing the problem.  I turned on the debug and
> there are the results:
>
> l ./jwbot.pl -server centos-xen-host.jw.local -conference_server
> conference.centos-xen-host.jw.local -user jenna -pass jennabot -port
> 5222 -debug DEBUG
> 2008/09/29 17:59:12 DEBUG (341): new client object.
> 2008/09/29 17:59:12 DEBUG (348): Set the call backs.
> 2008/09/29 17:59:12 DEBUG (357): Connect. hostname => centos-xen-
> host.jw.local , port => 5222
> 2008/09/29 17:59:12 DEBUG (375): Logging in... as user jenna / jenna
> 2008/09/29 17:59:12 ERROR (389): ERROR: Authorization failed:
> 2008/09/29 17:59:12 ERROR (391): error
> 2008/09/29 17:59:12 ERROR (391): not-authorized
> 2008/09/29 17:59:12 DEBUG (963): Sending message 272-17-1 157 bytes to
> exam...@conference.centos-xen-host.jw.local
Reply all
Reply to author
Forward
0 new messages