Windows Socket Error (Refused Connection)

When I first set a user up on their client machine, I encounter the error “Windows Socket Error #10061”. After about 2 minutes, the client is able to connect and will remain connected for quite some time. We have been experiencing semi-frequent disconnects as well, but that may not be related. The client usually can connect at later times without problems, but randomly may encounter the windows socket error again.

I’ve attached a debug log of when I ran into the problem myself. Thank you for your time!

Hi,

it will help a lot if you post also the 1st line of the exception, maybe you want to remove some sensitive information if any.

LG

I have narrowed the problem down quite a bit now. Nothing was showing in the logs while I was trying to connect to the server machine, but right after the following message hit my logs, I was able to connect.

2007.09.25 17:19:29 Closing connection that has been idle: org.jivesoftware.openfire.nio.NIOConnection@728743 MINA Session:

(SOCKET, R: /172.30.17.28:1399, L: /172.30.0.13:5222, S: 0.0.0.0/0.0.0.0:5222)

This matches the IP of the machine that was having a problem connecting prior to the message.

Does this shine light on the problem?

That error suggests that the client did not successfully close a previous connection with the server. i am assuming that after that error the machine connected correctly again. In the future you check for active sessions on the server for the user reporting the error. If you limit each user to one session when they attempt to connect again it may kill a previous session.

That was the direction I went after I posted my last message also…you confirmed what my theory was. Thank you!

I set it up to kill idle connections after 1 minute, but I’ll see if what you said works better. This may sound funny, but what is the proper way to close a connection? We were planning on using Pidgin as our client, but I’m not sure if this is an option given these circumstances.

Thank you very much for your help!!!

I’m afraid I’m still encountering problems! I’ve been giving spark a chance hoping it would close connections better and eliminate the problems I’ve been running into. Each time I reboot a windows machine, I have to wait a couple minutes before it lets me connect.

I enabled the smack debug window, but am not too sure how to read this. On the failed connection, it would stop after “presence sent” and the type was “unavailable”. On the successful connection, there are many messages that follow. I actually got kicked off once and the debug window last showed “presence sent”. Am I making sense?

I switched out the actual server with a different one and it works perfectly! It must’ve been a faulty nic or something. It was a fresh install of the OS and everything!

Anyway…thank you very much for all of your help!

:edit:

I jump to conclusions too quickly…here’s a more recent thread as this one is unclear and marked as answered

After countless hours spent for nearly a week, I decided to install

openfire on a Fedora Core machine and am happy to say it worked

perfectly. There is something in a windows network (possibly active

directory) that Ubuntu could not play nice with. Fedora has answered

the call and is running our chat server perfectly…Thanks again for

everyone’s help!