1

I am using java.net.Socket.connect() to connect to an FTP server in passive mode on AppEngine. It works around 30% of the time, but I usually get the following error:

java.net.SocketException: System error: errno: 99, detail:Cannot assign requested address

It sounds as though the host simply doesn't have any available ports for outgoing connections (I am not requesting a specific port.) I get the same result when I use new java.net.Socket() I would appreciate any thoughts as to what might be happening.

1 Answer 1

1

I had a lot of same error while opening sockets for FTP, but error rate is decreased after setting socket.setSoLinger(true, 0) and socket.setReuseAddress(true).

Sign up to request clarification or add additional context in comments.

1 Comment

That may have made it somewhat better, but I am still getting the error in question more often than not.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.