[JDEV] Net::Jabber and jabberd config

Chris Goldman gold at spine.com
Wed Dec 20 19:11:58 CST 2000


Hello all,

First, I'd like to thank everyone here -- I've lurked for a while, and
gotten a jabber 1.2 server working, with groupchat.

Now, however, I need more active assistance.  I wonder, can anyone help
me figure out what I am doing wrong?

I am trying to set my jabber server up to accept communication on a
TCP/IP link, and use Net::Jabber to write my component.

Here is the relevant part of my jabber.xml file:

  <service id="mylistener"> 
    <host/> 
    <accept> 
      <ip>208.185.86.169</ip> 
      <port>7423</port> 
      <secret>tell_no_one</secret> 
    </accept> 
  </service> 

And my script:

#!/usr/bin/perl -w

use Net::Jabber;
$Con = new Net::Jabber::Component( debuglevel => 2,
                                   debugfile => 'stdout',
                                   debugtime => 1 );

$Con->Connect( hostname => '208.185.86.169',
               port => 7423,
               secret => 'tell_no_one',
               componentname => 'mylistener' );

if ($Con->Connected())
  { 
    print "We are connected to the server...\n";
  }

$Con->Disconnect();

When I start my server, everything looks okay, but it fails to respond
to connection requests from my regular IM clients.  When I run my
script, with debugging on, I get this:

[20:03:15] XML::Stream: new: hostname = (im.cddms.com)
[20:03:15] XML::Stream: SetCallBacks: tag(node) func(CODE(0x85b6040))
[20:03:15] NJ::Component: Connect: type()
[20:03:15] NJ::Component: Connect: hostname(208.185.86.169)
secret(tell_no_one) componentname(mylistener)
[20:03:15] XML::Stream: Connect: type(tcpip)
[20:03:15] XML::Stream: Send: (<?xml version="1.0"?><stream:stream
xmlns:stream="http://etherx.jabber.org/streams"
xmlns="jabber:component:accept" to="mylistener" from="im.cddms.com" >)

Here it hangs.  If I kill the server, the component client quits,
logging this:

[20:03:56] XML::Stream: Read: ()
[20:03:56] XML::Stream: Read: ERROR
[20:03:56] NJ::Component: Connected: (0)
[20:03:56] NJ::Component: Disconnect: bye bye

Finally, the relevant (I think) server debug output:

Wed Dec 20 17:01:22 2000  deliver.c:206 Registering goldlistener with
instance mylistener
Wed Dec 20 17:01:22 2000  base_host.c:60 base_host_config registering
host (null) with section 'mylistener'

Wed Dec 20 17:01:22 2000  deliver.c:206 Registering (null) with instance
mylistener
Wed Dec 20 17:01:22 2000  base_accept.c:563 base_accept_config
performing configuration <accept>
      <ip>208.185.86.169</ip>
      <port>7423</port>
      <secret>tell_no_one</secret>
    </accept>

Wed Dec 20 17:01:22 2000  base_accept.c:604 new sink 80835C0
Wed Dec 20 17:01:22 2000  deliver.c:473 DELIVER 1:update.jabber.org
<presence from='localhost' to='jsm at update.jabber.org/1.2'/>
Wed Dec 20 17:01:22 2000  deliver.c:344 delivering to instance
'mylistener'
Wed Dec 20 17:01:22 2000  deliver.c:344 delivering to instance 'dnsrv'
Wed Dec 20 17:01:22 2000  base_accept.c:422 new listener thread starting
for <host mylistener=''/>
Wed Dec 20 17:02:53 2000  base_accept.c:453 new connection on port 7423
from ip 208.185.86.169 as fd 14
Wed Dec 20 17:02:53 2000  log.c:105 <log type='notice'
from='-internal'>base_accept: new connection on port 7423 from ip
208.185.86.
169</log>
Wed Dec 20 17:02:53 2000  deliver.c:473 DELIVER 3:-internal <log
type='notice' from='-internal'>base_accept: new connection on port
7423 from ip 208.185.86.169</log>
Wed Dec 20 17:02:53 2000  deliver.c:344 delivering to instance 'logger'
20001221T01:02:53: [notice] (-internal): base_accept: new connection on
port 7423 from ip 208.185.86.169

I have this sneaking suspicion that somehow, I've set up a loop in
resolving the destination of some message, and this is what is causing
the hang, but my understanding of the jabber architecture still has a
ways to go.

Any help is appreciated.  Thanks!

Chris Goldman
gold at spine.com




More information about the JDev mailing list