Help with connecting second relay node. Topology questions

Trying to get a second relay up and running on a raspberry pi. My BlockNode and Relay1 connect just fine. Relay2 connects to IOHK relays, but is giving me Failed Subscription errors when looking for BlockNode output.

BP NODE topography:
{
“Producers”: [
{
“addr”: “192.168.1.2”,
“port”: 6000,
“valency”: 1
},
{
“addr”: “192.168.1.41”,
“port”: 6001,
“valency”: 1
}
]
}

RELAY 1 topography (working)
{
“Producers”: [
{
“addr”: “my.ddnsaddress.com”,
“port”: 6000,
“valency”: 1
},
{
“addr”: “relays-new.cardano-mainnet.iohk.com”,
“port”: 3001,
“valency”: 2
}
]
}

RELAY 2 topography (not working)
{
“Producers”: [
{
“addr”: “my.ddnsaddress.com”,
“port”: 6001,
“valency”: 1
},
{
“addr”: “relays-new.cardano-mainnet.iohk.com”,
“port”: 3001,
“valency”: 2
}
]
}

I have portforwarding on my router for 1.192.1.2:6000 and 1.192.1.41:6001
firewalls are all disabled for now.
seems like I can netcat from my relay2 to by BPnode on port 6000 but not on 6001 and I’m not sure why that is. Do I have to change another configuration file for my BP node to send its output to my second relay? Also, should I be referring the two relays to each other?

This forum has been great in helping me better understand network pathing. I think I’m just a hurdle or two away from having this all setup right, though. Thanks in advance for your help!
-Sully

Just installed topologyUpdater.sh on my relay nodes. Still can’t seem to get blocknode to reach relay 2. Updated the file to put my ddns name as host, and 192168.1.27:6001:1 as a custom peer. That seem right?

Hi!

RELAY 2 topography (not working)

{
“Producers”: [
{
“addr”: “my.ddnsaddress.com”,
“port”: 6001, <--- should be 6000
“valency”: 1
},

Topology.json contains remote addresses where the node should connect to. from relay1 topology it is showing that the BP node address is my.ddnsaddress.com 6000
so this address should be given in relay2 topology as well.

so does that also mean that in my block producer node, I should change the topology file for relay 2 to be 6000, same as relay 1?

And to make sure I’m completely straight, now that I’ve installed topologyUpdater.sh, the “CNODE_HOSTNAME” should be my www.ddnsaddress.com, and my CUSTOM_PEERS should be the internal address of my node? (192.168.1.27:6000:1)?

if the port of relay2 is 6000, then yes (most likely, if you does not touch the default values)

CUSTOM_PEER is the block producing node address and if that can be reached on internal address, then yes - in that case the topology file can contain the internal address of your block producing node as well

{
“Producers”: [
{
“addr”: "internalIPofBP”,
“port”: 6001, <--- should be 6000
“valency”: 1
},

Does it not matter that my two relays are both on the same network, trying to use the same port to reach the blocknode?

hmm - your relays has diff ip address so they can have same ports. and what is the bp node internal ip address? if it is different from both relays, then bp can use 6000 as well. in general all the node should have unique address - either with diff IP or with diff port

I think I need to get back to basics to understand this. My router is provided a dynamic IP via my internet service provider. I am using a ddns service to convert this into a seemingly fixed address at let’s say www.ddns.com. Now all my nodes are within that one external ip.
My block producing node is 192.168.1.27
My relay one is 192.168.1.2
My relay two is 192.168.1.41
I open my router settings to port forward port 6000 on 192.168.1.2
I cannot then also port forward port 6000 on 192.168.1.41 because it gives me a rule conflict. So don’t I need to use a different port?

1 Like

ok - good explanation of setup.
in case of port-forwarding - you can forward ddns.com:6001 to 192.168.1.41:6000, that means you still dont need different internal port, just need a sophisticated port forwarding.
so your relays can be seen as

node outside inside
relay1 ddns.com:6000 192.168.1.2:6000
relay2 ddns.com:6001 192.168.1.41:6000
bp node 192.168.1.27:6000

most routers can assign different outside port for an internal port

1 Like

OK, here’s where I’m at.
I was able to set up the router just like you wrote.
Now my BP topology is
{
“Producers”: [
{
“addr”: “192.168.1.2”,
“port”: 6000,
“valency”: 1
},
{
“addr”:“192.168.1.41”,
“port”: 6000,
“valency”: 1
}
]
}

CNODE port in my env file in the block producing node is 6000

Relay Node 1 (192.168.1.2 on virtual machine)
has its CNODE port in env file set for 6000.
in the topographyupdate.sh file, CNODE_HOSTNAME is set to www.myddns.com
CUSTOM_PEERS is set to 192.168.1.27:6000:1

Relay Node 2 (192.168.1.41 on raspberry pi)
has its CNODE port in env file set for 6000
in the topographyupdate.sh file, CNODE_HOSTNAME is set to www.myddns.com
CUSTOM_PEERS is set to 192.168.1.27:6000:1

When I start everything, by Block producer node has just one OUT in gLiveView, to 192.168.1.2
There are no IN’s. Checking the journal output shows an occasional tip produced, but lots of this:

ar 27 17:38:05 sullynode-VirtualBox bash[519276]: [sullynod:cardano.node.IpSubscription:Error:71] [2021-03-27 21:38:05.09 UTC] IPs: 0.0.0.0:0 [192.168.1.2:6000,192.168.1.41:6000] Failed to start all required subscriptions
^XMar 27 17:38:06 sullynode-VirtualBox bash[519276]: [sullynod:cardano.node.IpSubscription:Info:71] [2021-03-27 21:38:06.09 UTC] IPs: 0.0.0.0:0 [192.168.1.2:6000,192.168.1.41:6000] Restarting Subscription after 1.002376866s desired valency 2 current valency 1

Relay 1 has my block producer node 192.168.1.27:6000 as an OUT as well as like 17 other relays.
It has 4 IN’s from a 10.0.2.2 ip that has something to do with the virtual machine.

Relay 2 has by block producer node 192.168.1.27:6000 as an OUT as well as 15 other relays. There is nothing in the IN list.

Can you guide me from here?

so… as I see these scripts not supporting the “sophisticated” port forwarding…
that means you need to use 6001 CNODE_PORT for relay 2…
so introduce this 6001 in topology files and in the router…
after we can talk about the errors in BP

OK, so changed the relay2 CNODE_PORT to 6001 and changed the BP node topology for 192.168.1.41 to 6001.
Changed my router to forward 6001 on 192.168.1.41.

Left my CUSTOM_PEERS in my relay2 topologyUpdater as 192.168.1.27:6000:1

getting BP node journal errors like this:
Mar 27 18:15:54 sullynode-VirtualBox bash[565586]: [sullynod:cardano.node.IpSubscription:Info:84] [2021-03-27 22:15:54.00 UTC] IPs: 0.0.0.0:0 [192.168.1.2:6000,192.168.1.41:6001] Trying to connect to 192.168.1.2:6000
Mar 27 18:15:54 sullynode-VirtualBox bash[565586]: [sullynod:cardano.node.IpSubscription:Info:84] [2021-03-27 22:15:54.00 UTC] IPs: 0.0.0.0:0 [192.168.1.2:6000,192.168.1.41:6001] Skipping peer 192.168.1.41:6001
Mar 27 18:15:54 sullynode-VirtualBox bash[565586]: [sullynod:cardano.node.IpSubscription:Error:84] [2021-03-27 22:15:54.00 UTC] IPs: 0.0.0.0:0 [192.168.1.2:6000,192.168.1.41:6001] Failed to start all required subscriptions
Mar 27 18:15:55 sullynode-VirtualBox bash[565586]: [sullynod:cardano.node.IpSubscription:Info:84] [2021-03-27 22:15:55.00 UTC] IPs: 0.0.0.0:0 [192.168.1.2:6000,192.168.1.41:6001] Restarting Subscription after 1.000814335s desired valency 2 current valency 1
Mar 27 18:16:01 sullynode-VirtualBox bash[565586]: [sullynod:cardano.node.BlockFetchDecision:Info:73] [2021-03-27 22:16:01.35 UTC] [TraceLabelPeer (ConnectionId {localAddress = 10.0.2.15:42591, remoteAddress = 192.168.1.2:6000}) (Right [At (Block {blockPointSlot = SlotNo 25317070, blockPointHash = 9c745dfbb427b385062258985436807ba100d6132a4c7f2bb273b2a4d5d94798})])]
Mar 27 18:16:01 sullynode-VirtualBox bash[565586]: [sullynod:cardano.node.ChainDB:Notice:63] [2021-03-27 22:16:01.40 UTC] Chain extended, new

verify on bp node that both relay nodes can be seen: netcat -zvn relayIP realyPort

the netcat to 192.168.1.41 6001 fails and I cant figure out why

netcat from the relay nodes can reach BP node on 6000 but not 6001

why do you think that BP node can be reachable on 6001?

I didn’t think it would be I was just throwing everything at it. But shouldn’t I be able to get to the relay 2 on 6001 from the BP node?

I can sucessfully connect from 192.168.1.41 to my bp node 192.168.1.27 on 6000
but I cannot connect from bp node back to the relay node on 6000