-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The relay system is not working properly #10615
Comments
IIRC: Since libp2p relay v2 were introduced, relays cannot be used to download content. The amount of data they relay is very limited and serves only to perform hole-punching. So if content cannot be retrieved, it is likely because hole-punching is not working. Assuming this is the issue, I'm not sure we can do much... |
The fact that your VPS node runs a super old Kubo version does not help either... probably it does not know how to hole-punch using the new protocols. |
Oops, seems like we needed more information for this issue, please comment with more details or this issue will be closed in 7 days. |
Filled libp2p/docs#387 to improve docs about Relays and their limits / self-hosting concerns |
Oops, seems like we needed more information for this issue, please comment with more details or this issue will be closed in 7 days. |
This issue was closed because it is missing author input. |
Checklist
Installation method
dist.ipfs.tech or ipfs-update
Version
Config
Under the description.
Description
It is not possible download contents over relay nodes.
Notice: I have not tested this behavior on the latest Kubo version 0.32.1 because its content-providing system appears to be broken, and added content cannot often be found on the IPFS network.
I attempted to publish and download IPFS content on nodes that are not directly accessible from the internet and rely on the relaying system.
My setup includes two PCs behind symmetric NAT in the same network. We'll call these PCs Alice and Bob. Both are running the Kubo daemon v0.31 with the --profile server option to prevent local LAN discovery. I also have a VPS with a publicly accessible Kubo node running v0.27, used for bootstrapping and as a peering node. The network topology is as follows:
Node Bob
On Bob, I ran the command:
~$ ipfs id
{ "ID": "12D3KooWDgQNimVrtJyggCUpjamydDL7rtEYpLZ1nyCPkYYuYRLJ", "PublicKey": "CAESIDlkmJtYnGs0J7N1my9VhlTZJ3Q+AkCFOxl5sDi6MbF3", "Addresses": [ "/ip4/89.38.129.138/tcp/4001/p2p/12D3KooWBaEMaZBRX3VumWcan4XPeRoVunCYhFtFTTm3EzozcCSp/p2p-circuit/p2p/12D3KooWDgQNimVrtJyggCUpjamydDL7rtEYpLZ1nyCPkYYuYRLJ", "/ip4/93.127.215.160/tcp/4001/p2p/12D3KooWSobLujLpmfyXBx29ipzPwYDseFgeVk6fbjvC6E1KCDcP/p2p-circuit/p2p/12D3KooWDgQNimVrtJyggCUpjamydDL7rtEYpLZ1nyCPkYYuYRLJ", ]...}
Alice successfully obtained /p2p-circuit/ addresses for connecting via relay.
I then published content to the IPFS network using the command:
ipfs add ~/Downloads/Crysis.png added bafybeib75xrttell65kx7yzlfkpqzagxdlelbtqsaxfejr5rdodzvyauqe Crysis.png 1.42 MiB / 1.42 MiB [===================================================================] 100.00%
Node Alice
On Alice, I checked if the node obtained a relay address:
~$ ipfs id
{ "ID": "12D3KooWBroodnZHhgbT4UdCWvYx5Yo4pAQSEvdvPsBBM9JWteRq", "PublicKey": "CAESIB5XhbF2yOom/SLSp6RONtaCDOHlK+MI65rCD17HFIY8", "Addresses": [ "/ip4/2.228.138.36/udp/23007/quic-v1/p2p/12D3KooWAh4c5PbWH4tmrC8etSUzsJrvrFF8bpDzTvWcEmmYcBNF/p2p-circuit/p2p/12D3KooWBroodnZHhgbT4UdCWvYx5Yo4pAQSEvdvPsBBM9JWteRq", "/ip4/2.228.138.36/udp/23007/quic-v1/webtransport/certhash/uEiDfF3_p8NPewxre376TtIH-etivvw94JHHAYbr-bFhhlQ/certhash/uEiCxMlNn7h9DG7EGq0gvUtOehCy1MaerRY5V4jygF6uJdg/p2p/12D3KooWAh4c5PbWH4tmrC8etSUzsJrvrFF8bpDzTvWcEmmYcBNF/p2p-circuit/p2p/12D3KooWBroodnZHhgbT4UdCWvYx5Yo4pAQSEvdvPsBBM9JWteRq", "/ip4/2.228.138.36/udp/50110/quic-v1/p2p/12D3KooWAh4c5PbWH4tmrC8etSUzsJrvrFF8bpDzTvWcEmmYcBNF/p2p-circuit/p2p/12D3KooWBroodnZHhgbT4UdCWvYx5Yo4pAQSEvdvPsBBM9JWteRq", "/ip4/2.228.138.36/udp/50110/quic-v1/webtransport/certhash/uEiDfF3_p8NPewxre376TtIH-etivvw94JHHAYbr-bFhhlQ/certhash/uEiCxMlNn7h9DG7EGq0gvUtOehCy1MaerRY5V4jygF6uJdg/p2p/12D3KooWAh4c5PbWH4tmrC8etSUzsJrvrFF8bpDzTvWcEmmYcBNF/p2p-circuit/p2p/12D3KooWBroodnZHhgbT4UdCWvYx5Yo4pAQSEvdvPsBBM9JWteRq", "/ip4/2.228.138.36/udp/52094/quic-v1/p2p/12D3KooWAh4c5PbWH4tmrC8etSUzsJrvrFF8bpDzTvWcEmmYcBNF/p2p-circuit/p2p/12D3KooWBroodnZHhgbT4UdCWvYx5Yo4pAQSEvdvPsBBM9JWteRq", "/ip4/2.228.138.36/udp/52094/quic-v1/webtransport/certhash/uEiDfF3_p8NPewxre376TtIH-etivvw94JHHAYbr-bFhhlQ/certhash/uEiCxMlNn7h9DG7EGq0gvUtOehCy1MaerRY5V4jygF6uJdg/p2p/12D3KooWAh4c5PbWH4tmrC8etSUzsJrvrFF8bpDzTvWcEmmYcBNF/p2p-circuit/p2p/12D3KooWBroodnZHhgbT4UdCWvYx5Yo4pAQSEvdvPsBBM9JWteRq", "/ip4/95.214.53.201/tcp/4001/p2p/12D3KooWMmyvbib9ahTPDjcoEMmyni4q3Hdctd2TH5Y3Dfs7oaY7/p2p-circuit/p2p/12D3KooWBroodnZHhgbT4UdCWvYx5Yo4pAQSEvdvPsBBM9JWteRq", "/ip4/95.214.53.201/udp/4001/quic-v1/p2p/12D3KooWMmyvbib9ahTPDjcoEMmyni4q3Hdctd2TH5Y3Dfs7oaY7/p2p-circuit/p2p/12D3KooWBroodnZHhgbT4UdCWvYx5Yo4pAQSEvdvPsBBM9JWteRq", "/ip4/95.214.53.201/udp/4001/quic-v1/webtransport/certhash/uEiB8_cRFzehw1NT0G7XCNkj73oY2LPWosyApM0nSZIIqwQ/certhash/uEiDLlJee-4Swe4m52bmn8oCd7XCDIk9zX9YIVQRK2JlaCw/p2p/12D3KooWMmyvbib9ahTPDjcoEMmyni4q3Hdctd2TH5Y3Dfs7oaY7/p2p-circuit/p2p/12D3KooWBroodnZHhgbT4UdCWvYx5Yo4pAQSEvdvPsBBM9JWteRq", "/ip6/2a03:cfc0:8000:7::5fd6:35c9/tcp/4001/p2p/12D3KooWMmyvbib9ahTPDjcoEMmyni4q3Hdctd2TH5Y3Dfs7oaY7/p2p-circuit/p2p/12D3KooWBroodnZHhgbT4UdCWvYx5Yo4pAQSEvdvPsBBM9JWteRq" ],...
Next, I attempted to locate the published content:
~$ ipfs routing findprovs bafybeib75xrttell65kx7yzlfkpqzagxdlelbtqsaxfejr5rdodzvyauqe 12D3KooWDgQNimVrtJyggCUpjamydDL7rtEYpLZ1nyCPkYYuYRLJ
I obtained the PeerID and checked for the address of this node:
~$ ipfs routing findpeer 12D3KooWDgQNimVrtJyggCUpjamydDL7rtEYpLZ1nyCPkYYuYRLJ /ip4/89.38.129.138/tcp/4001/p2p/12D3KooWBaEMaZBRX3VumWcan4XPeRoVunCYhFtFTTm3EzozcCSp/p2p-circuit /ip4/93.127.215.160/tcp/4001/p2p/12D3KooWSobLujLpmfyXBx29ipzPwYDseFgeVk6fbjvC6E1KCDcP/p2p-circuit
I received two relayed addresses. However, attempts to download the file resulted in no success:
~$ ipfs get bafybeib75xrttell65kx7yzlfkpqzagxdlelbtqsaxfejr5rdodzvyauqe
I tried multiple times and even waited for an hour.
I also tried creating a peering connection with Alice using the relayed address:
~$ ipfs swarm peering add /ip4/89.38.129.138/tcp/4001/p2p/12D3KooWBaEMaZBRX3VumWcan4XPeRoVunCYhFtFTTm3EzozcCSp/p2p-circuit/p2p/12D3KooWDgQNimVrtJyggCUpjamydDL7rtEYpLZ1nyCPkYYuYRLJ
add 12D3KooWDgQNimVrtJyggCUpjamydDL7rtEYpLZ1nyCPkYYuYRLJ success
~$ ipfs swarm peering ls
12D3KooWDgQNimVrtJyggCUpjamydDL7rtEYpLZ1nyCPkYYuYRLJ /ip4/89.38.129.138/tcp/4001/p2p/12D3KooWBaEMaZBRX3VumWcan4XPeRoVunCYhFtFTTm3EzozcCSp/p2p-circuit
From my experience with peering, the VPS node can immediately access this content.
There are config files from Alice and Bob:
Alice_config.json
Bob_config.json
(notice: I hide IP and ID of VPS)
Let me know if further clarification or adjustments are needed!
The text was updated successfully, but these errors were encountered: