This thread is archived
18 Replies Last post: Dec 5, 2005 11:12 AM by pmac2  
  8 posts since
Nov 19, 2005
Currently Being Moderated

Nov 19, 2005 7:11 AM

S2S problem, Connection closed before session established

Hi there,

 

We have a big wi-fi network in Athens Greece and we want to use JM as an IM service. Our network consists of nodes which get their static IP’s from the 10.xxx.xxx.xxx range, and which root together through multiple routers in the network. Although we have a DNS system, we would like to use IP’s for more stability when using network services.

 

Our goal is to use the S2S feature of JM so user-clients could connect to different JM servers (they could choose the closest server to their machine) and connect with each other. We know that we can not use the same database for multiple JM servers, though it would be the most appropriate solution to our problem. (could this be something that we will be able to use in the future?)

 

One single JM setup works fine and fast. When we tried to put up a second setup in a different server the result was disappointing: when users of server B would add a user from server A to their client, the connection between the server was one-way, as well as unstable. In the JM web interface window, we could see that in the server session window there was a one-way connection (incoming to server A, outgoing from server B).

 

The PCs, where the servers function, are Windows XP systems, running Java1.5.0.x, and are not firewalled. When we run JM (versions: 2.3.0, 2.2.2, and other latest nightly versions/18-11-2005) we get the message:

“Connection closed before session established

Socket[addr=/10.42.44.1,port=4980,localport=5269]

Connection closed before session established

Socket[addr=/10.42.44.1,port=4981,localport=5269]”

 

Please note that it has been tested that our server ports are open and that we have also tried the server-to-server function by interfering with the settings (TLS/SSL disabled, increasing “connection timeout” (xmpp.server.read.timeout). We have never used any domain names for the servers, despite the fact that we have DNS’.

 

Is there something that we should look for in the settings and what exactly should we do? Are there any nightly/beta/official versions that could solve this problem?

 

Thank you for your time.

Gaston Dombiak Jiver 3,803 posts since
Sep 26, 2001
Currently Being Moderated
Nov 19, 2005 8:15 AM in response to: vassilis
Re: S2S problem, Connection closed before session established

Hey vassilis,

 

Make sure that both servers are using the same shared secret or shared key. You may also want to enable the debug log (from the admin console) that will let you collect more information when a s2s connection is being negotiated. Open the logs-debug.log file and post the information you are getting.

 

Regards,

 

  -- Gato

  29 posts since
Jul 31, 2005
Currently Being Moderated
Nov 24, 2005 2:46 AM in response to: vassilis
Re: S2S problem, Connection closed before session established

Hi

I have the same problem, only:

In version 2.2.2 works s2s, but to estalish connection server need about 30 seconds.

In version 2.3.0 works only incoming connections.

Gaston Dombiak Jiver 3,803 posts since
Sep 26, 2001
Currently Being Moderated
Nov 30, 2005 8:31 AM in response to: vassilis
Re: S2S problem, Connection closed before session established

Hey vassilis,

 

Could you enable the debug log in both servers, stop and start the servers and then try establishing s2s communication again? I will need you to post the debug info of each server so I can see what''s going on.

 

BTW, when a server connects to a remote server it will use 2 connections. One for sending packets and another one for receiving packets. If you only try to send a packet to the other server then you will only have 1 outgoing connection. If the remote server sends a packet to your server then the other connection is created.

 

Regards,

 

  -- Gato

Gaston Dombiak Jiver 3,803 posts since
Sep 26, 2001
Currently Being Moderated
Dec 5, 2005 11:07 AM in response to: vassilis
Re: S2S problem, Connection closed before session established

Hey vassilis,

 

Which server version are you using? Is your server name 10.80.185.70? Are you trying to send a message to a remote server whose domain is 10.84.230.50? Which components do you have in your server? What are the domains of those components?

 

Thanks,

 

  -- Gato

  3 posts since
Nov 30, 2005
Currently Being Moderated
Nov 30, 2005 8:23 AM in response to: vassilis
Re: S2S problem, Connection closed before session established

Sounds like this is a common problem.  I''m experiencing the exact same thing.  None of the clients are able to connect to the server.  Everytime an attempt is made I get a similar message like vassilis has documented.  Any suggestions on how to proceed?

  3 posts since
Nov 30, 2005
Currently Being Moderated
Nov 30, 2005 8:45 AM in response to: vassilis
Re: S2S problem, Connection closed before session established

I''m currently only running a single server.  I disabled the server 2 server function, but this is what I get in  my debug log:

 

2005.11.30 07:37:40 Connect Socket[addr=/192.168.1.118,port=4037,localport=5222]

2005.11.30 07:37:40 Error sending packet to remote server:

java.lang.Exception: Failed to create connection to remote server

at org.jivesoftware.messenger.server.OutgoingSessionPromise.createSessionAndSendPa cket(OutgoingSessionPromise.java:136)

at org.jivesoftware.messenger.server.OutgoingSessionPromise.access$300(OutgoingSes sionPromise.java:40)

at org.jivesoftware.messenger.server.OutgoingSessionPromise$1$1.run(OutgoingSessio nPromise.java:94)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

 

It repeats for every user that tried to login.

Gaston Dombiak Jiver 3,803 posts since
Sep 26, 2001
Currently Being Moderated
Nov 30, 2005 8:50 AM in response to: wpossie
Re: S2S problem, Connection closed before session established

Hey wpossie,

 

With the little information that you provided my guess is that your server name is not 192.168.1.13. Remember that if your server name is A (you can check the server name that you are using in the main page of the Admin Console) then all users connected to your server will be of the form anyname@A. So if you are trying to use any other value after the @ then the server will assume that your packet was intended to a remote server thus the s2s communication.

 

Regards,

 

  -- Gato

  3 posts since
Nov 30, 2005
Currently Being Moderated
Nov 30, 2005 9:13 AM in response to: Gaston Dombiak
Re: S2S problem, Connection closed before session established

Gato;

 

That seems to be my problem.  I had to change the server name on the admin console to 192.168.1.13, because I get a script error when trying to connect using larry.weir@titan from the client (soapbox).  Now I''m having problems seeing everyone on my group...  I can see everyone in the session area in the admin console, but I can''t see everyone on the client.  Some have locks beside their name and others don''t.   We have two type os clients psi and soapbox in our establishment.  Everyone in the company is a member of the AESI group and when they login everyone should be logging into that group.  Unfortunately we only have some that are showing up.  Any suggestions?

Bronze 85 posts since
Sep 15, 2005
Currently Being Moderated
Nov 30, 2005 2:09 PM in response to: wpossie
Re: S2S problem, Connection closed before session established

wpossie,

 

I''m having the same issues as you are.  My hostname is listed properly but I still get the same "Error sending packet to remote server".   I only have 1 server and am not going S2S.  it''s frustrating...  Any help would be greatly appreciated!

 

Thanks.

PM.

Gaston Dombiak Jiver 3,803 posts since
Sep 26, 2001
Currently Being Moderated
Dec 5, 2005 11:03 AM in response to: pmac2
Re: S2S problem, Connection closed before session established

Hey PM,

 

Can you tell us the name of your server and post some packets that the server is sending and the info you have in the log files? Once we have that information we will be able to help you out. Remember to enable the debug log from the admin console so we can trace the s2s communication.

 

Regards,

 

  -- Gato

Bronze 85 posts since
Sep 15, 2005
Currently Being Moderated
Dec 5, 2005 11:12 AM in response to: Gaston Dombiak
Re: S2S problem, Connection closed before session established

Gato,

 

Unfortunately, I acquired some new hardware that had dual processors and a gig card ( i was using single proc and 100MB) and rebuilt the Jive server with an embedded database so I wouldn''t be able to get that info anytime soon. 

 

Fortunately, I am no longer having these issues on the new build.  I think I did post the debug log in another thread.  I''ll see if I can find it and post an excerpt here.

 

Thanks for your help!

PM.

More Like This

  • Retrieving data ...