fastdfs-client-java icon indicating copy to clipboard operation
fastdfs-client-java copied to clipboard

连接超时问题

Open andywang2014 opened this issue 8 years ago • 6 comments

StorageServer storageServer = trackerClient.getStoreStorage(trackerServer); 当执行到上面这行代码时会报超时错误: java.net.SocketTimeoutException: connect timed out

我检查了fdfs的服务器ip和端口,都没问题。trackerClient和trackerServer都可以获取到对象的。 完整代码如下: ClientGlobal.init(CONFIG_FILENAME); trackerClient = new TrackerClient(); trackerServer = trackerClient.getConnection(); if (trackerServer == null) { throw new IllegalStateException("getConnection return null"); }

        **StorageServer storageServer = trackerClient.getStoreStorage(trackerServer);**
        if (storageServer == null) {
            throw new IllegalStateException("getStoreStorage return null");
        }
        storageClient = new StorageClient1(trackerServer, storageServer);

andywang2014 avatar May 24 '17 09:05 andywang2014

另:防火墙之类的也检查过,OK的

andywang2014 avatar May 24 '17 09:05 andywang2014

同样的问题

luoluo502 avatar Jun 02 '17 06:06 luoluo502

我也遇到这个问题。我是通过自已本机的虚拟机搭建的,测试可以下载,但是用java client连不上,说超时。

cy503328434 avatar Jun 15 '17 01:06 cy503328434

解决了吗?

xinjinbao avatar Sep 28 '17 12:09 xinjinbao

在高并发的时候经常遇到

0312birdzhang avatar Feb 24 '18 02:02 0312birdzhang

我也遇到同样的问题,服务器用的是阿里云的 防火墙关了...

xingyun888888 avatar Mar 28 '18 07:03 xingyun888888