JBoss server connection refused on localhost:1099

末鹿安然 提交于 2019-12-13 12:32:22

问题


I have an instance of JBoss 5.0.1 GA running on a remote server. The server attempts to start a batch service located on the same instance, but it reports connection refused. I found some webpage that said to add the localhost address to jndi.properties, but then the server fails to start altogether. The error code:

10:27:23,831 DEBUG [TimedSocketFactory] createSocket, hostAddr: localhost/127.0.0.1, port: 1099, localAddr: null, localPort: 0, timeout: 0
10:27:23,831 DEBUG [NamingContext] Failed to connect to localhost:1099
javax.naming.CommunicationException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException:
Failed to connect to server localhost/127.0.0.1:1099 [Root exception is java.net.ConnectException: Connection refused]]

I run the command

netstat -anpt
and the list contains the IP of this server and port 1099.

I run

telnet [IP of server] 8080
and it connects successfully.

I run

telnet [IP of server] 1099
and it returns connection refused and some weird characters.

Any ideas on what to do about this? Thanks


回答1:


  1. Log in into server via ssh and do next actions from terminal on this server.
  2. Run netstat -anpt | grep 1099
  3. Check state of 1099 port is LISTEN. Remember program name and pid ( last column output of netstat, should be something like 5812/java)
  4. Try investigate, what program used it. Run ps aux | grep xxxx where xxxx - pid from step 3
  5. Check program arguments and be sure it is Jboss instance.
  6. Check iptables settings, be sure incoming connection to 1099 is allowed from localhost ( it should be by default)
  7. try connect to port 1099
  8. Temporally disable iptables, if it possible.
  9. try connect to port 1099
  10. Check proxy settings, maybe you go to localhost through proxy.



回答2:


https://issues.jboss.org/browse/SOA-1534 seems to be the root cause. If you don't want the naming provider url to be configured, then just pass the following VM arg to override the value.-Djava.naming.provider.url= for run.sh of your jboss.



来源:https://stackoverflow.com/questions/12526110/jboss-server-connection-refused-on-localhost1099

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!