HOP_CANT_SPEAK_RELAY error when setting up IPFS private network

Hello everyone, we got an error while trying to set up an IPFS private network. Please help and support us.

We are setting up IPFS Private network with one replay server and 2 PCs (sharing the same swarm.key)

On relay server, we did
Swarm.RelayService.Enabled) => true
Swarm.RelayClient.Enabled) => false

On 2 PCs behind NAT (+ turned of firewall too), we did
Swarm.RelayService.Enabled) => false
Swarm.RelayClient.Enabled) => true

IDs
Server: 12D3KooWR9zzY5ZZnKyvwm5cKTxexPFQ4DZCypAtqZ1sHDm2GtqP
PC1: 12D3KooWGD5myqbSM1YQp7Sb3ot4UCAAF7wiEwcN24xC8B8pNJxe
PC2: 12D3KooWFg9ApLqQiTdkaGhgFNTWFsiRMCSDGCQgZ1RuBwSMXAmS

On PC1 we do

ipfs ping /ip4/54.169.103.175/tcp/4001/p2p/12D3KooWR9zzY5ZZnKyvwm5cKTxexPFQ4DZCypAtqZ1sHDm2GtqP/p2p-circuit/p2p/12D3KooWFg9ApLqQiTdkaGhgFNTWFsiRMCSDGCQgZ1RuBwSMXAmS

Here is the error we got: HOP_CANT_SPEAK_RELAY, please help

Full error message:

PING 12D3KooWFg9ApLqQiTdkaGhgFNTWFsiRMCSDGCQgZ1RuBwSMXAmS.

Ping error: failed to dial 12D3KooWFg9ApLqQiTdkaGhgFNTWFsiRMCSDGCQgZ1RuBwSMXAmS:

  • [/ip4/54.169.103.175/tcp/4001/p2p/12D3KooWR9zzY5ZZnKyvwm5cKTxexPFQ4DZCypAtqZ1sHDm2GtqP/p2p-circuit] error opening relay circuit: HOP_CANT_SPEAK_RELAY (270)

Error: ping failed

Were you able to find solution? I am also facing same issue after the config change from V1 to V2

Unfortunately not yet, I am still looking for solution for this…Let’s share me yours if you are able to find one…

@hector Can you help us on this?
With the new V2 relay, the config file has changed and now not able to connect to the other node using relay.
With V1 and older config file where we used to have EnableRelayHop:true, we are able to connect. But with the newer one we getting the error HOP_CANT_SPEAK_RELAY.

Thank you

I’m not sure. @adin do you know?

Any help on this? We still facing the issue. HOP_CANT_SPEAK_RELAY error when we trying to connect from A to B through C as a relay.

Thank you

1 Like

Recommend reading the release notes Release v0.11.0 · ipfs/go-ipfs · GitHub which has the relevant information about the recent changes to relay v1 (i.e. unlimited relaying of your data) within go-ipfs. In particular go-ipfs cannot act as a relay v1 server anymore and there is a separate binary you should run for that.

As mentioned in the release notes there’s a standalone relay daemon at GitHub - libp2p/go-libp2p-relay-daemon: A standalone libp2p circuit relay daemon providing relay service for versions v1 and v2 of the protocol.. I don’t think it has support for private swarm keys, but if not you could submit a PR to modify the config to take your key and pass it into the libp2p host, it should be relatively simple to do so.

As you mentioned above, I cloned that project gave a swarm.key and read that file and added it to the libp2p opts in the code and ran.

I got the below error

ERROR quic-transport go-libp2p-quic-transport@v0.17.0/transport.go:139 QUIC doesn’t support private networks yet

Does this mean there is no way around ?

You can configure the transports your go-libp2p node supports. As long as users of private swarms disable QUIC it should be fine.

Config

{
“Identity”: {
“PeerID”: “12D3KooWKYy9Z7obEaAk7t7Hja7oLpFDzLDNgyj7XKq1ZzXqPzJy”,
“PrivKey”: “CAESQDCLe1A6GCjqn+XaGp4TO3vsKtXQAl3O8DA57JmfQ/D4kKMgtBQsVyLwVlq2K0En9gTmcUWla1SVaQe60EG7OIY=”
},
“Datastore”: {
“StorageMax”: “10GB”,
“StorageGCWatermark”: 90,
“GCPeriod”: “1h”,
“Spec”: {
“mounts”: [
{
“child”: {
“path”: “blocks”,
“shardFunc”: “/repo/flatfs/shard/v1/next-to-last/2”,
“sync”: true,
“type”: “flatfs”
},
“mountpoint”: “/blocks”,
“prefix”: “flatfs.datastore”,
“type”: “measure”
},
{
“child”: {
“compression”: “none”,
“path”: “datastore”,
“type”: “levelds”
},
“mountpoint”: “/”,
“prefix”: “leveldb.datastore”,
“type”: “measure”
}
],
“type”: “mount”
},
“HashOnRead”: false,
“BloomFilterSize”: 0
},
“Addresses”: {
“Swarm”: [
“/ip4/0.0.0.0/tcp/4001”,
“/ip6/::/tcp/4001”,
“/ip4/0.0.0.0/udp/4001/quic”,
“/ip6/::/udp/4001/quic”
],
“Announce”: ,
“AppendAnnounce”: ,
“NoAnnounce”: ,
“API”: “/ip4/127.0.0.1/tcp/5001”,
“Gateway”: “/ip4/127.0.0.1/tcp/8080”
},
“Mounts”: {
“IPFS”: “/ipfs”,
“IPNS”: “/ipns”,
“FuseAllowOther”: false
},
“Discovery”: {
“MDNS”: {
“Enabled”: true,
“Interval”: 10
}
},
“Routing”: {
“Type”: “dht”
},
“Ipns”: {
“RepublishPeriod”: “”,
“RecordLifetime”: “”,
“ResolveCacheSize”: 128
},
“Bootstrap”: [

],
“Gateway”: {
“HTTPHeaders”: {
“Access-Control-Allow-Headers”: [
“X-Requested-With”,
“Range”,
“User-Agent”
],
“Access-Control-Allow-Methods”: [
“GET”
],
“Access-Control-Allow-Origin”: [
“*”
]
},
“RootRedirect”: “”,
“Writable”: false,
“PathPrefixes”: ,
“APICommands”: ,
“NoFetch”: false,
“NoDNSLink”: false,
“PublicGateways”: null
},
“API”: {
“HTTPHeaders”: {}
},
“Swarm”: {
“AddrFilters”: null,
“DisableBandwidthMetrics”: false,
“DisableNatPortMap”: false,
“RelayClient”: {},
“RelayService”: {},
“Transports”: {
“Network”: {
“QUIC”: false
},
“Security”: {},
“Multiplexers”: {}
},
“ConnMgr”: {
“Type”: “basic”,
“LowWater”: 600,
“HighWater”: 900,
“GracePeriod”: “20s”
}
},
“AutoNAT”: {},
“Pubsub”: {
“Router”: “”,
“DisableSigning”: false
},
“Peering”: {
“Peers”: null
},
“DNS”: {
“Resolvers”: {}
},
“Migration”: {
“DownloadSources”: ,
“Keep”: “”
},
“Provider”: {
“Strategy”: “”
},
“Reprovider”: {
“Interval”: “12h”,
“Strategy”: “all”
},
“Experimental”: {
“FilestoreEnabled”: false,
“UrlstoreEnabled”: false,
“GraphsyncEnabled”: false,
“Libp2pStreamMounting”: false,
“P2pHttpProxy”: false,
“StrategicProviding”: false,
“AcceleratedDHTClient”: false
},
“Plugins”: {
“Plugins”: null
},
“Pinning”: {
“RemoteServices”: {}
},
“Internal”: {}
}

As you mentioned I disabled the QUIC protocol and started my daemon back and ran the libp2p-relay-daemon.

panic: transport constructor github.com/libp2p/go-libp2p-quic-transport.NewTransport failed: QUIC doesn’t support private networks yet

Am I missing anything else?

If you’re getting that panic on the libp2p-relay-daemon then it’s indicating that you’ll need to make sure the libp2p relay daemon has the option to not use QUIC as well (or disables it when private networks are enabled).