[JDEV] Invalid handshake in component written with Jabber::Component
Migs Paraz
map at internet.org.ph
Mon Nov 5 05:22:23 CST 2001
I'm trying to write my own JUD transport in Perl using Jabber::Connection.
I think the problem is the Perl script's "localname." Thanks in advance!
Here's the script output:
SEND: <?xml version='1.0'?><stream:stream xmlns='jabber:component:accept' xmlns:stream='http://etherx.jabber.org/streams' to='localhost'>
RECV: <?xml version='1.0'?><stream:stream xmlns:stream='http://etherx.jabber.org/streams' id='3BE66CA0' xmlns='jabber:component:accept' from='jud'>
SEND: <handshake id='1'>a4e308bfb34c7bade5130d882ad71599bb4bca89</handshake>
RECV: <stream:error>Invalid handshake</stream:error><handshake/>
stream error: Invalid handshake at /usr/lib/perl5/site_perl/5.6.0/i386-linux/XML/Parser/Expat.pm line 614
Here's the jabberd output:
Mon Nov 5 18:40:32 2001 mio.c:750 MIO read from socket 11: <handshake id='1'>a4e308bfb34c7bade5130d882ad71599bb4bca89</handshake>
Mon Nov 5 18:40:32 2001 base_accept.c:105 process XML: m:8140B40 state:3, arg:8108AA8, x:81F2BA0
Mon Nov 5 18:40:32 2001 mio.c:1032 mio_write called on x: 0 buffer: <stream:error>Invalid handshake</stream:error>
Mon Nov 5 18:40:32 2001 mio.c:1032 mio_write called on x: 0 buffer: <handshake/>
Mon Nov 5 18:40:32 2001 mio.c:275 write_dump writing data: <stream:error>Invalid handshake</stream:error>
Mon Nov 5 18:40:32 2001 mio.c:275 write_dump writing data: <handshake/>
Mon Nov 5 18:40:32 2001 base_accept.c:105 process XML: m:8140B40 state:4, arg:8108AA8, x:8050ADC
Here's the relevant part of the script:
use Jabber::Connection;
use Jabber::NodeFactory;
use Jabber::NS qw(:all);
my $c = new Jabber::Connection(
ns => "jabber:component:accept",
server => 'localhost:1234',
localname => "jud.localhost",
log => 1,
);
$c->connect or die "oops: ".$c->lastError;
Here's the relevant part of the configuration:
<service id="sessions">
...
<jsm xmlns="jabber:config:jsm">
...
<service type="jud" jid="jud.localhost" name="Jabber User Directory">
<ns>jabber:iq:search</ns>
<ns>jabber:iq:register</ns>
</service>
...
</jsm>
...
</service>
...
<service id="jud">
<host>jud.localhost</host>
<accept>
<ip>127.0.0.1</ip>
<port>1234</port>
<secret>test</secret>
</accept>
</service>
More information about the JDev
mailing list