XMPP transport [beta3]

Hi there.

Seems ./lib/smack.jar contains some strange code, which results in fake resource cepteki.net shown

for my external (accessed by xmpp transport) roster members, simultaneously with my usual resource.

I’'m using svn rev.8746.

What’'s the significance of cepteki.net? Is that your site?

no, not in any way.

and i have no idea, why and from where that ‘’ cepteki.net’’ is shown as my resource.

all i’'ve found is:

— %< —

$ LC_ALL=C fgrep -i cepteki.net ./lib/smack.jar

Binary file lib/smack.jar matches

— %< —

raise eyebrow What the…

./src/org/jivesoftware/smack/XMPPConnection.java: login(userName, passWord, “Cepteki.net”);

Well thank you for pointing that out! I’'ll get it fixed!

GATE-279

.oO( seems time to change passwords)

Tell you what, try the attached version.
gateway.jar (1086750 Bytes)

Oh no no it’‘s just a resource. It’‘s not a server to connect to. It’'s no different than /Home or /Work or whatever other resource you might need. I think the dev just threw it in there before he could figure out how to get the real resource. =)

thanks, i’'ve just built rev8756

well, that’'s not the end of story

now i can’'t register on foreign jabber server via xmpp tranport due to incorrect password,

(which is surely correct, as i can login directly to server),

even after reentering registration via admin web-console nor from jabber client.

btw it’'s time to add gateway.xmpp.passwordincorrect to properties

chuckle I haven’'t scanned any of the XMPP stuff for strings that need to be translated. =)

Well I can’‘t tell you why it wouldn’‘t be working to log in at the moment. All that’'s changed is what resource would be coming up. =/ Anything in your logs?

just warns like:

— %< —

2007.07.18 00:30:48 Missing resource for key: gateway.xmpp.passwordincorrect in locale en

— %< —

and nothing after adding that propety and trying to log in.

will reset to 8735 and new smack.jar

Dooh! Fixed. (the password incorrect)

Do you have debug logs enabled?

okay, now it looks lke that – last known working for me state (rev.8746) + new smack.jar –

and no luck with registration on external server.

can someone reproduce this please ?

Well… unfortunately I can verify that it -does- work for me. =/ I tested it with a new account I just created on jabber.org. Have you tried restarting your server? (if that’‘s possible) I wonder if it’'s confused somehow.

okay, some packet dumps , a bit mangled.

xxx.xxx.xxx.xxx represents my ip address, XXX.XXX.XXX.XXX – external server’'s one, name ‘‘extserver.net’’ mangled too.

so:

  1. old smack.jar:

— %< —

1 0.000000 xxx.xxx.xxx.xxx -> XXX.XXX.XXX.XXX TCP 4658 > jabber-client Seq=0 Len=0 MSS=1460 WS=3

2 0.012261 XXX.XXX.XXX.XXX -> xxx.xxx.xxx.xxx TCP jabber-client > 4658 Seq=0 Ack=1 Win=5840 Len=0 MSS=1460 WS=0

3 0.012464 xxx.xxx.xxx.xxx -> XXX.XXX.XXX.XXX TCP 4658 > jabber-client Seq=1 Ack=1 Win=5840 Len=0

4 1.617314 xxx.xxx.xxx.xxx -> XXX.XXX.XXX.XXX Jabber Request: <stream:stream to=“extserver.net” xmlns=“jabber:client” xmlns:stream="ht

tp://etherx.jabber.org/streams" version=“1.0”>

5 1.625706 XXX.XXX.XXX.XXX -> xxx.xxx.xxx.xxx TCP jabber-client > 4658 Seq=1 Ack=118 Win=5840 Len=0

6 1.626080 XXX.XXX.XXX.XXX -> xxx.xxx.xxx.xxx Jabber Response: <stream:stream xmlns=’‘jabber:client’’ xmlns:stream=’'http://etherx.jabber

.org/streams’’ from=’‘extserver.net’’ id=’‘1362652412’’>

7 1.626236 xxx.xxx.xxx.xxx -> XXX.XXX.XXX.XXX TCP 4658 > jabber-client Seq=118 Ack=122 Win=5840 Len=0

8 2.290848 xxx.xxx.xxx.xxx -> XXX.XXX.XXX.XXX Jabber Request: jabber-client Seq=220 Ack=247 Win=5840 Len=0

11 4.228373 xxx.xxx.xxx.xxx -> XXX.XXX.XXX.XXX Jabber Request: 4658 Seq=247 Ack=411 Win=6432 Len=0

13 4.280355 XXX.XXX.XXX.XXX -> xxx.xxx.xxx.xxx Jabber Response: jabber-client Seq=411 Ack=279 Win=5840 Len=0

15 4.290070 xxx.xxx.xxx.xxx -> XXX.XXX.XXX.XXX Jabber Request: jabber-client Seq=0 Len=0 MSS=1460 WS=3

2 0.009346 XXX.XXX.XXX.XXX -> xxx.xxx.xxx.xxx TCP jabber-client > 3629 Seq=0 Ack=1 Win=5840 Len=0 MSS=1460 WS=0

3 0.009547 xxx.xxx.xxx.xxx -> XXX.XXX.XXX.XXX TCP 3629 > jabber-client Seq=1 Ack=1 Win=5840 Len=0

4 0.016028 xxx.xxx.xxx.xxx -> XXX.XXX.XXX.XXX Jabber Request: <stream:stream to=“extserver.net” xmlns=“jabber:client” xmlns:stream="ht

tp://etherx.jabber.org/streams" version=“1.0”>

5 0.044491 XXX.XXX.XXX.XXX -> xxx.xxx.xxx.xxx TCP jabber-client > 3629 Seq=1 Ack=118 Win=5840 Len=0

6 0.044880 XXX.XXX.XXX.XXX -> xxx.xxx.xxx.xxx Jabber Response: <stream:stream xmlns=’‘jabber:client’’ xmlns:stream=’'http://etherx.jabber

.org/streams’’ from=’‘extserver.net’’ id=’‘874509550’’>

7 0.045110 xxx.xxx.xxx.xxx -> XXX.XXX.XXX.XXX TCP 3629 > jabber-client Seq=118 Ack=121 Win=5840 Len=0

8 0.055685 xxx.xxx.xxx.xxx -> XXX.XXX.XXX.XXX Jabber Request: 3629 Seq=247 Ack=381 Win=5840 Len=0

12 5.094680 xxx.xxx.xxx.xxx -> XXX.XXX.XXX.XXX Jabber Request:


 13 5.096222 xxx.xxx.xxx.xxx -> XXX.XXX.XXX.XXX Jabber Request:
 14 5.110641 XXX.XXX.XXX.XXX -> xxx.xxx.xxx.xxx TCP jabber-client >

3629 Seq=247 Ack=435 Win=5840 Len=0

15 5.115403 XXX.XXX.XXX.XXX -> xxx.xxx.xxx.xxx Jabber Response: </stream:stream>

16 5.115608 xxx.xxx.xxx.xxx -> XXX.XXX.XXX.XXX TCP 3629 > jabber-client Seq=452 Len=0

17 5.115751 XXX.XXX.XXX.XXX -> xxx.xxx.xxx.xxx TCP jabber-client > 3629 Seq=263 Ack=452 Win=5840 Len=0

18 5.115862 xxx.xxx.xxx.xxx -> XXX.XXX.XXX.XXX TCP 3629 > jabber-client Seq=452 Len=0

— %< -


server said goodbye ;(

  1. just in case, between psi and extserver:

1 0.000000 xxx.xxx.xxx.xxx -> XXX.XXX.XXX.XXX TCP 45055 > jabber-client Seq=0 Len=0 MSS=1460 WS=4

2 0.014965 XXX.XXX.XXX.XXX -> xxx.xxx.xxx.xxx TCP jabber-client > 45055 Seq=0 Ack=1 Win=5840 Len=0 MSS=1460 WS=0

3 0.015017 xxx.xxx.xxx.xxx -> XXX.XXX.XXX.XXX TCP 45055 > jabber-client Seq=1 Ack=1 Win=5840 Len=0

4 0.015842 xxx.xxx.xxx.xxx -> XXX.XXX.XXX.XXX Jabber Request: <?xml version="1.0"?>

5 0.025113 XXX.XXX.XXX.XXX -> xxx.xxx.xxx.xxx TCP jabber-client > 45055 Seq=1 Ack=128 Win=5840 Len=0

6 0.025491 XXX.XXX.XXX.XXX -> xxx.xxx.xxx.xxx Jabber Response: <stream:stream xmlns=’‘jabber:client’’ xmlns:stream=’'http://etherx.jabber

.org/streams’’ from=’‘extserver.net’’ id=’‘1722352843’’>

7 0.025508 xxx.xxx.xxx.xxx -> XXX.XXX.XXX.XXX TCP 45055 > jabber-client Seq=128 Ack=122 Win=5840 Len=0

8 0.026842 xxx.xxx.xxx.xxx -> XXX.XXX.XXX.XXX Jabber Request:

-%<-

again, lots of stuff follows, all as usual.

Comments ?

Crud. =/ It’‘s because there’'s no resource being sent. (then why the crap did it work for me? unclear. might be a different server that is tolerant of different things) Either way, I thinnk I know what to do but it is not going to be easy as it turns out. GATE-280

It also appears that the port information is not being saved correctly. After changing the port and getting a “Connected” returned in the test, I get an error that shows that it is attempting to connect to the default port instead.

-Joe

the latter is probably caused by typo in XMPPSession.java:

— a/src/java/org/jivesoftware/openfire/gateway/protocols/xmpp/XMPPSession.java

+++ b/src/java/org/jivesoftware/openfire/gateway/protocols/xmpp/XMPPSession.java

@@ -47,7 +47,7 @@ public class XMPPSession extends TransportSession {

String domain;

connecthost = JiveGlobals.getProperty(“plugin.gateway.“getTransport().getType()”.connecthost”, (getTransport().getType().equals(TransportType.gt

alk) ? “talk.google.com” : “jabber.org”));

  •    connectport = JiveGlobals.getIntProperty("plugin.gateway."*getTransport().getType()*".connectp)ort", 5222);
    
  •    connectport = JiveGlobals.getIntProperty("plugin.gateway."*getTransport().getType()*".connectport", 5222);
    

if (getTransport().getType().equals(TransportType.gtalk)) {

domain = “gmail.com”;

Good god. LOL Thanks! Fixed. Also attached is a newly patched version that should behave itself a lot better. Let me know how it goes.
gateway.jar (1086985 Bytes)