DMS unable to connect to bootstrap node
The following error is thrown when DMS tries to connect to the bootstrap nodes.
[GIN-debug] Listening and serving HTTP on :9999
2023/06/09 13:56:59 failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Receive-Buffer-Size for details.
2023-06-09T13:56:59.570+0300 INFO libp2p/host.go:401 Self Peer Info QmQdepwY314hW936XqfzDSAghigKit63dKM5sQpPiS73pM -> [/ip4/127.0.0.1/tcp/9000 /ip4/127.0.0.1/udp/9000/quic /ip4/192.168.123.51/tcp/9000 /ip4/192.168.123.51/udp/9000/quic]
{"package": "utils"}
2023-06-09T13:57:00.133+0300 ERROR libp2p/dht.go:36 failed to connect to bootstrap node QmQ2irHa8aFTLRhkbkQCRrounE4MbttNp8ki7Nmys4F9NP - failed to dial QmQ2irHa8aFTLRhkbkQCRrounE4MbttNp8ki7Nmys4F9NP:
* [/ip4/95.217.19.174/tcp/6763] failed to negotiate security protocol: EOF {"package": "utils"}
gitlab.com/nunet/device-management-service/libp2p.Bootstrap
/home/dagim/nunet/code/device-management-service/libp2p/dht.go:36
gitlab.com/nunet/device-management-service/libp2p.DMSp2p.BootstrapNode
/home/dagim/nunet/code/device-management-service/libp2p/dht.go:23
gitlab.com/nunet/device-management-service/libp2p.RunNode
/home/dagim/nunet/code/device-management-service/libp2p/host.go:84
gitlab.com/nunet/device-management-service/libp2p.CheckOnboarding
/home/dagim/nunet/code/device-management-service/libp2p/host.go:70
main.main
/home/dagim/nunet/code/device-management-service/main.go:58
runtime.main
/usr/lib/go/src/runtime/proc.go:250
2023-06-09T13:57:00.541+0300 ERROR libp2p/dht.go:36 failed to connect to bootstrap node Qmf16N2ecJVWufa29XKLNyiBxKWqVPNZXjbL3JisPcGqTw - failed to dial Qmf16N2ecJVWufa29XKLNyiBxKWqVPNZXjbL3JisPcGqTw:
* [/ip4/135.181.199.125/tcp/6763] failed to negotiate security protocol: EOF {"package": "utils"}
gitlab.com/nunet/device-management-service/libp2p.Bootstrap
/home/dagim/nunet/code/device-management-service/libp2p/dht.go:36
gitlab.com/nunet/device-management-service/libp2p.DMSp2p.BootstrapNode
/home/dagim/nunet/code/device-management-service/libp2p/dht.go:23
gitlab.com/nunet/device-management-service/libp2p.RunNode
/home/dagim/nunet/code/device-management-service/libp2p/host.go:84
gitlab.com/nunet/device-management-service/libp2p.CheckOnboarding
/home/dagim/nunet/code/device-management-service/libp2p/host.go:70
main.main
/home/dagim/nunet/code/device-management-service/main.go:58
runtime.main
/usr/lib/go/src/runtime/proc.go:250
2023-06-09T13:57:01.909+0300 INFO libp2p/dht.go:38 Connected to Bootstrap Node QmTkWP72uECwCsiiYDpCFeTrVeUM9huGTPsg3m6bHxYQFZ
{"package": "utils"}
2023-06-09T13:57:01.909+0300 INFO libp2p/dht.go:42 Done Bootstrapping {"package": "utils"}
The first and second nodes were updated with the latest DHT protocol whereas the thrid one was left to allow older DMS versions to continue working. The updated nodes (#1 (closed) and #2 (closed)) started refusing connection with a failed to negotiate security protocol: EOF error.
The problem seems to be related to this issue https://github.com/libp2p/go-libp2p/issues/2339 with resusing ports.
Edited by Dagim Sisay