java.net.SocketTimeoutException: connect timed outUpload file "1003.png"fails: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)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at org.csource.fastdfs.ClientGlobal.getSocket(ClientGlobal.java:107)
at org.csource.fastdfs.StorageServer.<init>(StorageServer.java:45)
at org.csource.fastdfs.TrackerClient.getStoreStorage(TrackerClient.java:158)
at org.csource.fastdfs.StorageClient.newWritableStorageConnection(StorageClient.java:1938)
at org.csource.fastdfs.StorageClient.do_upload_file(StorageClient.java:703)
at org.csource.fastdfs.StorageClient.upload_file(StorageClient.java:208)
at org.csource.fastdfs.StorageClient.upload_file(StorageClient.java:226)
at com.chuanliu.platform.activity.fm.manager.FastDFSTest.uploadFile(FastDFSTest.java:62)
at com.chuanliu.platform.activity.fm.manager.FastDFSTest.main(FastDFSTest.java:30)
用命令实现上传,用JAVA程序上传出现上述问题,最后发现有一个storage的端口:23000没有在linux机器的防火墙里没有配置规则。