SAFE Network App for ARM?

I’m running this on an Oracle Cloud ARM instance, bootstrapping with safe node run-baby-fleming.
I need to find a config file to change it to the addresses running on my instance; if anyone has a pointer, that would be great.
I’ll then try to add a node from another cloud instance; my home router doesn’t play well with IGD, but I’m hoping the Oracle cloud instance will.
If that works, I’ll publish the config file and hopefully that will allow others to join

1 Like

YOu should be able to find the addresses and ports your nodes are running on by looking at the start of the genesis node log
Also check what you have in ~/.safe/node/node_connection_info.config

so, I created a node_connection_info.config with the contacts below:

[
"140.238.207.60:46279",
"140.238.207.60:45129",
"140.238.207.60:38298",
"140.238.207.60:57885",
"140.238.207.60:53385",
"140.238.207.60:47557",
"140.238.207.60:56598",
"140.238.207.60:49447",
"140.238.207.60:59296",
"140.238.207.60:43325",
"140.238.207.60:36976"
]

this corresponds to the node_connection_info.config on my cloud instance, modified substituting 127.0.0.1 with the actual external IP address of the instance…does that make any sense?

But when I try to add a node from another instance, with that config file in place, i get:

ubuntu@instance-20210720-1908:~/.safe/node$ safe node join
Joining network with contacts {140.238.207.60:38298, 140.238.207.60:43325, 140.238.207.60:57885, 140.238.207.60:53385, 140.238.207.60:47557, 140.238.207.60:46279, 140.238.207.60:45129, 140.238.207.60:56598, 140.238.207.60:49447, 140.238.207.60:59296, 140.238.207.60:36976} ...
Creating '/home/ubuntu/.safe/node/local-node' folder
Storing nodes' generated data at /home/ubuntu/.safe/node/local-node
Starting a node to join a Safe network...
Launching with node executable from: /home/ubuntu/.safe/node/sn_node
Version: safe_network 0.7.18
Using RUST_LOG 'safe_network=debug'
Node to be started with contact(s): ["140.238.207.60:38298","140.238.207.60:43325","140.238.207.60:57885","140.238.207.60:53385","140.238.207.60:47557","140.238.207.60:46279","140.238.207.60:45129","140.238.207.60:56598","140.238.207.60:49447","140.238.207.60:59296","140.238.207.60:36976"]
Launching node...
Node logs are being stored at: /home/ubuntu/.safe/node/local-node/sn_node_rCURRENT.log
(Note that log files are rotated, and subsequent files will be named sn_node_r[NNNNN].log, with values starting at 00000 and up to 99999.
ubuntu@instance-20210720-1908:~/.safe/node$ tail -f local-node/sn_node.log.2021-07-20-11 
Jul 20 11:06:01.313  INFO sn_node safe_network::routing::routing_api:6688c6.. Bootstrapping a new node.

and it hangs there…

1 Like

Can you put the logging to max and try again and lets see whats in the logs, please?

I will not be able to join in until much later tonight, sorry, even on a non-Pi node.

EDIT: Should this get renamed to “New Community Testnet attempt” or something as it is no longer ARM exclusive and we may get more participation that way?

Although your work on ARM is VERY much appreciated :slight_smile:

1 Like

let’s see if I get anywhere…I think the problem is with Oracle cloud; for some reason I assumed it had not much of a firewall, while it looks like it has some stringent security rules (and why would it be any different…)
So I need to find out how to make my nodes reachable for this to have any chance to work…

1 Like

No experience with Oracle Cloud - it rejected my debit card and there is NO way they are getting my credit card - even though it says it accepts both.

If you were on AWS I’d be looking at establishing rules for each port in the security groups so the first place I’d look is in whatever the equivalent is on Oracle.
I get the feeling you are very nearly there - please keep at it :slight_smile:

sorry mate, giving up for today, I’ll try again in the next couple of days.
Only seem to be able to create genesis node with localhost address:

~/.safe/node$ ./sn_node --first 127.0.0.1:30000
Starting logging to stdout
Jul 20 14:21:06.053  INFO sn_node: 

Running safe_network v0.7.18
============================
Jul 20 14:21:06.055  INFO safe_network::routing::routing_api: 93b72e.. Starting a new network as the genesis node (PID: 69023).
Jul 20 14:21:06.065  INFO safe_network::routing::routing_api: a3c7b1.. Bootstrapped!
Node PID: 69023, prefix: Prefix(), name: 93b72e.., connection info:
"127.0.0.1:30000"
Jul 20 14:21:06.097  INFO safe_network::node::node_api: Node PID: 69023, prefix: Prefix(), name: 93b72e.., connection info: "127.0.0.1:30000"
Jul 20 14:21:06.192  INFO safe_network::node::event_mapping: Handling RoutingEvent: EldersChanged { elders: Elders { prefix: Prefix(), key: PublicKey(196c..be6e), remaining: {}, added: {93b72e(10010011)..}, removed: {} }, self_status_change: Promoted }

attempts with local IP fail:

~/.safe/node$ ./sn_node --first 10.0.0.248:30000
Starting logging to stdout
Jul 20 14:16:00.760  INFO sn_node: 

Running safe_network v0.7.18
============================
Jul 20 14:16:00.783  INFO safe_network::routing::routing_api: 226a83.. Starting a new network as the genesis node (PID: 69008).
Jul 20 14:16:30.793  INFO qp2p::endpoint: Query to echo service timed out: Elapsed(())    
Jul 20 14:16:40.795  INFO qp2p::endpoint: IGD request failed: Could not find the gateway device for IGD - IgdSearch(IoError(Custom { kind: TimedOut, error: "search timed out" }))    
Cannot start node due to error: Routing(CannotConnectEndpoint { err: UnresolvedPublicIp }). If this is the first node on the network pass the local address to be used using --first. Exiting
Jul 20 14:16:40.795 ERROR sn_node: Cannot start node due to error: Routing(CannotConnectEndpoint { err: UnresolvedPublicIp }). If this is the first node on the network pass the local address to be used using --first. Exiting

creating subsequent node with hardcoded bootstrapping node fails as well:

~/.safe/node$ ./sn_node -h=[\"140.238.207.60:30000\"] --root-dir $HOME/.safe/node/node1
Starting logging to stdout
Jul 20 14:23:43.121  INFO sn_node: 

Running safe_network v0.7.18
============================
Jul 20 14:23:43.155  INFO safe_network::routing::routing_api: d13c5f.. Bootstrapping a new node.
Jul 20 14:24:13.156  INFO qp2p::endpoint: Query to echo service timed out: Elapsed(())    
Jul 20 14:24:23.159  INFO qp2p::endpoint: IGD request failed: Could not find the gateway device for IGD - IgdSearch(IoError(Custom { kind: TimedOut, error: "search timed out" }))    
Cannot start node due to error: Routing(CannotConnectEndpoint { err: UnresolvedPublicIp }). If this is the first node on the network pass the local address to be used using --first. Exiting
Jul 20 14:24:23.165 ERROR sn_node: Cannot start node due to error: Routing(CannotConnectEndpoint { err: UnresolvedPublicIp }). If this is the first node on the network pass the local address to be used using --first. Exiting

I’m afraid Oracle Virtual Cloud Networks configuration might be beyond my comprehension…

1 Like

update: I think I’ve got it.

can someone try to join with:

./sn_node -m 2000000000 --skip-igd -h '["140.238.207.60:30001"]' --root-dir ~/.safe/node/node7

Note: please ONLY join with the following version:

safe_network v0.7.18
sn_cli v0.32.1

edit1: I killed my local node because I was getting errors on the cloud nodes (bloody netgear router not playing nice with IGD) :

Jul 24 09:13:39.519  WARN qp2p::connections: Failed to read incoming message on uni-stream for peer 180.150.10.164:58097 with error: TimedOut    
Jul 24 09:13:39.519  WARN qp2p::connections: Failed to read incoming message on bi-stream for peer 180.150.10.164:58097 with error: TimedOut    
Jul 24 09:13:39.537  WARN qp2p::connections: Failed to read incoming message on uni-stream for peer 180.150.10.164:58097 with error: TimedOut    
Jul 24 09:13:39.537  WARN qp2p::connections: Failed to read incoming message on bi-stream for peer 180.150.10.164:58097 with error: TimedOut    
Jul 24 09:21:04.832  WARN qp2p::connections: Failed to read incoming message on uni-stream for peer 180.150.10.164:61351 with error: TimedOut    
Jul 24 09:21:04.832  WARN qp2p::connections: Failed to read incoming message on bi-stream for peer 180.150.10.164:61351 with error: TimedOut  

but the nodes on the cloud seem to be working fine, so please try to join!

4 Likes

For anyone interested to build sn_node from source with v0.7.18 version:

  • git clone https://github.com/maidsafe/safe_network.git
  • cd safe_network
  • git checkout v0.7.18
  • cargo build --release --bin sn_node

I tried to connect to your node with a node on DO but I get this:

Running safe_network v0.7.18
============================
Jul 24 09:45:46.033  INFO safe_network::routing::routing_api: c1aed0.. Bootstrapping a new node.
Jul 24 09:45:46.035  INFO qp2p::endpoint: Verifying provided public IP address
Jul 24 09:45:47.208  INFO qp2p::endpoint: Endpoint verification successful! 104.248.129.139:5483 is reachable.
Jul 24 09:45:47.794  INFO safe_network::routing::routing_api: c1aed0.. Joining as a new node (PID: 8427) from 104.248.129.139:5483 to 140.238.207.60:30001
Jul 24 09:45:47.795  INFO safe_network::routing::core::bootstrap::join: Sending JoinRequest { section_key: PublicKey(0314..8ad8), resource_proof_response: None } to [(c1aed0(11000001).., 140.238.207.60:30001)]
Jul 24 09:45:48.144  INFO safe_network::routing::core::bootstrap::join: Setting Node name to 8b8338..
Jul 24 09:45:48.145  INFO safe_network::routing::core::bootstrap::join: Newer Join response for our prefix SectionAuthorityProvider { prefix: (), section_key: PublicKey(1882..57c2), elders: {(227e47(00100010).., 10.0.0.248:34304), (54d424(01010100).., 10.0.0.248:36507), (5a1a79(01011010).., 10.0.0.248:30001), (5aca97(01011010).., 10.0.0.248:37684), (ab828b(10101011).., 10.0.0.248:53784), (b2f501(10110010).., 10.0.0.248:40695), (ec69d9(11101100).., 10.0.0.248:54052)} } from 140.238.207.60:30001
Jul 24 09:45:48.145  INFO safe_network::routing::core::bootstrap::join: Sending JoinRequest { section_key: PublicKey(1882..57c2), resource_proof_response: None } to [(227e47(00100010).., 10.0.0.248:34304), (54d424(01010100).., 10.0.0.248:36507), (5a1a79(01011010).., 10.0.0.248:30001), (5aca97(01011010).., 10.0.0.248:37684), (ab828b(10101011).., 10.0.0.248:53784), (b2f501(10110010).., 10.0.0.248:40695), (ec69d9(11101100).., 10.0.0.248:54052)]
Jul 24 09:46:48.152 ERROR safe_network::routing::core::bootstrap::join: Failed to send message WireMsg { header: WireMsgHeader { version: 1, msg_envelope: MsgEnvelope { msg_id: 8ccba1c4.., msg_kind: NodeSignedMsg { section_pk: PublicKey(1882..57c2), public_key: 8b83..ee20, signature: 83f2..9a0d }, dst_location: DirectAndUnrouted(PublicKey(1882..57c2)) } } } to [10.0.0.248:34304, 10.0.0.248:36507, 10.0.0.248:53784, 10.0.0.248:30001, 10.0.0.248:37684, 10.0.0.248:40695, 10.0.0.248:54052]
Encountered a timeout while trying to join the network. Retrying after 3 minutes.
Jul 24 09:48:46.014 ERROR sn_node: Encountered a timeout while trying to join the network. Retrying after 3 minutes.
Jul 24 09:51:46.020  INFO safe_network::routing::routing_api: d03c72.. Bootstrapping a new node.
Jul 24 09:51:46.021  INFO qp2p::endpoint: Verifying provided public IP address
Jul 24 09:51:47.194  INFO qp2p::endpoint: Endpoint verification successful! 104.248.129.139:5483 is reachable.
Jul 24 09:51:47.781  INFO safe_network::routing::routing_api: d03c72.. Joining as a new node (PID: 8427) from 104.248.129.139:5483 to 140.238.207.60:30001
Jul 24 09:51:47.783  INFO safe_network::routing::core::bootstrap::join: Sending JoinRequest { section_key: PublicKey(1312..c93a), resource_proof_response: None } to [(d03c72(11010000).., 140.238.207.60:30001)]
Jul 24 09:51:48.095  INFO safe_network::routing::core::bootstrap::join: Setting Node name to 7d5668..
Jul 24 09:51:48.095  INFO safe_network::routing::core::bootstrap::join: Newer Join response for our prefix SectionAuthorityProvider { prefix: (), section_key: PublicKey(1882..57c2), elders: {(227e47(00100010).., 10.0.0.248:34304), (54d424(01010100).., 10.0.0.248:36507), (5a1a79(01011010).., 10.0.0.248:30001), (5aca97(01011010).., 10.0.0.248:37684), (ab828b(10101011).., 10.0.0.248:53784), (b2f501(10110010).., 10.0.0.248:40695), (ec69d9(11101100).., 10.0.0.248:54052)} } from 140.238.207.60:30001
Jul 24 09:51:48.095  INFO safe_network::routing::core::bootstrap::join: Sending JoinRequest { section_key: PublicKey(1882..57c2), resource_proof_response: None } to [(227e47(00100010).., 10.0.0.248:34304), (54d424(01010100).., 10.0.0.248:36507), (5a1a79(01011010).., 10.0.0.248:30001), (5aca97(01011010).., 10.0.0.248:37684), (ab828b(10101011).., 10.0.0.248:53784), (b2f501(10110010).., 10.0.0.248:40695), (ec69d9(11101100).., 10.0.0.248:54052)]
Jul 24 09:52:48.102 ERROR safe_network::routing::core::bootstrap::join: Failed to send message WireMsg { header: WireMsgHeader { version: 1, msg_envelope: MsgEnvelope { msg_id: 197efe5d.., msg_kind: NodeSignedMsg { section_pk: PublicKey(1882..57c2), public_key: 7d56..712e, signature: c7bd..8909 }, dst_location: DirectAndUnrouted(PublicKey(1882..57c2)) } } } to [10.0.0.248:30001, 10.0.0.248:34304, 10.0.0.248:36507, 10.0.0.248:37684, 10.0.0.248:53784, 10.0.0.248:54052, 10.0.0.248:40695]
Encountered a timeout while trying to join the network. Retrying after 3 minutes.
Jul 24 09:54:46.017 ERROR sn_node: Encountered a timeout while trying to join the network. Retrying after 3 minutes.

IP address 10.0.0.248 is very strange and is not reachable from the internet. Is it an address in an internal network?

I don’t expected this to be the start of durable network, it’s just for the fun of it and I have promo credits that expire in 2 days.

3 Likes

definitely won’t be…just a test if I could run nodes on Oracle cloud at first, and then tried to make them reachable from outside…

Yeap. I thought launching the nodes with the public IP, as I did, e.g.:

./sn_node -m 2000000000 --skip-igd -h '["140.238.207.60:30001"]' --root-dir ~/.safe/node/node4

would make the nodes advertise their public IP, but clearly not.
Interestigly though, the command above worked when I try to join locally, maybe because the genesis node was enough at that point to connect…

3 Likes

Try to specify the IP address of the nodes you launch after the genesis node by adding --local-addr 104.248.129.139:3000N (with a port number different for each node)

For example: ./sn_node -m 2000000000 --skip-igd -h '["140.238.207.60:30001"]' --local-addr 140.238.207.60:3000N --root-dir ~/.safe/node/nodeN` where N is the node number >= 2 for non genesis nodes.

EDIT: --first option of genesis node must also reference global IP address. Something like:
./sn_node -m 2000000000 --skip-igd --first 140.238.207.60:30001 --root-dir ~/.safe/node/node1

2 Likes

Thanks, I’ll give it a go in a couple of hours

genesis node need to have local address by the look of it:

ubuntu@instance-20210709-0856:~/.safe/node$ ./sn_node -m 2000000000 --skip-igd --first 140.238.207.60:30001 -vvv
Starting logging to stdout
Jul 24 11:31:11.363  INFO sn_node: 

Running safe_network v0.7.18
============================
Jul 24 11:31:11.377  INFO safe_network::routing::routing_api: f3a5b9.. Starting a new network as the genesis node (PID: 114346).
Jul 24 11:31:11.377 ERROR qp2p::api: Cannot assign requested address (os error 99)    
Cannot start node due to error: Routing(CannotConnectEndpoint { err: CannotAssignPort(30001) }). If this is the first node on the network pass the local address to be used using --first. Exiting
Jul 24 11:31:11.377 ERROR sn_node: Cannot start node due to error: Routing(CannotConnectEndpoint { err: CannotAssignPort(30001) }). If this is the first node on the network pass the local address to be used using --first. Exiting
ubuntu@instance-20210709-0856:~/.safe/node$ ./sn_node -m 2000000000 --skip-igd --first 10.0.0.248:30001 -vvv
Starting logging to stdout
Jul 24 11:31:57.191  INFO sn_node: 

Running safe_network v0.7.18
============================
Jul 24 11:31:57.205  INFO safe_network::routing::routing_api: 387572.. Starting a new network as the genesis node (PID: 114353).
Jul 24 11:31:57.215  INFO safe_network::routing::routing_api: 32d93f.. Bootstrapped!
Node PID: 114353, prefix: Prefix(), name: 387572.., connection info:
"10.0.0.248:30001"
Jul 24 11:31:57.223  INFO safe_network::node::node_api: Node PID: 114353, prefix: Prefix(), name: 387572.., connection info: "10.0.0.248:30001"
Jul 24 11:31:57.311  INFO safe_network::node::event_mapping: Handling RoutingEvent: EldersChanged { elders: Elders { prefix: Prefix(), key: PublicKey(0b78..2269), remaining: {}, added: {387572(00111000)..}, removed: {} }, self_status_change: Promoted }

and I get an error trying to assign --local-addr:

~/.safe/node$ ./sn_node -m 2000000000 --skip-igd -h '["140.238.207.60:30001"]' --local-addr 140.238.207.60:30002 --root-dir ~/.safe/node/node2
Starting logging to stdout
Jul 24 11:36:09.473  INFO sn_node: 

Running safe_network v0.7.18
============================
Jul 24 11:36:09.501  INFO safe_network::routing::routing_api: d48d84.. Bootstrapping a new node.
Jul 24 11:36:09.502 ERROR qp2p::api: Cannot assign requested address (os error 99)    
Cannot start node due to error: Routing(CannotConnectEndpoint { err: CannotAssignPort(30002) }). If this is the first node on the network pass the local address to be used using --first. Exiting
Jul 24 11:36:09.502 ERROR sn_node: Cannot start node due to error: Routing(CannotConnectEndpoint { err: CannotAssignPort(30002) }). If this is the first node on the network pass the local address to be used using --first. Exiting

3 Likes

This means your instance cannot access its own global IP address, which is a serious limitation of Oracle Cloud.

In the past I have used 2 other providers (DO and Hetzner) and I never came across such a problem.

For example I have just relaunched my node on DO as a genesis node and it worked fined. My command was: sn_node -m $(numfmt --from auto 40G) --first 104.248.129.139:5483 --skip-igd -vvvv --clear-data > v.log 2>&1 &

Running safe_network v0.7.18
============================
Jul 24 13:02:13.152  INFO safe_network::routing::routing_api: 7a4fb5.. Starting a new network as the genesis node (PID: 9217).
Jul 24 13:02:13.173  INFO safe_network::routing::routing_api: 2b2500.. Bootstrapped!
Node PID: 9217, prefix: Prefix(), name: 7a4fb5.., connection info:
"104.248.129.139:5483"
Jul 24 13:02:13.214  INFO safe_network::node::node_api: Node PID: 9217, prefix: Prefix(), name: 7a4fb5.., connection info: "104.248.129.139:5483"
Jul 24 13:02:13.257  INFO safe_network::node::event_mapping: Handling RoutingEvent: EldersChanged { elders: Elders { prefix: Prefix(), key: PublicKey(13eb..804c), remaining: {}, added: {7a4fb5(01111010)..}, removed: {} }, self_status_change: Promoted }

If anyone wants to connect to it, please go ahead. I will run it for 2 days.

Connection info is 104.248.129.139:5483 and node version is v0.7.18 (11 days old, but is the one specified by @stout77).

3 Likes

Thanks @tfa, I launched a couple of nodes from my Oracle Cloud instance and connected successfully to your genesis node.
in the end, to summarise this experiment of mine:

  • Oracle Cloud provides an always free instance, Arm Ampere 4 OCPUs and 24 GB of memory and 250GB max disk space (or 4 instances with 1/4 resources)
  • Maidsafe provided binaries work on above instance, running Canonical-Ubuntu
  • Launching a genesis node on the above instance seems problematic, although I believe further investigation should be done on this point, just don’t have time ATM
  • hosting Safenetwork nodes on the infrastructure above is feasible and works, which was what I was interested in the end, so I’m satisfied with the experiment.
2 Likes

Yes, I confirm your 2 nodes (143eba… at 140.238.207.60:59420 and 6c8a26… at 140.238.207.60:36693) have joined mine (7a4fb5… at 104.248.129.139:5483).

1 Like

Being able to run nodes for free (up to four per account) looks a great way to get people involved. I’ll probably add this to my cloud test nodes.

If anyone has time to provide a Sign up and setup on Oracle Cloud for dummies topic, that could be really helpful in getting more of the community involved, especially as it costs nothing.

I couldn’t see the storage figures you mentioned (250GB max disk space). For the free tier I found a couple of feature lists:

Infrastructure

2 AMD based Compute VMs with 1/8 OCPU** and 1 GB memory each.
4 Arm-based Ampere A1 cores and 24 GB of memory usable as one VM or up to 4 VMs.
2 Block Volumes Storage, 200 GB total.
10 GB Object Storage.
10 GB Archive Storage.
Resource Manager: managed Terraform.
5 OCI Bastions.
[snip]

Additional services
[snip]
Outbound Data Transfer: 10 TB per month.
Virtual Cloud Networks (VCN): Maximum of 2 VCNs, includes IPv4 and IPv6 support.
VCN Flow Logs: Up to 10 GB per month shared across OCI Logging services.
Site-to-Site VPN: 50 IPSec connections.
[snip]

Ref: Oracle Cloud Free Tier | Oracle

And…

What are Always Free services?

Always Free services are part of Oracle Cloud Free Tier. Always Free services are available for an unlimited time. Some limitations apply. As new Always Free services become available, you will automatically be able to use those as well.

The following services are available as Always Free:

AMD-based Compute
Arm-based Ampere A1 Compute
Block Volume
Object Storage
Archive Storage
Flexible Load Balancer
Flexible Network Load Balancer
VPN Connect
Outbound Data Transfer
Autonomous Data Warehouse
Autonomous Transaction Processing
Autonomous JSON Database
NoSQL Database
APEX Application Development

Resource Manager (Terraform)
Monitoring
Notifications
Logging
Application Performance Monitoring
Service Connector Hub
Vault
Bastions
Security Zones
Security Advisor
Virtual Cloud Networks
Site-to-Site VPN
Content Management Starter Edition

Ref: FAQ on Oracle's Cloud Free Tier

Do folks know of any other places we could run nodes for free?

2 Likes

Owing to unfortunate personal and technical reasons i wont be able to join in with this to any extent.
I have to spend most of my time in hospital right now and the free patient wifi is excellent for phones but will just not play with my laptop(probably some very good security reasons for that) I can tether the laptop to the phone network connection but it is slower than a wet Sunday in Stornoway.

keep at it folks and all the best.

PS was anyone able to sign up with Oracle with a debit card. I am extremely reluctant to let them have my credit card details. Said card works just fine with AWS btw…

5 Likes

That would be 50 GB boot volume for the instance plus

You can customise the boot volume, but didn’t find a way to make it less than 50 GB, only bigger

1 Like

Sorry to hear @Southside, I hope everything goes well for you and your family.

As for Oracle Cloud, I’m 100% sure I joined with a visa debit; haven’t used my credit card in years…

4 Likes