[JDEV] ICQ Transport with Jabber 1.2 - still getting remote server error
Keith Minkler
keith at digix.dyndns.org
Tue Nov 14 00:24:08 CST 2000
maybe i missed it, but i didn't see where you configured icq to use port 9000...? are you doing this, and does icq look like it's connecting? (with -D debug output)?
Keith
On Tue, Nov 14, 2000 at 12:44:34PM +0800, Vincent Lim's Yahoo wrote:
> Hi Keith,
>
> I am still getting the remote server error 502, despite having done the stuff you mentioned, ie.
> 1. setting the etherx host name to match the transport's jid
> 2. set the IP address used in the jabber.xml file in the <accept/> section to match the IP address of the icq transport host
>
> In my jabber.xml :
> <service id="icq.perfecttalk.com">
> <accept>
> <port>9000</port>
> <ip>192.168.1.2</ip>
> <secret>icq-accept</secret>
> </accept>
> </service>
>
> In my icq_trans.xml:
> <name>icq.perfecttalk.com</name>
> ......
> <etherx>
> <secret>icq-accept</secret>
> <host>icq.perfecttalk.com</host>
> <!-- N.B.: If "localhost" doesn't work try "127.0.0.1" instead -->
> </etherx>
>
>
> For reference, some debug statements from jabberd:
>
> -deliver.c:262 deliver(to[icq.perfecttalk.com],from[happiedwf at perfecttalk.com/JabberIM],type[4],packet[<iq type='get' id='jimAgent:jim_id_14' to='icq.perfecttalk.com' from='happiedwf at perfecttalk.com/JabberIM'><query xmlns='jabber:iq:register'/></iq>])
>
> -deliver.c:472 DELIVER 1:icq.perfecttalk.com <iq type='get' id='jimAgent:jim_id_14' to='icq.perfecttalk.com' from='happiedwf at perfecttalk.com/JabberIM'><query xmlns='jabber:iq:register'/></iq>
>
> -log.c:105 <log type='warn' from='-internal'>base_accept Bouncing packet intended for icq.perfecttalk.com</log>
>
> -deliver.c:472 DELIVER 3:-internal <log type='warn' from='-internal'>base_accept Bouncing packet intended for icq.perfecttalk.com</log>
>
> -deliver.c:344 delivering to instance 'logger'
> -[warn] (-internal): base_accept Bouncing packet intended for icq.perfecttalk.com
> -deliver.c:278 delivery failed (External Server Error)
>
> -log.c:105 <log type='notice' from='icq.perfecttalk.com'>bouncing a packet to icq.perfecttalk.com from happiedwf at perfecttalk.com/JabberIM: External Server Error</log>
>
> -deliver.c:472 DELIVER 3:icq.perfecttalk.com <log type='notice' from='icq.perfecttalk.com'>bouncing a packet to icq.perfecttalk.com from happiedwf at perfecttalk.com/JabberIM: External Server Error</log>
>
> -deliver.c:344 delivering to instance 'logger'
>
> -[notice] (icq.perfecttalk.com): bouncing a packet to icq.perfecttalk.com from happiedwf at perfecttalk.com/JabberIM: External Server Error
>
> -deliver.c:472 DELIVER 1:perfecttalk.com <iq type='error' id='jimAgent:jim_id_14' to='happiedwf at perfecttalk.com/JabberIM' from='icq.perfecttalk.com'><query xmlns='jabber:iq:register'/><error code='502'>External Server Error</error></iq>
>
> -deliver.c:344 delivering to instance 'sessions'
>
> -deliver.c:84 (8081D50)incoming packet <iq type='error' id='jimAgent:jim_id_14' to='happiedwf at perfecttalk.com/JabberIM' from='icq.perfecttalk.com'><query xmlns='jabber:iq:register'/><error code='502'>External Server Error</error></iq>
>
> -users.c:147 js_user(happiedwf at perfecttalk.com/JabberIM,8103790)
> -deliver.c:44 delivering locally to happiedwf at perfecttalk.com/JabberIM
> -modules.c:124 mapi_call 3
> -modules.c:163 mapi_call returning unhandled
> -mtq 81040C8 entering from pth
> -mtq 81040C8 queue call 81AE658
> -sessions.c:337 THREAD:SESSION:TO received data from icq.perfecttalk.com!
> -modules.c:124 mapi_call 0
> -modules.c:147 MAPI 81A7928
> -modules.c:163 mapi_call returning unhandled
>
> -deliver.c:472 DELIVER 4:c2s <route from='happiedwf at perfecttalk.com/81A7590' to='13 at c2s/8100998'><iq type='error' id='jimAgent:jim_id_14' to='happiedwf at perfecttalk.com/JabberIM' from='icq.perfecttalk.com'><query xmlns='jabber:iq:register'/><error code='502'>External Server Error</error></iq></route>
>
> -deliver.c:344 delivering to instance 'c2s'
> -client.c:124 Found the sock for this user
> -mtq 81040C8 leaving to pth
> -io_select.c:339 io_main checking sockets
>
> -io_select.c:105 WRITE 13 len 195 of <iq type='error' id='jimAgent:jim_id_14' to='happiedwf at perfecttalk.com/JabberIM' from='icq.perfecttalk.com'><query xmlns='jabber:iq:register'/><error code='502'>External Server Error</error></iq>
>
> -users.c:82 checking users for host perfecttalk.com
> -usercount 1 total users
> -users.c:82 checking users for host perfecttalk.com
> -usercount 1 total users
>
> ================================================================
> Oh, i forgot one MAJOR thing... when you are connecting to jabberd with libehterx, the etherx host name **MUST** match the transport's jid, i.e., if you are icq.jabber.com, you must connect to the etherx host icq.jabber.com and it **MUST** resolve to the IP address you used in the jabber.xml file, in the <accept/> section... (which **MUST** be the id of the service)...
>
> one of those MUST's is probably the reasone you guys couldn't get this working... sorry I forgot to mention it!
>
> Keith
>
> On Mon, Nov 13, 2000 at 01:30:45PM -0500, Keith Minkler wrote:
> > Eric, (et all)
> >
> > If you mean getting the ehandler_new_ex() function to connect to Jabberd, I would be glad to offer an explanation of how that is done...
> >
> > first, this function in libetherx was modified to take a port argument, and the internals of libetherx were modified so that, if the transport connects to the server on port 5269, it will use the 1.0 transport style, if it connects to any other port, it will use the jabberd style (i.e. base_accept).
> >
> > next, in your jabberd config file, you will need a service item, such as:
> >
> > <service id="icq.jabber.com">
> > <accept>
> > <port>9000</port>
> > <ip>12.34.56.78</ip>
> > <secret>icq-accept</secret>
> > </accept>
> > </service>
> >
> > this tells jabberd to listen for incoming component connections on port 9000, of ip 12.34.56.78. and to only allow transports with the secret "icq-accept", note that multiple service items can listen on the same ip and port, as long as they use different "etherx" secrets, they can be distinguished between each other...
> >
> > now, in icq transport (or anything else using ehandler_new_ex(), you should provide configuration for the following things:
> >
> > etherx host (usually defaults to 127.0.0.1)
> > etherx secret (can default to test?)
> > etherx port (should default to 5269)
> >
> > this way, you can always call ehandler_new_ex(..., port); and default it to 5269, since when the port is 5269, libetherx uses the 1.0 style transport connection, (etherx, instead of base_accept for 2.0)
> >
> > this is how the majority of transports are connecting to the jabber.org server, currently.
> >
> > in the 1.3+ server, there will be a cool thing called MIO (managed i/o), to replace the libetherx tstream functions, it acts as a frontend to all socket calls, and implements (currently) a select loop behind the scenes.. (this will be updated to allow *any* backend -- polld, select, sig-io, etc), but, a component MUST be a jabberd loadable .so object to take advantage of that...
> >
> > for the 1.4 release however, we are hoping to have ALL transports/agents updated to be jabberd loadable .so components... this makes things much easier..
> >
> > I dunno if i can clearly explain how to create a loadable .so just yet, but if you are curious, I rewrote svc_irc, irc-t, and groupchat as loadable modules.... (located in irc-jabber and conferencing modules) so you can check those out, the biggest points to look at are, the init.c file, which is where the majic happens.. irc-jabber gives an example of a jabberd component that has sub-modules, much like jsm, it has different modules, one for only parsing IRC, one for the transport, and one for the gateway (svc). Groupchat is a more simple example. the other big thing to note, is.. since you are connecting right to jabberd, you must include the jabberd.h file, and you no longer use libetherx, you must call deliver(dpacket_new(x),i); to deliver a packet, instead of ehandler_send... (where x is an xmlnode, and i is your instance you get from jabberd).
> >
> > Hope this helps everyone,
> >
> > Keith (please mail futher questions to this group)
> >
> > On Mon, Nov 13, 2000 at 10:00:18AM -0700, Eric Bowersox wrote:
> > > Since I myself have not yet gotten the ICQ transport to work with the 1.2
> > > server, I can't really answer that question yet.
> > >
> > > The old ICQ transport cannot connect to a 1.2 server. I have put code in
> > > the new ICQ transport that will allow it to connect to the 1.2 server under
> > > the right conditions, but we have been unable thusfar to get it to work.
> > > (This, incidentally, is one of the major stumbling blocks that keeps me from
> > > releasing the new transport at this time.)
> > >
> > > Eric
> > >
> > > -----Original Message-----
> > > From: Vincent Lim's Yahoo [mailto:happiedwf at yahoo.com]
> > > Sent: Sunday, November 12, 2000 11:22 PM
> > > To: dennis.noordsij at wiral.com; jdev at jabber.org
> > > Subject: [JDEV] ICQ Transport with Jabber 1.2
> > >
> > >
> > > Hi,
> > >
> > > I noticed your posting about getting the ICQ transport to work with Jabber
> > > 1.2.
> > > I tried too, and was able to get the ICQ Transport to compile.
> > >
> > > After starting up the jabberd daemon, I started up the ICQ transport.
> > > Everything went smoothly.
> > > I noticed that the jabberd daemon acknowledge that the ICQ transport coming
> > > online because the
> > > debug mode showed something like '...legacy server incoming connection
> > > established from .....'.
> > >
> > > On connecting a JabberIM client to my jabber server, I tried to register the
> > > ICQ service, but I get an error.
> > > The error shows .....502: Remote Server Error.
> > >
> > > Is there something I need to do?
> > > And, since there is no more separate etherx component in Jabber 1.2, where
> > > do you specify
> > > the 'secret' key, which is present in icq_transport.xml?
> > >
> > >
> > > Regards
> > > Vincent
> > >
> > >
> > > _______________________________________________
> > > jdev mailing list
> > > jdev at jabber.org
> > > http://mailman.jabber.org/listinfo/jdev
> >
> > _______________________________________________
> > jdev mailing list
> > jdev at jabber.org
> > http://mailman.jabber.org/listinfo/jdev
>
>
More information about the JDev
mailing list