I have a POE::Component::Jabber client that worked well when connecting to an Openfire server. I'm now trying to connect it to a DJabberd server (both with and without SSL enabled on DJabberd), but it is failing with:
Non-compliant server implementation! SASL negotiation not initiated.
I can connect fine to DJabberd using Psi.
The communication from PCJ (bold) and responses from DJabberd are as follows:
<?xml version='1.0'?><stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' to='myserver.com' version='1.0'>
<?xml version='1.0'?><stream:stream xmlns='jabber:client' xmlns:stream
+='http://etherx.jabber.org/streams' version='1.0' from='myserver.com'
+ id='2fcd'>
<stream:features><auth xmlns='http://jabber.org/features/iq-auth'/><st
+arttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/></stream:features>
<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
<proceed xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
<?xml version='1.0'?><stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' to='myserver.com' version='1.0'>
<?xml version='1.0'?><stream:stream xmlns='jabber:client' xmlns:stream
+='http://etherx.jabber.org/streams' version='1.0' from='myserver.com'
+ id='2fcdb'>
<stream:features><auth xmlns='http://jabber.org/features/iq-auth'/></s
+tream:features>
Here's the PCJ constructor:
POE::Component::Jabber->new(
IP => '127.0.0.1',
Hostname => 'myserver.com',
Port => 5222, # (or 5223 for pure SSL connectio
+n)
Username => 'username',
Password => 'password',
Alias => 'jabberObj',
Resource => 'me',
ConnectionType => +XMPP,
Debug => $Debug,
States => {
StatusEvent => 'xmpp_status_event',
InputEvent => 'xmpp_input_event',
ErrorEvent => 'xmpp_error_event',
}
)
And here's the DJabberd one:
my $rs = DJabberd::RosterStorage::Test->new;
$rs->finalize;
my $vcard = DJabberd::Plugin::VCard::SQLite->new;
$vcard->set_config_storage("$Bin/roster.sqlite");
$vcard->finalize;
my $muc = DJabberd::Plugin::MUC->new;
$muc->set_config_subdomain("conference");
$muc->finalize;
my $vhost = DJabberd::VHost->new(
server_name => 'myserver.com',
require_ssl => 0,
s2s => 1,
plugins => [
DJabberd::Authen::Test->new,
$rs,
$vcard,
$muc,
DJabberd::Delivery::Local->new,
DJabberd::Delivery::S2S->new,
],
);
my $server = DJabberd->new(
daemonize => $daemonize,
);
$server->add_vhost($vhost);
$server->run;
It looks weird that PCJ repeats the stream stanzas, but I'm not sure if that's the issue here. Has anybody got a clue what I'm missing here? It's driving me a little crazy right now. I think I need a nap. Maybe that will help...
Edit - I've just looked at the XML log in Psi, and it appears to use a get iq to trigger authentication, whereas the PCJ one doesn't send the IQ, but does receive a features stream from DJabberd that Psi doesn't appear to get. Weird.
Edit 2 - I missed the last stanza from the server before die earlier. Oops.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Outside of code tags, you may need to use entities for some characters:
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.