Almost immediate disconnects caused by port scanning
Posted: Thu Aug 04, 2011 10:26 pm
I am running build 384 on four different servers(two Win2003, two Win2008) in sftp mode, in different environments. Both started dropping incoming connections almost immediately after I tried to put them into a load balanced pool, but the load balancer itself isn't the issue. Either the connection doesn't quite complete, or it does and almost immediately disconnects. The client gets a generic "The server unexpectedly closed the connection." type of error in that case.
I have been able to replicate the problem by setting up a test server and having a port scanner do a tcp connect to port 22 every 2 seconds. It just connects and immediately disconnects, the same way the load balancer probes do. (I'm doing "nmap -sT -p 22 X.X.X.X" every two seconds.) If the every-two-seconds port scan is on, I have the problem. If I turn it off, I don't have the problem.
Here's an example from the logs:
[20110804 15:34:41] [(load balancer)] connecting
[20110804 15:34:41] [(sftp client)] connected
[20110804 15:34:41] [(load balancer)] disconnected ((null))
[20110804 15:34:43] [(load balancer)] connecting
[20110804 15:34:43] [(load balancer)] connected
[20110804 15:34:43] [(load balancer)] disconnected ((null))
[20110804 15:34:43] [(sftp client)] connecting
[20110804 15:34:43] [(sftp client)] connected
[20110804 15:34:44] [(sftp client)] user 'username' sent
[20110804 15:34:44] [(sftp client)] USER-PASS (username) success
[20110804 15:34:44] [(sftp client)] LIST success - /
[20110804 15:34:44] [(sftp client)] disconnected (username)
[20110804 15:34:45] [(load balancer)] connecting
[20110804 15:34:45] [(load balancer)] connected
[20110804 15:34:45] [(load balancer)] disconnected ((null))
Is there some setting I'm missing that would cause this?
Thank you.
I have been able to replicate the problem by setting up a test server and having a port scanner do a tcp connect to port 22 every 2 seconds. It just connects and immediately disconnects, the same way the load balancer probes do. (I'm doing "nmap -sT -p 22 X.X.X.X" every two seconds.) If the every-two-seconds port scan is on, I have the problem. If I turn it off, I don't have the problem.
Here's an example from the logs:
[20110804 15:34:41] [(load balancer)] connecting
[20110804 15:34:41] [(sftp client)] connected
[20110804 15:34:41] [(load balancer)] disconnected ((null))
[20110804 15:34:43] [(load balancer)] connecting
[20110804 15:34:43] [(load balancer)] connected
[20110804 15:34:43] [(load balancer)] disconnected ((null))
[20110804 15:34:43] [(sftp client)] connecting
[20110804 15:34:43] [(sftp client)] connected
[20110804 15:34:44] [(sftp client)] user 'username' sent
[20110804 15:34:44] [(sftp client)] USER-PASS (username) success
[20110804 15:34:44] [(sftp client)] LIST success - /
[20110804 15:34:44] [(sftp client)] disconnected (username)
[20110804 15:34:45] [(load balancer)] connecting
[20110804 15:34:45] [(load balancer)] connected
[20110804 15:34:45] [(load balancer)] disconnected ((null))
Is there some setting I'm missing that would cause this?
Thank you.