#6238[BUG] — Block producer makes disallowed connection attempts
Issue Details
External
Area Other Networking
Summary
A block producer has no business contacting “peers” other than its configured gateway relay(s). It keeps attempting to do something unexpected with its network sockets since release 10.4.1
(approximately). Or at least it admits to doing so in the logs since that release.
This bug might be distantly related.
Steps to reproduce
- Configure a TCP(-like) tunnel on
::1
for the block producer to connect to. Where the tunnel(s) lead(s) and where the relay(s) on the on side(s) of the tunnel(s) actually run(s) is not the block producer’s business. - Configure the
::1
tunnel entry point as the block producer’s only peer. - Set
--host-ipv6-addr ::1
on the block producer to ensure it doesn’tbind()
to unexpected addresses. - Watch bogus error messages in the block producer’s logs, since
10.4.1
.
Expected behavior
When exactly one peer is configured, NO attempts should be made to do anything surprising about network interfaces and sockets, such as connect()
ing to unexpected addresses outside the configured address realm (which may well be the loopback interface), etc.
System info (please complete the following information):
- OS Name: ArchLinux
- OS Version There is no such thing on good distros.
- Node version (output of
cardano-node --version
)cardano-node 10.4.1 - linux-x86_64 - ghc-9.12 git rev 057f75eb03c45fdcf0a7b5c0f9b478afaa7570e9
- CLI version (output of
cardano-cli --version
)cardano-cli 10.8.0.0 - linux-x86_64 - ghc-9.12 git rev 057f75eb03c45fdcf0a7b5c0f9b478afaa7570e9
Screenshots and attachments
Jun 03 22:23:00 cardano-node[193883]: [xxx:cardano.node.PeerSelectionActions:Error:54566] [2025-06-03 20:23:00.37 UTC] AcquireConnectionError Network.Socket.connect: <socket: 228>: invalid argument (Invalid argument) Jun 03 22:23:07 cardano-node[193883]: [xxx:cardano.node.PeerSelectionActions:Error:54569] [2025-06-03 20:23:07.28 UTC] AcquireConnectionError Network.Socket.connect: <socket: 235>: invalid argument (Invalid argument) Jun 03 22:23:08 cardano-node[193883]: [xxx:cardano.node.PeerSelectionActions:Error:54570] [2025-06-03 20:23:08.41 UTC] AcquireConnectionError Network.Socket.connect: <socket: 236>: invalid argument (Invalid argument) Jun 03 22:23:09 cardano-node[193883]: [xxx:cardano.node.PeerSelectionActions:Error:54571] [2025-06-03 20:23:09.47 UTC] AcquireConnectionError Network.Socket.connect: <socket: 237>: invalid argument (Invalid argument) Jun 03 22:23:12 cardano-node[193883]: [xxx:cardano.node.PeerSelectionActions:Error:54572] [2025-06-03 20:23:12.28 UTC] AcquireConnectionError Network.Socket.connect: <socket: 240>: invalid argument (Invalid argument) Jun 03 22:23:14 cardano-node[193883]: [xxx:cardano.node.PeerSelectionActions:Error:54573] [2025-06-03 20:23:14.68 UTC] AcquireConnectionError Network.Socket.connect: <socket: 242>: invalid argument (Invalid argument) Jun 03 22:23:16 cardano-node[193883]: [xxx:cardano.node.PeerSelectionActions:Error:54574] [2025-06-03 20:23:16.78 UTC] AcquireConnectionError Network.Socket.connect: <socket: 244>: invalid argument (Invalid argument) Jun 03 22:23:18 cardano-node[193883]: [xxx:cardano.node.PeerSelectionActions:Error:54575] [2025-06-03 20:23:18.30 UTC] AcquireConnectionError Network.Socket.connect: <socket: 246>: invalid argument (Invalid argument) Jun 03 22:23:18 cardano-node[193883]: [xxx:cardano.node.PeerSelectionActions:Error:54576] [2025-06-03 20:23:18.99 UTC] AcquireConnectionError Network.Socket.connect: <socket: 246>: invalid argument (Invalid argument) Jun 03 22:23:20 cardano-node[193883]: [xxx:cardano.node.PeerSelectionActions:Error:54577] [2025-06-03 20:23:20.18 UTC] AcquireConnectionError Network.Socket.connect: <socket: 248>: invalid argument (Invalid argument) Jun 03 22:23:21 cardano-node[193883]: [xxx:cardano.node.PeerSelectionActions:Error:54578] [2025-06-03 20:23:21.00 UTC] AcquireConnectionError Network.Socket.connect: <socket: 248>: invalid argument (Invalid argument) Jun 03 22:23:21 cardano-node[193883]: [xxx:cardano.node.PeerSelectionActions:Error:54579] [2025-06-03 20:23:21.18 UTC] AcquireConnectionError Network.Socket.connect: <socket: 249>: invalid argument (Invalid argument) Jun 03 22:23:23 cardano-node[193883]: [xxx:cardano.node.PeerSelectionActions:Error:54580] [2025-06-03 20:23:23.74 UTC] AcquireConnectionError Network.Socket.connect: <socket: 251>: invalid argument (Invalid argument) Jun 03 22:23:23 cardano-node[193883]: [xxx:cardano.node.PeerSelectionActions:Error:54581] [2025-06-03 20:23:23.87 UTC] AcquireConnectionError Network.Socket.connect: <socket: 251>: invalid argument (Invalid argument) Jun 03 22:23:24 cardano-node[193883]: [xxx:cardano.node.PeerSelectionActions:Error:54582] [2025-06-03 20:23:24.42 UTC] AcquireConnectionError Network.Socket.connect: <socket: 252>: invalid argument (Invalid argument) Jun 03 22:23:25 cardano-node[193883]: [xxx:cardano.node.PeerSelectionActions:Error:54583] [2025-06-03 20:23:25.58 UTC] AcquireConnectionError Network.Socket.connect: <socket: 253>: invalid argument (Invalid argument) Jun 03 22:23:27 cardano-node[193883]: [xxx:cardano.node.PeerSelectionActions:Error:54584] [2025-06-03 20:23:27.11 UTC] AcquireConnectionError Network.Socket.connect: <socket: 255>: invalid argument (Invalid argument) Jun 03 22:23:27 cardano-node[193883]: [xxx:cardano.node.PeerSelectionActions:Error:54585] [2025-06-03 20:23:27.57 UTC] AcquireConnectionError Network.Socket.connect: <socket: 255>: invalid argument (Invalid argument) Jun 03 22:23:29 cardano-node[193883]: [xxx:cardano.node.PeerSelectionActions:Error:54586] [2025-06-03 20:23:29.50 UTC] AcquireConnectionError Network.Socket.connect: <socket: 257>: invalid argument (Invalid argument) Jun 03 22:23:29 cardano-node[193883]: [xxx:cardano.node.PeerSelectionActions:Error:54587] [2025-06-03 20:23:29.57 UTC] AcquireConnectionError Network.Socket.connect: <socket: 257>: invalid argument (Invalid argument) Jun 03 22:23:31 cardano-node[193883]: [xxx:cardano.node.PeerSelectionActions:Error:54588] [2025-06-03 20:23:31.24 UTC] AcquireConnectionError Network.Socket.connect: <socket: 259>: invalid argument (Invalid argument) Jun 03 22:23:31 cardano-node[193883]: [xxx:cardano.node.PeerSelectionActions:Error:54589] [2025-06-03 20:23:31.38 UTC] AcquireConnectionError Network.Socket.connect: <socket: 259>: invalid argument (Invalid argument) Jun 03 22:23:31 cardano-node[193883]: [xxx:cardano.node.PeerSelectionActions:Error:54479] [2025-06-03 20:23:31.44 UTC] AcquireConnectionError Network.Socket.connect: <socket: 273>: timeout (Connection timed out)
Additional context The block producer’s topology:
{ "bootstrapPeers": null, "localRoots": [ { "accessPoints": [ { "address": "::1", "port": 3001 } ], "advertise": false, "trustable": true, "valency": 1 } ], "publicRoots": [], "useLedgerAfterSlot": -1 }