Perl Net::Jabber "error not-authorized"

I'm using the sample Perl script at http://www.openp2p.com/pub/a/p2p/2001/03/09/adams_1.html?page=2 except that I hardcoded the recipient and message into my test script. However, I get the following error when I run the script:

Jabber auth error: error not-authorized

On the ejabberd (2.0.5) side, I get

=INFO REPORT==== 2009-05-30 11:34:42 ===
I(<0.269.0>:ejabberd_listener:116) : (#Port<0.427>) Accepted connection {{216,216,32,245},49463} -> {{216,216,32,4},5222}

=INFO REPORT==== 2009-05-30 11:34:42 ===
I(<0.368.0>:ejabberd_c2s:709) : ({socket_state,gen_tcp,#Port<0.427>,<0.367.0>}) Failed authentication for apu@im.nocservices.com

The username/password is correct as I use it successfully when connecting from another client.

Any thoughts?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

The script tries to login

apu wrote:

I hardcoded the recipient and message into my test script.

On the ejabberd (2.0.5) side, I get

=INFO REPORT==== 2009-05-30 11:34:42 ===
I(<0.368.0>:ejabberd_c2s:709) : ({socket_state,gen_tcp,#Port<0.427>,<0.367.0>}) Failed authentication for apu@im.nocservices.com

The username/password is correct

Obviously it isn't correct.

If you create an account apu@im.nocservices.com with password notifypass, put in the Perl script:

use constant USER      => 'apu';      # user this script connects as
use constant SERVER    => 'im.nocservices.com';         # Jabber server to connect to
use constant PASSWORD  => 'notifypass';      # password associated with USER

It works for me using ejabberd 2.0.5.

Tried it with two different

Tried it with two different ejabberd accounts. Copy-and-pasted the username & password for the one brand-new one that this script will eventually use. The other is one that I already use with Adium as a client.

I am 100% positive I'm using the same username/password both with the working client and the non-working Perl script. Obviously, something is changing how it is presented to the server but I don't know where to look or what to try changing. Do I need to hash the password somehow before sending it? Something else?

Syndicate content