cLive ;-) has asked for the wisdom of the Perl Monks concerning the following question:
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'><starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/><?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>
<?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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problems with POE::Component::Jabber and DJabberd
by rcaputo (Chaplain) on Oct 16, 2007 at 21:43 UTC | |
|
Re: Problems with POE::Component::Jabber and DJabberd
by cLive ;-) (Prior) on Oct 17, 2007 at 03:08 UTC | |
|
Re: Problems with POE::Component::Jabber and DJabberd
by cLive ;-) (Prior) on Oct 18, 2007 at 03:31 UTC |