本文介绍了在localhost:1099上拒绝JBoss服务器连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个在远程服务器上运行的JBoss 5.0.1 GA实例。服务器尝试启动位于同一实例上的批处理服务,但报告连接被拒绝。我发现一些网页说要将localhost地址添加到jndi.properties,但是服务器无法完全启动。错误代码:
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]]
我运行命令
netstat -anpt
,该列表包含此服务器的IP和端口1099.
and the list contains the IP of this server and port 1099.
我运行
telnet [IP of server] 8080
并成功连接。
我运行
telnet [IP of server] 1099
并返回拒绝连接和一些奇怪的字符。
and it returns connection refused and some weird characters.
关于如何处理的任何想法?谢谢
Any ideas on what to do about this? Thanks
推荐答案
- 通过ssh登录服务器,并在此服务器上从终端执行下一步操作。
- 运行
netstat -anpt | grep 1099
- 检查1099端口的状态是否为LISTEN。记住程序名和pid(netstat的最后一列输出,应该类似于
5812 / java
) - 试试调查,使用了什么程序它。运行
ps aux | grep xxxx
其中xxxx - 来自第3步的pid - 检查程序参数并确保它是Jboss实例。
- 检查
iptables
设置,确保允许从localhost到1099的传入连接(默认情况下应该是这样) - 尝试连接到端口1099
- 暂时禁用iptables,如果可能的话。
- 尝试连接到端口1099
- 检查代理设置,也许你通过代理去localhost。
- Log in into server via ssh and do next actions from terminal on this server.
- Run
netstat -anpt | grep 1099
- Check state of 1099 port is LISTEN. Remember program name and pid ( last column output of netstat, should be something like
5812/java
) - Try investigate, what program used it. Run
ps aux | grep xxxx
where xxxx - pid from step 3 - Check program arguments and be sure it is Jboss instance.
- Check
iptables
settings, be sure incoming connection to 1099 is allowed from localhost ( it should be by default) - try connect to port 1099
- Temporally disable iptables, if it possible.
- try connect to port 1099
- Check proxy settings, maybe you go to localhost through proxy.
这篇关于在localhost:1099上拒绝JBoss服务器连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!