org.apache.thrift7.transport.TTransportException: java.net.ConnectException: Connection timed out

storm诡异问题查找:

一个经常容易报的异常:

Exception in thread "main" org.apache.thrift7.transport.TTransportException: java.net.ConnectException: Connection timed out
	at org.apache.thrift7.transport.TSocket.open(TSocket.java:183)
	at org.apache.thrift7.transport.TFramedTransport.open(TFramedTransport.java:81)
	at backtype.storm.thrift$nimbus_client_and_conn.invoke(thrift.clj:75)
	at backtype.storm.command.list$_main.invoke(list.clj:22)
	at clojure.lang.AFn.applyToHelper(AFn.java:159)
	at clojure.lang.AFn.applyTo(AFn.java:151)
	at backtype.storm.command.list.main(Unknown Source)
Caused by: java.net.ConnectException: Connection timed out
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:579)
	at org.apache.thrift7.transport.TSocket.open(TSocket.java:178)
	... 6 more

一般都是由于 storm.yaml配置文件错误导致的,但是我的集群可以正常运行,在提交topology时候报该异常,以下是查找原因的步骤:

1.执行storm list时候,显示backtype.storm.thrift - Connecting to Nimbus at 192.168.10.10:6627,原因发现了,这个192.168.10.10地址是之前该节点上得ip,而现在ip已经被修改了,但是奇怪的是,为什么会去连接旧的ip,查找storm的配置文件,一直没有找到该ip

2.用root用户执行locate storm.yaml命令, 发现/home/master/.storm/storm.yaml
这个隐藏文件,这里的ip就是以前刚才上文提到旧的ip,所以storm启动时候生成了该隐藏文件,并且运行时候去加载该文件的配置




你可能感兴趣的:(storm)