Docker issue connecting to genesis node

+1 vote

I have "rpcallowip=0.0.0.0/0" in my multichain.conf

docker images are able to ping and netcat displays the necessary port on genesis image as open..

Any idea on why they wont talk?

https://imgur.com/a/kdDiDPG

asked 6 days ago by SamJ56

1 Answer

0 votes

First, FYI, rpcallowip is about connections to a node's JSON-RPC API, not the peer-to-peer connection between nodes. So it's not related to this issue.

Have you made any other changes to multichain.conf that might be preventing the connection?

answered 6 days ago by MultiChain
I found a solution this morning. I used a overlay network rather than a bridged network

- "docker swarm init"

- "docker network create -d overlay --attachable --subnet 192.168.1.0/24 Multichain-Network"

- This is the network I used to connect my nodes
OK great, thanks for the update.
Update on this, back to no longer working.. Reverted repo back 10 hours to when it was working and still no luck..

only the ports were changed in multichain.conf
If it was working then no longer working, it's most likely a Docker networking issue. Are you able to try this outside the Docker environment to isolate the problem?
Yeah works perfectly fine in Virtual box with the same basic config.. Also worked on Mac yesterday
So I'm afraid we can't give you specific help with Docker since we don't use it here. Sorry about that, please update here if you work it out.
The issue appears to be that the genesis node is sending the paramaters to a port number that isnt open on the requesting container.

12.247928  tx=19  date=2025-03-07 14:08:48 progress=1.000000  cache=0
2025-03-07 14:09:08 mchn: Sending minimal parameter set to 192.168.1.11:52352
2025-03-07 14:09:08 socket receive timeout: 88s, peer 5
2025-03-07 14:09:08 disconnecting peer=5
2025-03-07 14:09:08 receive version message: /MultiChain:0.2.0.13/: version 70002, blocks=-1, us=192.168.1.10:6001, peer=5
2025-03-07 14:09:38 mchn: Sending minimal parameter set to 192.168.1.11:56830
2025-03-07 14:09:38 socket receive timeout: 87s, peer 6
2025-03-07 14:09:38 disconnecting peer=6
2025-03-07 14:09:38 receive version message: /MultiChain:0.2.0.13/: version 70002, blocks=-1, us=192.168.1.10:6001, peer=6
This is the temporary port created by the requester for the outgoing connection, and doesn't accept incoming connections. It is numbered randomly so you'd not expect to recognize it.
I booted up an ubuntu vm, now everything is working no problem with normal bridged network.. Appears to be a windows docker issue..

Follow up question, is there a way I can scrip granting access to a node trying to connect.. I have the initial creation of the chain already scripted, trying to find a way to script "multichain-cli logChain grant 174oa82Ynbyxm5ZX7V6PpE6twHy66c97q7os8b connect,send,receive"
since the code is dynamically generated each time for each node.
Of course, that's what the JSON-RPC API is for. (When you use multichain-cli, it's actually sending an API call for you.)

https://www.multichain.com/developers/json-rpc-api/
...