u014755816
u014755816
2016-02-18 05:38

FastDFS问题,上传连接超时

  • java
  • native
  • fastdfs

java代码报错如下:
java.net.SocketTimeoutException: connect timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at net.mikesu.fastdfs.client.StorageClientImpl.getSocket(StorageClientImpl.java:25)
at net.mikesu.fastdfs.client.StorageClientImpl.upload(StorageClientImpl.java:69)
at net.mikesu.fastdfs.FastdfsClientImpl.upload(FastdfsClientImpl.java:71)
at net.mikesu.fastdfs.FastdfsClientImpl.upload(FastdfsClientImpl.java:274)
at net.mikesu.fastdfs.FastdfsClientImpl.upload(FastdfsClientImpl.java:270)
at net.mikesu.fastdfs.FastdfsClientTest.testFastdfsClient(FastdfsClientTest.java:27)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)

FastDFS的storage日志文件报错下如:
FastDFS的tracker日志文件和storage的日志文一样的,如下:
[2016-02-18 10:52:51] INFO - local_host_ip_count: 2, 127.0.0.1 192.168.254.136
[2016-02-18 10:53:07] INFO - file: tracker_relationship.c, line: 374, selecting leader...
[2016-02-18 10:53:08] INFO - file: tracker_relationship.c, line: 392, I am the new tracker leader 192.168.254.136:22122
[2016-02-18 10:54:55] ERROR - file: tracker_nio.c, line: 254, client ip: 192.168.254.1, recv failed, errno: 104, error info: Connection reset by peer
[2016-02-18 11:00:01] ERROR - file: tracker_nio.c, line: 254, client ip: 192.168.254.1, recv failed, errno: 104, error info: Connection reset by peer

我想是不是client ip:的问题,因为我的服务器IP为192.168.254.136,但client ip是192.168.254.1,如果是这个问题请大家告诉我一下,在哪里修改。

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

2条回答