Port Forwarding misses disconnects
Posted: 19. Jan 2016, 00:13
Odd issue with port forwarding. Windows Host - tried on both Windows 10 and Windows 7.1 Professional. Guests are all Ubuntu 14.0.4 LTS 64bit. Latest version of VirtualBox (downloaded 1/10/2016)
We want one guest to communicate with another guest. The guest we want to be the 'server' is listening on port 3000, so we set up a port forwarding in Virtual box to forward port 5000 on the host to port 3000 in the guest the server is running in. On the 'client' guest, we connect to the 'server' guest by issuing the TCP connection to the host ip address, port 5000. This all works fine, no issues. The problem is if the 'server' guest closes the TCP connection, the 'client' guest thinks the connection is still up. Normally the 'client' will automatically recycle and attempt to reconnect to the 'server', but since it doesn't know the connection is gone, it doesn't do this. Oddly, if the 'client' closes the connection, the server gets the message and recycles the connection. We have confirmed it is a stuck socket connection using netstat - the 'client' guest ubuntu reports the connection to port 5000 is established, even though 'server' guest ubuntu netstat reports no active connections on port 3000.
Any ideas?
We want one guest to communicate with another guest. The guest we want to be the 'server' is listening on port 3000, so we set up a port forwarding in Virtual box to forward port 5000 on the host to port 3000 in the guest the server is running in. On the 'client' guest, we connect to the 'server' guest by issuing the TCP connection to the host ip address, port 5000. This all works fine, no issues. The problem is if the 'server' guest closes the TCP connection, the 'client' guest thinks the connection is still up. Normally the 'client' will automatically recycle and attempt to reconnect to the 'server', but since it doesn't know the connection is gone, it doesn't do this. Oddly, if the 'client' closes the connection, the server gets the message and recycles the connection. We have confirmed it is a stuck socket connection using netstat - the 'client' guest ubuntu reports the connection to port 5000 is established, even though 'server' guest ubuntu netstat reports no active connections on port 3000.
Any ideas?