You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Windows10环境下IPFS私有网络节点连接超时问题求助

Troubleshooting Your IPFS Private Network Connection Issue

Let’s break down what’s probably blocking your nodes from connecting and fix it step by step:

1. Firewall & Port Forwarding (Most Common Culprit)

The i/o timeout error makes it clear the second node can’t reach the first one’s 4001 port. Even if the port shows as listening on the first machine, Windows Firewall or your home router is likely blocking the incoming connection:

  • Windows Firewall Setup:
    On the first Windows 10 machine:
    1. Open Windows Defender Firewall → Advanced Settings
    2. Go to Inbound Rules → New Rule
    3. Select "Port", then "TCP", enter 4001 as the specific local port
    4. Choose "Allow the connection", apply to all network types, and name the rule (e.g., "IPFS Swarm TCP 4001")
    5. Repeat this for UDP port 4001 (IPFS uses UDP for NAT traversal too)
  • Router Port Forwarding:
    If your first machine is behind a home router, you need to forward port 4001 (TCP + UDP) from the router’s public IP to your first machine’s local IP. Log into your router’s admin panel, look for "Port Forwarding" or "Virtual Server" settings to set this up.

2. Verify Swarm.key Consistency

All nodes in an IPFS private network must use the exact same swarm.key. Even a single extra space or newline can break connections:

  • On both machines, open the .ipfs/swarm.key file (usually in C:\Users\<YourUsername>\.ipfs\) in a plain text editor and compare the content line-for-line
  • Alternatively, use Windows command prompt to do a binary comparison:
    fc /b C:\Users\<FirstUser>\.ipfs\swarm.key C:\Users\<SecondUser>\.ipfs\swarm.key
    
    If any differences are found, copy the working swarm.key from the first node to the second and restart both daemons.

3. Check Node Address Configuration

Ensure the first node is listening for connections on all network interfaces:

  • On the first node, run this command to check swarm addresses:

    ipfs config Addresses.Swarm
    

    You should see /ip4/0.0.0.0/tcp/4001 in the output (this tells IPFS to listen on all IPv4 interfaces). If not, add it with:

    ipfs config Addresses.Swarm --append "/ip4/0.0.0.0/tcp/4001"
    

    Then restart the IPFS daemon.

  • Also, confirm the first node recognizes its public IP:
    Run ipfs id and check if the Addresses section includes your public IP entry (/ip4/62.122.132.55/tcp/4001/ipfs/QmYY9U3JFuMykjRjKd1jg6aPCmcf2UYpbaS8fHpwkAVvia). If not, manually add it:

    ipfs config Addresses.Swarm --append "/ip4/62.122.132.55/tcp/4001"
    

4. Validate Bootstrap List & Basic Connectivity

  • On the second node, double-check the bootstrap list has your first node:
    ipfs bootstrap list
    
    If the entry is missing, re-run the bootstrap add command:
    ipfs bootstrap add /ip4/62.122.132.55/tcp/4001/ipfs/QmYY9U3JFuMykjRjKd1jg6aPCmcf2UYpbaS8fHpwkAVvia
    
  • Before trying ipfs swarm connect, test basic port reachability from the second node:
    Use telnet (enable it first via Windows Features if needed):
    telnet 62.122.132.55 4001
    
    If this fails, go back to fixing firewall/port forwarding. If it works, the ipfs swarm connect should succeed.

5. About the Reprovider Error

The failed to reprovide: failed to find any peer in table error is just a side effect of the nodes not connecting. Once you fix the connection issue, this error will disappear automatically.


内容的提问来源于stack exchange,提问作者Alex

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.08 15:32:35