fastdfs报java.net.SocketTimeoutException: connect timed out异常
connect to server xxx.xxx.xxx.xx:22122 fail java.net.SocketTimeoutException: connect timed out at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect( DualStackPlainSocketImpl.java:85) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress( AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
1、首先检查一下防火墙是否关闭
#关闭防火墙命令
service iptables stop
2、如果确定防火墙关闭了,那可以在写配置文件的时候,设置连接超时的时间大一点
程序端配置fastdfs的http连接超时时间以及tracker与storage网络通信超时时间过小导致
#http连接超时时间 eddue.fastdfs.connect_timeout_in_seconds = 5 #tracker与storage网络通信超时时间 eddue.fastdfs.network_timeout_in_seconds = 30