happyfish100 / happyfish100/fastdfs-client-java

连接超时问题

Open
#21 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.6k
Forks
891
PR merge metrics
No merged PRs in 30d

Description

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);

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the shown TrackerClient.getStoreStorage(trackerServer) call and the FastDFS client configuration used by ClientGlobal.init(CONFIG_FILENAME). Reproduce the SocketTimeoutException and trace which endpoint the call reaches. Done means the connection-timeout cause is identified and a verified resolution is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
distributed-systems, networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.