Can anyone check if my safe network is running?

The typo has already been fixed

From GitHub - maidsafe/sn_launch_tool: A cross platform tool to easily launch a SAFE Network test section from home

OPTIONS:
    -i, --interval <interval>        
            Interval in seconds between launching each of the nodes [default: 5]

        --ip <ip>
            IP used to launch the nodes with

    -n, --num-nodes <num-nodes>    
            Number of nodes to spawn with the first one being the genesis. This number should be greater than 0
            [default: 8]

    -p, --node-path <node-path>    
            Path where to locate sn_node/sn_node.exe binary. The SN_NODE_PATH env var can be also used to set
            the path [env: SN_NODE_PATH=]

    -d, --nodes-dir <nodes-dir>    
            Path where the output directories for all the nodes are written [default: ./nodes]

which is what I get for not reading the source :slight_smile:

The -p option seems to refer to a Windows only .exe though - needs a wee rewrite

1 Like

I have not used the launch tool before.

[folaht@Rezosur-uq .safe]$ ./sn_launch_tool --ip 83.163.103.119
[2021-02-01T02:40:36Z ERROR sn_launch_tool] sn_launch_tool error: No such file or directory (os error 2)
1 Like

You need to download and build it

you should get this
willie@gagarin:~/projects/maidsafe/sn_launch_tool-0.0.3/target/release$ ll
total 6376
drwxrwxr-x 18 willie willie 4096 Feb 1 02:10 build
drwxrwxr-x 2 willie willie 12288 Feb 1 02:11 deps
drwxrwxr-x 2 willie willie 4096 Feb 1 02:10 examples
drwxrwxr-x 2 willie willie 4096 Feb 1 02:10 incremental
-rw-rw-r-- 1 willie willie 163 Feb 1 02:11 libsn_launch_tool.d
-rw-rw-r-- 2 willie willie 738438 Feb 1 02:11 libsn_launch_tool.rlib
-rwxrwxr-x 2 willie willie 5751440 Feb 1 02:11 sn_launch_tool
-rw-rw-r-- 1 willie willie 219 Feb 1 02:11 sn_launch_tool.d
willie@gagarin:~/projects/maidsafe/sn_launch_tool-0.0.3/target/release$ ./sn_launch_tool --help
sn_launch_tool 0.0.3
Tool to launch Safe nodes to form a local single-section network

Currently, this tool runs nodes on localhost (since that's the default if no IP address is given to the nodes)

USAGE:
    sn_launch_tool [FLAGS] [OPTIONS]

FLAGS:
    -h, --help               
            Prints help information

        --local              
            Run the section locally

    -y, --nodes-verbosity    
            Verbosity level for nodes logs (default: INFO)

    -V, --version            
            Prints version information

    -v, --verbosity          
            Verbosity level for this tool


OPTIONS:
    -i, --interval <interval>      
            Interval in seconds between launching each of the nodes [default: 1]

        --ip <ip>                  
            IP used to launch the nodes with

    -p, --node-path <node-path>    
            Path where to locate sn_node/sn_node.exe binary. The SN_NODE_PATH env var can be also used to set the path
            [env: SN_NODE_PATH=]
    -d, --nodes-dir <nodes-dir>    
            Path where the output directories for all the notes are written [default: ./nodes]

    -n, --num-nodes <num-nodes>    
            Number of nodes to spawn with the first one being the genesis. This number should be greater than 0
            [default: 8]

I did.
The error I showed was what happened after I downloaded and build it for the first time.

1 Like

I think you may have a path error

How do I call the launch tool or safe node with debug?

RUST_LOG=sn_api,sn_node=debug I think

I have this running now

RUST_LOG=sn_api,sn_client=trace,sn_node=trace ~/projects/maidsafe/sn_launch_tool-0.0.3/target/release/sn_launch_tool -yy -vv -i3 -n15
Launching with node executable from: /home/willie/.safe/node/sn_node
Network size: 15 nodes
Launching genesis node (#1)...
Running '/home/willie/.safe/node/sn_node' with args ["-vvvv", "--first", "--root-dir", "./nodes/sn-node-genesis", "--log-dir", "./nodes/sn-node-genesis"] ...
Genesis node contact info: ["0.0.0.0:12000"]
Launching node #2...
Running '/home/willie/.safe/node/sn_node' with args ["-vvvv", "--hard-coded-contacts", "[\"0.0.0.0:12000\"]", "--root-dir", "./nodes/sn-node-2", "--log-dir", "./nodes/sn-node-2"] ...
Launching node #3...
Running '/home/willie/.safe/node/sn_node' with args ["-vvvv", "--hard-coded-contacts", "[\"0.0.0.0:12000\"]", "--root-dir", "./nodes/sn-node-3", "--log-dir", "./nodes/sn-node-3"] ...
Launching node #4...
Running '/home/willie/.safe/node/sn_node' with args ["-vvvv", "--hard-coded-contacts", "[\"0.0.0.0:12000\"]", "--root-dir", "./nodes/sn-node-4", "--log-dir", "./nodes/sn-node-4"] ...
Launching node #5...
Running '/home/willie/.safe/node/sn_node' with args ["-vvvv", "--hard-coded-contacts", "[\"0.0.0.0:12000\"]", "--root-dir", "./nodes/sn-node-5", "--log-dir", "./nodes/sn-node-5"] ...
Launching node #6...
Running '/home/willie/.safe/node/sn_node' with args ["-vvvv", "--hard-coded-contacts", "[\"0.0.0.0:12000\"]", "--root-dir", "./nodes/sn-node-6", "--log-dir", "./nodes/sn-node-6"] ...
Launching node #7...
Running '/home/willie/.safe/node/sn_node' with args ["-vvvv", "--hard-coded-contacts", "[\"0.0.0.0:12000\"]", "--root-dir", "./nodes/sn-node-7", "--log-dir", "./nodes/sn-node-7"] ...
Launching node #8...
Running '/home/willie/.safe/node/sn_node' with args ["-vvvv", "--hard-coded-contacts", "[\"0.0.0.0:12000\"]", "--root-dir", "./nodes/sn-node-8", "--log-dir", "./nodes/sn-node-8"] ...
Launching node #9...
Running '/home/willie/.safe/node/sn_node' with args ["-vvvv", "--hard-coded-contacts", "[\"0.0.0.0:12000\"]", "--root-dir", "./nodes/sn-node-9", "--log-dir", "./nodes/sn-node-9"] ...
Launching node #10...
Running '/home/willie/.safe/node/sn_node' with args ["-vvvv", "--hard-coded-contacts", "[\"0.0.0.0:12000\"]", "--root-dir", "./nodes/sn-node-10", "--log-dir", "./nodes/sn-node-10"] ...
Launching node #11...
Running '/home/willie/.safe/node/sn_node' with args ["-vvvv", "--hard-coded-contacts", "[\"0.0.0.0:12000\"]", "--root-dir", "./nodes/sn-node-11", "--log-dir", "./nodes/sn-node-11"] ...
Launching node #12...
Running '/home/willie/.safe/node/sn_node' with args ["-vvvv", "--hard-coded-contacts", "[\"0.0.0.0:12000\"]", "--root-dir", "./nodes/sn-node-12", "--log-dir", "./nodes/sn-node-12"] ...
Launching node #13...
Running '/home/willie/.safe/node/sn_node' with args ["-vvvv", "--hard-coded-contacts", "[\"0.0.0.0:12000\"]", "--root-dir", "./nodes/sn-node-13", "--log-dir", "./nodes/sn-node-13"] ...
Launching node #14...
Running '/home/willie/.safe/node/sn_node' with args ["-vvvv", "--hard-coded-contacts", "[\"0.0.0.0:12000\"]", "--root-dir", "./nodes/sn-node-14", "--log-dir", "./nodes/sn-node-14"] ...
Launching node #15...
Running '/home/willie/.safe/node/sn_node' with args ["-vvvv", "--hard-coded-contacts", "[\"0.0.0.0:12000\"]", "--root-dir", "./nodes/sn-node-15", "--log-dir", "./nodes/sn-node-15"] ...
Done!

But with an --ip flag it craps out

willie@gagarin:~/.safe/nodes/sn-node-genesis$ RUST_LOG=sn_api,sn_client=trace,sn_node=trace ~/projects/maidsafe/sn_launch_tool-0.0.3/target/release/sn_launch_tool --ip 185.218.13.176 -yy -vv -i3 -n15
Launching with node executable from: /home/willie/.safe/node/sn_node
Network size: 15 nodes
Launching genesis node (#1)...
Running '/home/willie/.safe/node/sn_node' with args ["-vvvv", "--ip", "185.218.13.176", "--first", "--root-dir", "./nodes/sn-node-genesis", "--log-dir", "./nodes/sn-node-genesis"] ...
willie@gagarin:~/.safe/nodes/sn-node-genesis$

So according to bochaco I should add --ip my.ip.v4.adrress to it no?

sn_node

[sn_node] ERROR 2021-02-01T04:02:57.163200761+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

Well thats what I tried there but it seems to crap out - Just about to increase the logging verbosity

willie@gagarin:~$ tail -f ~/.safe/nodes/sn-node-genesis/nodes/sn-node-genesis/sn_node.log 
[sn_node] INFO 2021-02-01T03:07:20.945732129+00:00 [src/bin/sn_node.rs:90] Node PID is: 14718
[sn_node] INFO 2021-02-01T03:07:20.946029495+00:00 [src/bin/sn_node.rs:113] 

Running sn_node v0.25.39
========================
[sn_node] ERROR 2021-02-01T03:07:20.947845978+00:00 [src/bin/sn_node.rs:119] Cannot start node due to error: Routing(Network(Endpoint(Socket(Os { code: 99, kind: AddrNotAvailable, message: "Address not available" }))))

willie@gagarin:~$ tail -f ~/.safe/nodes/sn-node-genesis/nodes/sn-node-genesis/sn_node.log

That seems a dreadfully complex path structure - I think we may have an error here - is this the expected path/intended behaviour?

I’m giving it a thought and I’m not sure it’ll work though…in your setup where your PC doesn’t have the public IP setup, you are just doing port forwarding from the router…perhaps we are missing a feature in the node so it can report itself with a different IP (a public IP) even if it’s listening on a LAN IP… @lionel.faber do you have some ideas if/how this can work in this type of setup? I guess IGD is one answer, perhaps we wanna allow with some flag to set an IP if IGD is not available…?..

2 Likes

The weird thing is, that it was working for my client computer, even with the ports closed for the other elders.
Wait… what if launch just one node on lan ip and join ten others on public ip?

2 Likes

Go for it Courage, mon brave!!!

1 Like

Give it a try, it sounds to me it may work if your router supports IGD…

2 Likes

I get this now

willie@gagarin:~/.safe/nodes/sn-node-genesis$ RUST_LOG=sn_api,sn_client=trace safe cat safe://hy8oycypiop6bqnsnr5j5xda3ejsbb5hqi5u1ubq3prr9y7p83p1pgmbdga
[2021-02-01T03:28:31Z DEBUG sn_api::api::app::safe_client] Connecting to SAFE Network...
[2021-02-01T03:28:31Z DEBUG sn_api::api::app::safe_client] Client to be instantiated with specific pk?: None
[2021-02-01T03:28:31Z DEBUG sn_api::api::app::safe_client] Bootstrap contacts list set to: None
[2021-02-01T03:28:31Z INFO  sn_client::client] Client started for new randomly created pk: PublicKey::Ed25519(e88453..)
[2021-02-01T03:28:31Z TRACE sn_client::config_handler] Not available: /home/willie/.safe/client/sn_client.config
[2021-02-01T03:28:31Z TRACE sn_client::config_handler] Reading: /home/willie/.safe/node/node_connection_info.config
[2021-02-01T03:28:31Z TRACE sn_client::config_handler] New contact added to the hard-coded contacts list: 83.163.103.119:12000
[2021-02-01T03:28:31Z TRACE sn_client::connection_manager] Trying to bootstrap to the network with public_key: PublicKey::Ed25519(e88453..)
[2021-02-01T03:28:31Z TRACE sn_client::connection_manager] Bootstrapping with contacts...
[2021-02-01T03:28:31Z TRACE sn_client::connection_manager] Sending handshake request to bootstrapped node...

and after 5 minutes the logs continue with as before

2021-02-01T03:32:36Z TRACE sn_client::connection_manager] HandshakeResponse::Join Elders: ([(309ed4…, 192.168.178.24:12000), (54c314…, 192.168.178.24:50664), (974b9c…, 192.168.178.24:39372), (a94ce5…, 192.168.178.24:37470)])
[2021-02-01T03:32:42Z WARN sn_client::connection_manager] Failed to connect to Elder @ : Connection lost
[2021-02-01T03:32:42Z WARN sn_client::connection_manager] Connected to only 0 elders.
[2021-02-01T03:32:47Z WARN sn_client::connection_manager] Failed to connect to Elder @ : Connection lost
[2021-02-01T03:32:47Z WARN sn_client::connection_manager] Connected to only 0 elders.
[2021-02-01T03:32:53Z WARN sn_client::connection_manager] Failed to connect to Elder @ : Connection lost
[2021-02-01T03:32:53Z WARN sn_client::connection_manager] Connected to only 0 elders.
[2021-02-01T03:32:58Z WARN sn_client::connection_manager] Failed to connect to Elder @ : Connection lost
[2021-02-01T03:32:58Z WARN sn_client::connection_manager] Connected to only 0 elders.
[2021-02-01T03:32:58Z TRACE sn_client::client] Error connecting to network! Retrying… (1)
[2021-02-01T03:32:58Z TRACE sn_client::connection_manager] Trying to bootstrap to the network with public_key: PublicKey::Ed25519(e88453…)
[2021-02-01T03:32:58Z TRACE sn_client::connection_manager] Bootstrapping with contacts…
[2021-02-01T03:32:59Z TRACE sn_client::connection_manager] Sending handshake request to bootstrapped node…

This does not seem to work.

[folaht@Rezosur-uq safe]$ netstat -tupln
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      -                   
tcp6       0      0 :::22                   :::*                    LISTEN      -                   
udp        0      0 0.0.0.0:49319           0.0.0.0:*                           69802/sn_node       
udp        0      0 0.0.0.0:43201           0.0.0.0:*                           69763/sn_node       
udp        0      0 0.0.0.0:57933           0.0.0.0:*                           69884/sn_node       
udp        0      0 0.0.0.0:51903           0.0.0.0:*                           69789/sn_node       
udp        0      0 0.0.0.0:58056           0.0.0.0:*                           69870/sn_node       
udp        0      0 0.0.0.0:41859           0.0.0.0:*                           69815/sn_node       
udp        0      0 0.0.0.0:60500           0.0.0.0:*                           69840/sn_node       
udp        0      0 0.0.0.0:56503           0.0.0.0:*                           69898/sn_node       
udp        0      0 0.0.0.0:42270           0.0.0.0:*                           69776/sn_node       
udp        0      0 0.0.0.0:40223           0.0.0.0:*                           69920/sn_authd      
udp        0      0 0.0.0.0:52667           0.0.0.0:*                           69857/sn_node       
udp     7040      0 192.168.178.24:12000    0.0.0.0:*                           69630/sn_node       
udp        0      0 0.0.0.0:68              0.0.0.0:*                           -                   
udp6       0      0 ::1:33000               :::*                                69920/sn_authd      
udp6       0      0 :::546                  :::*                                -                   
[folaht@Rezosur-uq safe]$ ps -ef | grep sn_node
folaht     69630       1 43 04:18 pts/1    00:04:51 /home/folaht/.safe/node/sn_node -vv --idle-timeout-msec 5500 --keep-alive-interval-msec 5 --ip 192.168.178.24 --first --root-dir /home/folaht/.safe/node/baby-fleming-nodes/sn-node-genesis --log-dir /home/folaht/.safe/node/baby-fleming-nodes/sn-node-genesis
folaht     69763       1  7 04:27 pts/1    00:00:11 /home/folaht/.safe/node/sn_node -vv --hard-coded-contacts ["83.163.103.119:12000"] --root-dir /home/folaht/.safe/node/local-node --log-dir /home/folaht/.safe/node/local-node
folaht     69776       1  7 04:27 pts/1    00:00:10 /home/folaht/.safe/node/sn_node -vv --hard-coded-contacts ["83.163.103.119:12000"] --root-dir /home/folaht/.safe/node/local-node --log-dir /home/folaht/.safe/node/local-node
folaht     69789       1  7 04:27 pts/1    00:00:10 /home/folaht/.safe/node/sn_node -vv --hard-coded-contacts ["83.163.103.119:12000"] --root-dir /home/folaht/.safe/node/local-node --log-dir /home/folaht/.safe/node/local-node
folaht     69802       1  6 04:27 pts/1    00:00:10 /home/folaht/.safe/node/sn_node -vv --hard-coded-contacts ["83.163.103.119:12000"] --root-dir /home/folaht/.safe/node/local-node --log-dir /home/folaht/.safe/node/local-node
folaht     69815       1  6 04:27 pts/1    00:00:10 /home/folaht/.safe/node/sn_node -vv --hard-coded-contacts ["83.163.103.119:12000"] --root-dir /home/folaht/.safe/node/local-node --log-dir /home/folaht/.safe/node/local-node
folaht     69840       1  3 04:28 pts/1    00:00:03 /home/folaht/.safe/node/sn_node -vv --hard-coded-contacts ["83.163.103.119:12000"] --root-dir /home/folaht/.safe/node/local-node --log-dir /home/folaht/.safe/node/local-node
folaht     69857       1  3 04:29 pts/1    00:00:00 /home/folaht/.safe/node/sn_node -vv --hard-coded-contacts ["83.163.103.119:12000"] --root-dir /home/folaht/.safe/node/local-node --log-dir /home/folaht/.safe/node/local-node
folaht     69870       1  3 04:29 pts/1    00:00:00 /home/folaht/.safe/node/sn_node -vv --hard-coded-contacts ["83.163.103.119:12000"] --root-dir /home/folaht/.safe/node/local-node --log-dir /home/folaht/.safe/node/local-node
folaht     69884       1  4 04:29 pts/1    00:00:00 /home/folaht/.safe/node/sn_node -vv --hard-coded-contacts ["83.163.103.119:12000"] --root-dir /home/folaht/.safe/node/local-node --log-dir /home/folaht/.safe/node/local-node
folaht     69898       1  4 04:29 pts/1    00:00:00 /home/folaht/.safe/node/sn_node -vv --hard-coded-contacts ["83.163.103.119:12000"] --root-dir /home/folaht/.safe/node/local-node --log-dir /home/folaht/.safe/node/local-node
folaht     69907   58028  0 04:29 pts/1    00:00:00 grep sn_node

I’m going to bed.

#MeToo +10ch

My router runs FRITZ!OS 7.21. I’m not familiar with IGD, so I don’t know how to find direct proof of that but this document mentioning IGD support of FRITZ!OS 6.93, the wikipedia IGD page mentioning FRITZ!Box as using IGD and another document mentioning that FRITZ!OS 7.21 can be accessed through the IGD protocol probably means yes.

A network thing to be aware of is hairpinning, check wiki. But you do need to use public IP addresses for all nodes, however, if your router does not support hairpinning then you are stuck with just one node as the rest of your local nodes won’t see the public address of your others. It’s just networking though and not a Safe issue. Hope this helps.

4 Likes

How can I determine if my router supports hairpinning?

Quick test would be to send a message from the external IP:port of one node from the other. If it works you are good, otherwise it won’t work.

Using Safe, then make sure your genesis node IP:port in the config other nodes read is the exernal one (not the lan one). If they connect you are good.

3 Likes