MSN Transport drops connection on USR command

I have the IM Gateway plugin v: 1.2.3 on Openfire 3.5.2. It’s a fresh installation and i’m having problems connecting to the MSN transport. The MSN servers drop the connection when the gateway sends the USR command.

2008.07.12 09:48:49 MSN: Session established for MY_PASSPORT_ACOUNT

2008.07.12 09:48:49 session 41 sent message VER 1 MSNP11 CVR0

2008.07.12 09:48:49 MSN: Session messageSent for MY_PASSPORT_ACOUNT : VER 1 MSNP11 CVR0

2008.07.12 09:48:49 session 41 sent message CVR 2 0x0409 winnt 5.1 i386 MSNMSGR 8.1.0178 MSMSGS MY_PASSPORT_ACOUNT

2008.07.12 09:48:49 MSN: Session messageSent for MY_PASSPORT_ACOUNT : CVR 2 0x0409 winnt 5.1 i386 MSNMSGR 8.1.0178 MSMSGS MY_PASSPORT_ACOUNT

2008.07.12 09:48:49 session 41 sent message USR 3 TWN I MY_PASSPORT_ACOUNT

2008.07.12 09:48:49 MSN: Session messageSent for MY_PASSPORT_ACOUNT : USR 3 TWN I MY_PASSPORT_ACOUNT

2008.07.12 09:48:49 session 41 caught exception java.io.IOException: Se ha forzado la interrupción de una conexión existente por el host remoto

2008.07.12 09:48:49 MSN: Exception occurred for albertoavila@gmail.com : java.io.IOException: Se ha forzado la interrupción de una conexión existente por el host remoto

Error translation: The interruption of the existing connection was forced by the remote host

I read some protocol documentation (http://msnpiki.msnfanatic.com/index.php/MSNP8:Authentication#Initial_USR) wich states that the MSN server drops the connection if the USR is incorrect, i then started the wiresharksniffer and looked for the original client comman:

VER 1 MSNP15 MSNP14 MSNP13 CVR0

CVR 2 0x0409 winnt 5.1 i386 MSNMSGR 8.5.1302 MSFT MY_PASSPORT_ACCOUNT

USR 3 SSO I MY_PASSPORT_ACCOUNT

What we can see here is that the IM gateway client uses a old protocol version MSNP11 versus MSNP15, and the original client uses other auth method SSO instead of TWN.

So, maybe MSN dropped the support of the old version? is anyone else having the same problem?

If so, do you guys have planned a updated protocol version? if that’s not the problem what could it be?

Thank you guys.

Well — I’m not having any troubles connecting to MSN, so I would assume I’d be affected as well. The only thing I can think of is:

  1. if you typoed your MSN account

  2. there’s some character encoding issue with your account

Would you mind copying and pasting this to me (minus the password stuff) without hiding your MSN account? (privately, not to the forum)

hi jadestorm,

I installed the latest IM gateway plugin with openfire 3.5.2. On Admin console, testing connection of MSN: NO connection. What could be the possible reason? anything related to Firewall? I use the default host and port number. Would you please give me a hand? Thanks!

Dave

All the test is doing is a simple tcp connection to the host and port to make sure it can get through. Definitely sounds like a firewall is blocking it’s traffic. I’m no expert on firewalls so that’s about all I can really suggest. “poke a hole for that port”

I emailed you the data, but honestly, the email isn’t misstyped, i double checked, with multiple accounts.

Could be a localization problem? the server to which i connect doesn’t accept the old protocol but the one you use does?

Thank you

Hrm. Yeah, I defintely see nothing wrong with your connection. Or really any reason why you are disconnected for that matter. MSNP11, which is the protocol I use, is not -that- old. I can’t imagine what server you would be connecting to different from me. Try this:

http://www.itbsllc.com/jclaim/running.htm

And see if it works with MSN. That and pidgin. That’ll answer some questions at least. =) (whether it works with those)

Does anyone know which ports need to open from Firewall for MSN gateway to work? Thanks a lot.

I tried the java client which uses MSNP10 and worked, i used pidgin which uses MSNP9 and worked.

And here comes the weird thing, i used telnet to enter the commands by hand (the ones logged on openfire) and worked!

>>VER 1 MSNP11 CVR0

>>CVR 2 0X0409 winnt 5.1 i386 MSNMSGR 8.1.0178 MSMSGS PASSPORT_ACCOUNT

<<CVR 2 8.1.0178 8.1.0178 8.1.0178 http://msgruser.dlservice.microsoft.com/download/5/6/4/5646481F-33EF-4B08-AF00-4 904F7677B89/EN/Install_WLMessenger.exe http://get.live.com

>>USR 3 TWN I PASSPORT_ACCOUNT

<<XFR 3 NS 207.46.109.102:1863 0 65.54.239.80:1863

[[]]Host connection closed

So, maybe the connection is closed so fast that the client is unable to read the XFR command before the socked trhows the exception ?

And yes, i used telnet on the same machine than the openfire server, and i tried the msn transport after seeing that telnet worked.

Thank you for your time. Any ideas?

Port 1863 outgoing

I can telnet to MSN on my Openfire server machine FC6 and Spark client windows.

telnet messenger.hotmail.com 1863

From openfire admin console, still no luck, saying: NO connection.

Spark client: MSN grayed out.

After I open the 1863 port on my Openfire server machine, still no luck.

There also needs to be direct access on port 443 (https) — in other words no proxy requirement.

Well, the XFR command means go to this other server. It’s possible that it’s just not displaying that it got the XFR command in the logs and just wasn’t able to connect to the other server. Of course, why wouldn’t it be able to connect? On top of that I’m almost positive I can see the XFR lines in my own logs. Here’s what I see:

2008.07.02 14:59:49 Creating MSN session for jadestorm@nc.rr.com
2008.07.02 14:59:49 Logging in to MSN session for jadestorm@nc.rr.com
2008.07.02 14:59:50 MSN: Session established for jadestorm@nc.rr.com
2008.07.02 14:59:50 session 1 sent message VER 1 MSNP11 CVR0
2008.07.02 14:59:50 MSN: Session messageSent for jadestorm@nc.rr.com : VER 1 MSNP11 CVR0
2008.07.02 14:59:50 session 1 sent message CVR 2 0x0409 winnt 5.1 i386 MSNMSGR 8.1.0178 MSMSGS jadestorm@nc.rr.com
2008.07.02 14:59:50 MSN: Session messageSent for jadestorm@nc.rr.com : CVR 2 0x0409 winnt 5.1 i386 MSNMSGR 8.1.0178 MSMSGS jadestorm@nc.rr.com
2008.07.02 14:59:50 MSN: Session messageSent for jadestorm@nc.rr.com : USR 3 TWN I jadestorm@nc.rr.com
2008.07.02 14:59:50 session 1 received message VER 1 MSNP11 CVR0
2008.07.02 14:59:50 MSN: Session messageReceived for jadestorm@nc.rr.com : VER 1 MSNP11 CVR0
2008.07.02 14:59:50 MSN: Session messageReceived for jadestorm@nc.rr.com : CVR 2 8.5.1302 8.5.1302 8.1.0178 http://msgr.dlservice.microsoft.com/download/5/6/4/5646481F-33EF-4B08-AF00-4904F7677B89/EN/Install_WLMessenger.exe http://get.live.com
2008.07.02 14:59:50 MSN: Session closed for jadestorm@nc.rr.com
2008.07.02 14:59:50 MSN: Session messageReceived for jadestorm@nc.rr.com : XFR 3  NS 207.46.108.38:1863 0 65.54.239.210:1863
2008.07.02 14:59:51 MSN: Session established for jadestorm@nc.rr.com
2008.07.02 14:59:51 session 2 sent message VER 1 MSNP11 CVR0
2008.07.02 14:59:51 MSN: Session messageSent for jadestorm@nc.rr.com : VER 1 MSNP11 CVR0
2008.07.02 14:59:51 session 2 sent message CVR 2 0x0409 winnt 5.1 i386 MSNMSGR 8.1.0178 MSMSGS jadestorm@nc.rr.com
2008.07.02 14:59:51 MSN: Session messageSent for jadestorm@nc.rr.com : CVR 2 0x0409 winnt 5.1 i386 MSNMSGR 8.1.0178 MSMSGS jadestorm@nc.rr.com
2008.07.02 14:59:51 MSN: Session messageSent for jadestorm@nc.rr.com : USR 3 TWN I jadestorm@nc.rr.com
2008.07.02 14:59:51 session 2 received message VER 1 MSNP11 CVR0
2008.07.02 14:59:51 MSN: Session messageReceived for jadestorm@nc.rr.com : VER 1 MSNP11 CVR0
2008.07.02 14:59:52 MSN: Session messageReceived for jadestorm@nc.rr.com : CVR 2 8.5.1302 8.5.1302 8.1.0178 http://msgr.dlservice.microsoft.com/download/5/6/4/5646481F-33EF-4B08-AF00-4904F7677B89/EN/Install_WLMessenger.exe http://get.live.com
2008.07.02 14:59:52 MSN: Session messageReceived for jadestorm@nc.rr.com : USR 3 TWN Sct=1215024069,rver=5.5.4177.0,wp=FS_40SEC_0_COMPACT,lc=1033,id=507,ru=http:%2F%2Fmessenger.msn.com,tw=0,kpp=1,kv=4,ver=2.1.6000.1,rn=1lgjBfIL,tpf=b0735e3a873dfb5e75054465196398e0

At this point, no one has transferred a password, I’ve connected to the main node and been redirected to a new one. My original session is closed (and you’ll note that it shows as closed before it displays the XFR) and a new session (session 2) is established. I stopped before it started getting into encrypted password stuff.

Well, your logs doesn’t show any exception, it seems my server gets the exception before it has time to read the msn server messages, what could cause that? is there any version of the gateway plugin with a more detailed logging (like the exception details) which i could use to give you a more detailed data?.

Thanks.

Frankly I’m not sure how much more detailed it could possibly get. If it’s disconnecting it’s disconnecting.

Lets back up and think of a couple of other things — what version of java are you using?

I installed the bundle version of openfire, so it’s whatever version openfire 3.5.2 is bundle with.

The connection is closed by the remote end, so, maybe i’m being silly, but couldn’t it be that the problem is that exception is throwed before the socket reads the XFR ?