I am tunnelling into a remote server to access a private api. I am using the following command (by typing it into Terminal) to forward a single port: ssh -L $local_port:$host:$port -v
. Tried many different local ports (9000, 9001 etc).
I can use the api directly from browser or proxied over nginx for hours without issue. If access it from a playframework app, the ssh session prints "select: Invalid argument" and closes the connection.
Here is what the log looks when it happens:
debug1: channel 1016: free: direct-tcpip: listening port 9001 for ec2-xxx.compute-1.amazonaws.com port 9000, connect from 127.0.0.1 port 65349, nchannels 1
select: Invalid argument
Connection to ec2-xxx.compute-1.amazonaws.com closed.
Transferred: sent 243904, received 64728 bytes, in 87.8 seconds
Bytes per second: sent 2778.0, received 737.2
debug1: Exit status -1
The play app is using AsyncHttpClient to make GET requests localhost:$local_port.
Is there a fix to this on the connection side? e.g. make ssh ignore the error and continue connected?