Code Monkey home page Code Monkey logo

Comments (16)

 avatar commented on June 9, 2024

java.net.SocketTimeoutException: Read timed out

from fastdfs_client.

 avatar commented on June 9, 2024

上传文件时报错

from fastdfs_client.

tobato avatar tobato commented on June 9, 2024

兄弟,提问题得全面一点,你想说啥?

from fastdfs_client.

 avatar commented on June 9, 2024

运行storage测试文件上传,报错java.net.SocketTimeoutException: Read timed out
2017-03-13 11:02:53,521 [main] DEBUG com.github.tobato.fastdfs.service.FastFileStorageClientTest -
2017-03-13 11:02:53,584 [main] DEBUG com.github.tobato.fastdfs.conn.ConnectionManager - Tracker localhost/127.0.0.1:22122
2017-03-13 11:02:53,595 [main] DEBUG com.github.tobato.fastdfs.conn.DefaultConnection - connect to localhost/127.0.0.1:22122 soTimeout=15010 connectTimeout=6010
2017-03-13 11:02:53,607 [main] DEBUG com.github.tobato.fastdfs.conn.ConnectionManager - localhost/127.0.0.1:22122 TrackerGetStoreStorageCommand
2017-03-13 11:02:53,727 [main] DEBUG com.github.tobato.fastdfs.conn.DefaultConnection - connect to /172.22.0.7:23000 soTimeout=15010 connectTimeout=6010
2017-03-13 11:02:53,728 [main] DEBUG com.github.tobato.fastdfs.conn.ConnectionManager - /172.22.0.7:23000 StorageUploadFileCommand
2017-03-13 11:03:08,775 [main] ERROR com.github.tobato.fastdfs.proto.AbstractFdfsCommand - receive conent error
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method) ~[na:1.8.0_121]
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116) ~[na:1.8.0_121]
at java.net.SocketInputStream.read(SocketInputStream.java:171) ~[na:1.8.0_121]
at java.net.SocketInputStream.read(SocketInputStream.java:141) ~[na:1.8.0_121]

然后看了storage节点的日志,提示
[2017-03-13 11:02:49] ERROR - file: storage_service.c, line: 2669, client ip: 172.22.0.1, fdht_set fail,errno: 2, error info: No such file or directory

这里的clientip就是测试端的IP

请问怎么解决?这些功能都测试通过了吗?

from fastdfs_client.

 avatar commented on June 9, 2024

谢谢

from fastdfs_client.

tobato avatar tobato commented on June 9, 2024

单元测试每次发布版本的时候都会全部跑一下的。
你用的FDFS服务端是哪个版本?

/src/test/resources/logback-test.xml
<logger name="com.github.tobato.fastdfs.proto" level="WARN" />
改成DEBUG看看报文的详细日志

from fastdfs_client.

 avatar commented on June 9, 2024

2017-03-14 10:07:21,422 [main] DEBUG com.github.tobato.fastdfs.service.FastFileStorageClientTest - ## ..##
2017-03-14 10:07:21,477 [main] DEBUG com.github.tobato.fastdfs.conn.ConnectionManager - Tracker localhost/127.0.0.1:22122
2017-03-14 10:07:21,492 [main] DEBUG com.github.tobato.fastdfs.conn.DefaultConnection - connect to localhost/127.0.0.1:22122 soTimeout=15010 connectTimeout=6010
2017-03-14 10:07:21,519 [main] DEBUG com.github.tobato.fastdfs.conn.ConnectionManager - localhost/127.0.0.1:22122 TrackerGetStoreStorageCommand
2017-03-14 10:07:21,549 [main] DEBUG com.github.tobato.fastdfs.proto.AbstractFdfsCommand - ProtoHead [contentLength=0, cmd=101, status=0]
2017-03-14 10:07:21,550 [main] DEBUG com.github.tobato.fastdfs.proto.AbstractFdfsCommand -
2017-03-14 10:07:21,553 [main] DEBUG com.github.tobato.fastdfs.proto.AbstractFdfsCommand - ProtoHead [contentLength=40, cmd=100, status=0]
2017-03-14 10:07:21,562 [main] DEBUG com.github.tobato.fastdfs.proto.mapper.ObjectMateData - dump class=com.github.tobato.fastdfs.domain.StorageNode
2017-03-14 10:07:21,563 [main] DEBUG com.github.tobato.fastdfs.proto.mapper.ObjectMateData - ----------------------------------------
2017-03-14 10:07:21,565 [main] DEBUG com.github.tobato.fastdfs.proto.mapper.ObjectMateData - FieldMateData [field=groupName, index=0, max=16, size=16, offsize=0]
2017-03-14 10:07:21,566 [main] DEBUG com.github.tobato.fastdfs.proto.mapper.ObjectMateData - FieldMateData [field=ip, index=1, max=15, size=15, offsize=16]
2017-03-14 10:07:21,567 [main] DEBUG com.github.tobato.fastdfs.proto.mapper.ObjectMateData - FieldMateData [field=port, index=2, max=0, size=8, offsize=31]
2017-03-14 10:07:21,567 [main] DEBUG com.github.tobato.fastdfs.proto.mapper.ObjectMateData - FieldMateData [field=storeIndex, index=3, max=0, size=1, offsize=39]
2017-03-14 10:07:21,575 [main] DEBUG com.github.tobato.fastdfs.proto.mapper.FdfsParamMapper - FieldMateData [field=groupName, index=0, max=16, size=16, offsize=0]group
1
2017-03-14 10:07:21,705 [main] DEBUG com.github.tobato.fastdfs.proto.mapper.FdfsParamMapper - FieldMateData [field=ip, index=1, max=15, size=15, offsize=16]172.22.0.6
2017-03-14 10:07:21,708 [main] DEBUG com.github.tobato.fastdfs.proto.mapper.FdfsParamMapper - FieldMateData [field=port, index=2, max=0, size=8, offsize=31]23000
2017-03-14 10:07:21,710 [main] DEBUG com.github.tobato.fastdfs.proto.mapper.FdfsParamMapper - FieldMateData [field=storeIndex, index=3, max=0, size=1, offsize=39]0
2017-03-14 10:07:21,730 [main] DEBUG com.github.tobato.fastdfs.conn.DefaultConnection - connect to /172.22.0.6:23000 soTimeout=15010 connectTimeout=6010
2017-03-14 10:07:21,732 [main] DEBUG com.github.tobato.fastdfs.conn.ConnectionManager - /172.22.0.6:23000 StorageUploadFileCommand
2017-03-14 10:07:21,749 [main] DEBUG com.github.tobato.fastdfs.proto.AbstractFdfsCommand - ProtoHead [contentLength=45, cmd=11, status=0]
2017-03-14 10:07:21,754 [main] DEBUG com.github.tobato.fastdfs.proto.AbstractFdfsCommand - [0, 0, 0, 0, 0, 0, 0, 0, 30, 116, 101, 120, 116, 0, 0]
2017-03-14 10:07:21,767 [main] DEBUG com.github.tobato.fastdfs.proto.AbstractFdfsCommand - 30
2017-03-14 10:07:21,769 [main] DEBUG com.github.tobato.fastdfs.proto.AbstractFdfsCommand - 0
2017-03-14 10:07:36,820 [main] ERROR com.github.tobato.fastdfs.proto.AbstractFdfsCommand - receive conent error
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method) ~[na:1.8.0_121]
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116) ~[na:1.8.0_121]
at java.net.SocketInputStream.read(SocketInputStream.java:171) ~[na:1.8.0_121]
at java.net.SocketInputStream.read(SocketInputStream.java:141) ~[na:1.8.0_121]
at java.net.SocketInputStream.read(SocketInputStream.java:127) ~[na:1.8.0_121]
at com.github.tobato.fastdfs.proto.ProtoHead.createFromInputStream(ProtoHead.java:94) ~[classes/:na]
at com.github.tobato.fastdfs.proto.AbstractFdfsComm

from fastdfs_client.

 avatar commented on June 9, 2024

同时 storage 报错[2017-03-14 10:09:21] ERROR - file: storage_service.c, line: 2669, client ip: 172.22.0.1, fdht_set fail,errno: 2, error info: No such file or directory

from fastdfs_client.

 avatar commented on June 9, 2024

FASTDFS_VERSION: 5.05

from fastdfs_client.

tobato avatar tobato commented on June 9, 2024
  1. 检查一下172.22.0.1到 172.22.0.6:23000 网络通吗?
  2. 检查安装是否正确,在172.22.0.1上测试是否能正常上传
echo "hello word" >> test.txt
fdfs_test /etc/fdfs/client.conf upload test.txt
  1. 检查服务端,客户端group配置是否匹配

from fastdfs_client.

 avatar commented on June 9, 2024

找到解决办法了,顺便问一下,为什么控制台打印出来的日志有???,怎么设置正确的编码?

from fastdfs_client.

tobato avatar tobato commented on June 9, 2024

研究下logback? 我们在工作当中没有发现你说的这个问题。

from fastdfs_client.

mark988 avatar mark988 commented on June 9, 2024

你好,我使用的是你提供的 jar 包。放到项目里,启动springboot时,报

.springframework.beans.BeanInstantiationException: Failed to instantiate [com.github.tobato.fastdfs.conn.ConnectionPoolConfig]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: com.github.tobato.fastdfs.conn.ConnectionPoolConfig.setJmxNameBase(Ljava/lang/String;)V

这个是什么原因? 项目之前是可以启动的,添加上jar 后就启动不起来了。(我确定jar已经下载并依赖。)

from fastdfs_client.

mark988 avatar mark988 commented on June 9, 2024

您好,可以留个QQ或者微信么? 希望能和你聊聊这个问题。 QQ 80692072

from fastdfs_client.

mark988 avatar mark988 commented on June 9, 2024

tobato.fastdfs.conn.ConnectionPoolConfig]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: com.github.tobato.fastdfs.conn.ConnectionPoolConfig.setJmxNameBase
我本地已经看到这个jar 且代码里存在的。但是放到工程里就是认为不存在。

from fastdfs_client.

tobato avatar tobato commented on June 9, 2024

你没有使用maven或者类似的依赖配置管理工具吗?

检查一下commons-pool的依赖版本commons-pool2-2.5.0.jar

from fastdfs_client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.