我有一个在远程服务器上运行的 JBoss 5.0.1 GA 实例。服务器尝试启动位于同一实例上的批处理服务,但报告连接被拒绝。我发现一些网页说将本地主机地址添加到 jndi.properties,但是服务器完全无法启动。错误代码:
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
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.
对此有何想法?谢谢
- 通过 ssh 登录服务器并从该服务器上的终端执行下一步操作。
- Run
netstat -anpt | grep 1099
- 检查1099端口状态是否为LISTEN。记住程序名称和 pid(netstat 的最后一列输出,应该类似于
5812/java
)
- 尝试调查一下,什么程序使用了它。跑步
ps aux | grep xxxx
其中 xxxx - 步骤 3 中的 pid
- 检查程序参数并确保它是 Jboss 实例。
- Check
iptables
设置,确保允许从 localhost 传入到 1099 的连接(默认情况下应该如此)
- 尝试连接到端口1099
- 如果可能的话,暂时禁用 iptables。
- 尝试连接到端口1099
- 检查代理设置,也许您通过代理访问本地主机。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)