Trying to run baby-fleming network ipv4. Error: Failed to find the contact info of the genesis node

I’m unable to run the safe network on ipv4.

Alternate steps when installing safe

Server

cd ~/Downloads
wget https://github.com/maidsafe/sn_node/archive/0.25.18.tar.gz
tar -xvf 0.25.18
sed -i 's/Ipv4Addr::LOCALHOST/Ipv4Addr::new(83,163,103,119)/g' ~/Downloads/sn_node-0.25.18/src/config_handler.rs
cargo build --bin launch_network --release --features=simulated-payouts --
$ cat node_connection_info.config 
83.163.103.119:12000

Steps to start and test network

Server

> node run-baby-fleming
Storing nodes' generated data at /home/folaht/.safe/node/baby-fleming-nodes
Launching local Safe network...
Launching with node executable from: /home/folaht/.safe/node/sn_node
Network size: 11 nodes
Launching genesis node (#1)...
Failed to find the contact info of the genesis node

My Environment

Server

Node version : 0.25.18
Version or Branch used : 0.17 / 0.0.13
Operating System and version : 5.4.81-1-MANJARO-ARM aarch64
LAN ipv4: 192.168.178.24

Router

-- Access Permissions of 192.168.178.24 --
Safe_Network TCP 83.163.103.119 12000
1 Like

Do you get any error in the genesis node log? it should be at ~/.safe/node/baby-fleming-nodes/sn-node-genesis/sn_node.log

[sn_node] INFO 2021-01-07T22:17:59.433453181+01:00 [src/bin/sn_node.rs:90] Node PID is: 192556
[sn_node] INFO 2021-01-07T22:17:59.434114615+01:00 [src/bin/sn_node.rs:113] 

Running sn_node v0.25.18
========================
[sn_node] ERROR 2021-01-07T22:17:59.438427084+01:00 [src/bin/sn_node.rs:119] Cannot start node due to error: Routing(Network(Endpoint(Socket(Os { code: 99, kind: AddrNotAvailable, message: "Cannot assign requested address" }))))
1 Like

Perhaps the port is already used by another service on the IP you are trying to start the nodes? or perhaps something else in your OS/environment not allowing you to start a service in that IP/port?

I’ve opened port 12000 TCP Ipv4 on my router for this machine and nothing else is running on it.

1 Like

You need to make sure you are allowed to open a service/socket in the IP you are trying to and it actually belongs to your box, i.e. 83.163.103.119, is that the IP on your router or the IP on your PC/server? I think you need to open it on your server’s IP rather than the router public IP, then forward it?

It looks like my port forwarding isn’t working for any new port I added?

I think you are trying to run the nodes using the public IP (which is your router IP?) rather than using your private IP (which your server/PC IP)? the genesis node is not starting because is not allowed to start the service on the IP you are setting, so unless the server/PC has that IP you cannot do that. I’m just guessing, as I’m not sure of you environment.

If the nodes cannot be run on the public ip address, then how are other nodes supposed to join?
How is a client program like a browser supposed to connect?

Shouldn’t you start your nodes with this IP?
Then people should be able to connect to your network using the public IP 83.163.103.119:12000 ?

1 Like

Okay, so I should run nodes on 192.168.178.24:12000 and connect to 83.163.103.119:12000.
I’ve tried, but I’m unable to do auth unlock on the client side.

sn_authd.log

ERROR 2021-01-08T01:26:48.822594628+01:00 [/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/qp2p-0.9.6/src/api.rs:250] Failed to bootstrap to the network: Connection lost
ERROR 2021-01-08T01:26:48.822670890+01:00 [sn_authd/requests/unlock.rs:48] Error occurred when trying to unlock a Safe: [Error] ClientError - QuicP2P error: BootstrapFailure
ERROR 2021-01-08T01:26:48.822738745+01:00 [sn_authd/requests/mod.rs:120] Error when processing incoming 'unlock' request with id 2609454352: [Error] ClientError - QuicP2P error: BootstrapFailure

Did you set your node_connection_info.config on the client side with the ip?

Yes

$ cat ~/.safe/node/node_connection_info.config 
"83.163.103.119:12000"

I’m not sure at this point what you are missing, @lionel.faber do you have any suggestion?

Perhaps you wanna give it a try to run the nodes on IP 0.0.0.0, I am not sure if that will work but in case it helps.

Also, perhaps check that port forwarding is actually working with any other service, maybe make sure ssh or web works with port forwarding?

Port forwarding is working with other services.

Server with nodes running on 0.0.0.0

> auth create --test-coins
Passphrase: 
Password: 
Sending request to authd to create a Safe...
[Error] AuthdError - [Error] ClientError - QuicP2P error: BootstrapFailure

sn_authd.log

ERROR 2021-01-08T12:30:52.389043323+01:00 [/home/folaht/.cargo/registry/src/github.com-1ecc6299db9ec823/qp2p-0.9.6/src/api.rs:250] Failed to bootstrap to the network: Connection lost
ERROR 2021-01-08T12:30:52.389190117+01:00 [sn_authd/requests/create.rs:55] Error occurred when trying to create a Safe: [Error] ClientError - QuicP2P error: BootstrapFailure
ERROR 2021-01-08T12:30:52.389256487+01:00 [sn_authd/requests/mod.rs:120] Error when processing incoming 'create' request with id 3060295478: [Error] ClientError - QuicP2P error: BootstrapFailure
INFO 2021-01-08T12:30:52.389353245+01:00 [/home/folaht/.cargo/registry/src/github.com-1ecc6299db9ec823/quinn-0.6.1/src/connection.rs:228] drive; id=0
INFO 2021-01-08T12:30:52.390361044+01:00 [/home/folaht/.cargo/registry/src/github.com-1ecc6299db9ec823/quinn-0.6.1/src/connection.rs:228] drive; id=0
INFO 2021-01-08T12:30:52.390878055+01:00 [sn_authd/authd.rs:161] Response sent, request 3060295478 complete
INFO 2021-01-08T12:30:52.434397834+01:00 [/home/folaht/.cargo/registry/src/github.com-1ecc6299db9ec823/quinn-0.6.1/src/connection.rs:228] drive; id=0
2 Likes

Sorry for jumping late late onto this train!

So basically, when running the nodes the node should be run using the local IP address:

./sn_node --first --ip 192.168.0.9

If IGD is available then the --ip argument can be skipped.

The binary will attempt to use port 12000 first and will fallback to a random port otherwise. If manual port forwarding is done, then 192.168.0.9:12000 should be mapped to some external port eg. 56789.

Then, the genesis node can be contacted via: 80.160.100.120:56789

2 Likes

I’m also thinking that perhaps you’ll need to make sure your server is not blocking any port (like 12000) with a firewall for example.

1 Like

I just went through the CLI code and when using safe node run-baby-fleming if the --ip argument is not passed the IP defaults to 127.0.0.1 so make sure to pass the --ip argument :slight_smile: