fastdfs java client error

tracker,storage运行正常,利用fdfs_test程序做测试,可以正常上传下载文件。

 

tracker的端口配置

 

# HTTP port on this tracker server
http.server_port=80

 

 

 

storage的端口配置

 

# the port of the web server on this storage server
http.server_port=80

 

 

 

centos上的22122,23000两个端口,在iptables都已打开。

 

利用官方fastdfs-client-java,配置文件如下:

 

 

connect_timeout = 2
network_timeout = 30
charset = ISO8859-1
http.tracker_http_port = 80
http.anti_steal_token = no
http.secret_key = FastDFS1234567890
tracker_server = 192.168.1.102:22122
#tracker_server = 192.168.0.119:22122

 

 

 

执行Test测试异常,异常信息,实在在困惑???????

 

connect to server 192.168.1.102: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:339)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:579)
	at org.csource.fastdfs.TrackerGroup.getConnection(TrackerGroup.java:47)
	at org.csource.fastdfs.TrackerGroup.getConnection(TrackerGroup.java:72)
	at org.csource.fastdfs.TrackerClient.getConnection(TrackerClient.java:58)
	at org.csource.fastdfs.test.Test.main(Test.java:62)
connect to server 192.168.1.102: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:339)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:579)
	at org.csource.fastdfs.TrackerGroup.getConnection(TrackerGroup.java:47)
	at org.csource.fastdfs.TrackerGroup.getConnection(TrackerGroup.java:72)
	at org.csource.fastdfs.TrackerClient.getConnection(TrackerClient.java:58)
	at org.csource.fastdfs.TrackerClient.getStoreStorage(TrackerClient.java:91)
	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:164)
	at org.csource.fastdfs.StorageClient.upload_file(StorageClient.java:132)
	at org.csource.fastdfs.StorageClient.upload_file(StorageClient.java:114)
	at org.csource.fastdfs.StorageClient1.upload_file1(StorageClient1.java:67)
	at org.csource.fastdfs.test.Test.main(Test.java:68)
org.csource.common.MyException: getStoreStorage fail, errno code: 0
	at org.csource.fastdfs.StorageClient.newWritableStorageConnection(StorageClient.java:1941)
	at org.csource.fastdfs.StorageClient.do_upload_file(StorageClient.java:703)
	at org.csource.fastdfs.StorageClient.upload_file(StorageClient.java:164)
	at org.csource.fastdfs.StorageClient.upload_file(StorageClient.java:132)
	at org.csource.fastdfs.StorageClient.upload_file(StorageClient.java:114)
	at org.csource.fastdfs.StorageClient1.upload_file1(StorageClient1.java:67)
	at org.csource.fastdfs.test.Test.main(Test.java:68)

 

 

 

——————————

很惭愧,linux iptables 修改之后,忘了使其生效,纠结了半天的问题是因一个手下误。

posted @ 2016-07-13 17:48  maventalker  阅读(284)  评论(0编辑  收藏  举报