How to solve SocketException: Permission denied: connect
Posted
by
luxinxian
on Server Fault
See other posts from Server Fault
or by luxinxian
Published on 2014-05-28T01:53:20Z
Indexed on
2014/05/28
3:32 UTC
Read the original article
Hit count: 456
I recently encountered a problem that is giving me a headache and I need help ...
The System consists of two subsystems, called A and B, each running on a standalone Tomcat instance and currently running on the same machine. A invokes B's service via Spring httpInvoker
(i.e. over HTTP). B system also invokes the other system's services via HTTP.
Symptoms:
the system starts to run and appears to work normally for around 10-15 days;
the system will run for a period of time after an exception:
org.springframework.remoting.RemoteAccessException: Could not access HTTP invoker remote service at [http://xxx.xxx.xxx.xxx/remoting/call];
The nested exception is
java. net.SocketException: **Permission denied: connect**
when the exception occurs, the system continues. This happens always, not only occasionally. (It looks like some resources are exhausted, but CPU rate < 5%, memory < 15%, network < 5%).
when the system call between A and B fails, the B system call over HTTP to an external service also failed, with the same exception.
Restarting both Tomcat services makes the whole system work properly.
So repeatedly following steps 1 - 5, I have not found the root reason.
Environment:
- windows 2008 R2
- tomcat7.0.42 x86_64
- oralce-jdk-1.7.0_40
Any ideas?
© Server Fault or respective owner