Community-Test (oct8) Ofline

What did you change to join from your previous attempt?
I get the same error you were getting

1 Like

Haha, I don’t blame you or @Josh, you guys have been at it for a couple days now. Truly appreciated.

I am on a MacBook Air running BigSur 11.5.1

I open the terminal and run

curl -so- https://sn-api.s3.amazonaws.com/install.sh | bash

to download safe CLI and I see this in the terminal

curl -so- https://sn-api.s3.amazonaws.com/install.sh | bash => Downloading Safe CLI package from 'https://sn-api.s3.eu-west-2.amazonaws.com/sn_cli-latest-x86_64-apple-darwin.tar.gz'...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 7486k 100 7486k 0 0 4302k 0 0:00:01 0:00:01 --:--:-- 4300k
=> Unpacking Safe CLI to '/Users/me/.safe/cli'...
=> Adding statement to '/Users/me/.bash_profile' profile to have Safe CLI binary path in the $PATH
=> Profile '/Users/me/.bash_profile' already contains a statement to set Safe CLI in the $PATH
me@Me-MacBook-Air ~ % safe node install --version 0.32.0
zsh: command not found: safe
me@Me-MacBook-Air ~ % node install
zsh: command not found: node

I tried node install without the safe command because that had worked for me in the past.

When I download sn_node 0.32.0 from the GitHub releases page and launch it I get

Starting logging to stdout
Error:
0: Cannot start node. If this is the first node on the network pass the local address to be used using --first
1: Routing error:: Configuration error: Network's genesis key was not provided.
2: Configuration error: Network's genesis key was not provided.

Location: src/bin/sn_node.rs:201

Backtrace omitted.
Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Process completed]

I don’t know how to add the genesis key/config file because as soon as I open sn_node it executes.

I’ve tried several different things that also didn’t work but this is what I was reading as the proper steps but being I can’t get er going that is likely not the case.

The other process I tried was downloading sn_node in the terminal and trying to run RUST_LOG=info ~/.safe/node/sn_node --hard-coded-contacts '["178.62.91.184:12000"]' --genesis-key
817193a6d3ad98e543cfcd0fbd5a5d9152d4f040205646509c3120f10fec268fa13ddb8199116ecf37fe8a12b3466342 --local-addr xx.xx.xx.xx:0 --skip-igd with my IP where the x’s are like posted in the OP. See here.

curl -so- https://sn-api.s3.amazonaws.com/install.sh | bash safe node install --version 0.32.0
=> Downloading Safe CLI package from 'https://sn-api.s3.eu-west-2.amazonaws.com/sn_cli-latest-x86_64-apple-darwin.tar.gz'...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 7486k 100 7486k 0 0 4097k 0 0:00:01 0:00:01 --:--:-- 4095k
=> Unpacking Safe CLI to '/Users/me/.safe/cli'...
=> Adding statement to '/Users/me/.bash_profile' profile to have Safe CLI binary path in the $PATH
=> Profile '/Users/me/.bash_profile' already contains a statement to set Safe CLI in the $PATH
zsh: command not found: safe
me@Me-MacBook-Air ~ % RUST_LOG=info ~/.safe/node/sn_node --hard-coded-contacts '["178.62.91.184:12000"]' --genesis-key
817193a6d3ad98e543cfcd0fbd5a5d9152d4f040205646509c3120f10fec268fa13ddb8199116ecf37fe8a12b3466342 --local-addr xx.xx.xx.xx:0 --skip-igd
error: Found argument '--genesis-key' which wasn't expected, or isn't valid in this context

USAGE: sn_node --hard-coded-contacts <hard-coded-contacts>

Edit: I don’t think I’m even getting sn_node 0.32.0 downloaded at all because safe, node, safe node install --version 0.32.0 any combination are not recognized commands.

1 Like

Sometimes you may need to restart your terminal after installing the CLI before installing sn_node.

How are you opening sn_node?

You only need enter the path to your node binary along with the genesis key and a ip from the config.

So try this in your terminal
~/.safe/node/sn_node --hard-coded-contacts '["178.62.91.184:12000"]' --genesis-key 817193a6d3ad98e543cfcd0fbd5a5d9152d4f040205646509c3120f10fec268fa13ddb8199116ecf37fe8a12b3466342 --local-addr xx.xxx.xx.xxx:0

Adding your ip at the end in place in place of xx.xxx.xx.xx keep the :0

If that does not work hopefully Chris can be of better assistance.

2 Likes

Haven’t tried this yet, I’ll give it a shot.

Part of my ignorance is manually setting Paths. Not sure how to do that yet. I see when I download things in the Terminal it says the Paths are set for command for safe CLI etc but commands never seem to work so far.

I amended my previous post to add my experience trying that but I’ll restart the terminal and give it all another shot.

Thanks Josh

2 Likes

similarly, what worked for me was using --local-addr 0.0.0.0:0

still waiting to get in, but at least connected to the bootstrap node:

ubuntu@instance-20210709-0856:~/sn_api-0.38.0$ RUST_LOG=info ~/.safe/node/sn_node --hard-coded-contacts '["178.62.91.184:12000"]' --genesis-key 817193a6d3ad98e543cfcd0fbd5a5d9152d4f040205646509c3120f10fec268fa13ddb8199116ecf37fe8a12b3466342 --local-addr 0.0.0.0:0 --skip-igd       Starting logging to stdout
Oct 09 03:23:05.644  INFO sn_node: 

Running safe_network v0.32.0
============================
Oct 09 03:23:05.648  INFO safe_network::routing::routing_api: 714e82.. Bootstrapping a new node.
Oct 09 03:23:06.804  INFO safe_network::routing::routing_api: 714e82.. Joining as a new node (PID: 637031) our socket: 140.238.207.60:38873, bootstrapper was: 178.62.91.184:12000, network's genesis key: PublicKey(0171..ec21)
Oct 09 03:23:06.806  INFO safe_network::routing::core::bootstrap::join: Sending JoinRequest { section_key: PublicKey(0171..ec21), resource_proof_response: None } to [(714e82(01110001).., 178.62.91.184:12000)]
Encountered a timeout while trying to join the network. Retrying after 3 minutes.
Oct 09 03:26:05.656 ERROR sn_node: Encountered a timeout while trying to join the network. Retrying after 3 minutes.
4 Likes

And if you run safe node bin-version in the terminal it says 0.32.0
I hope you get it sorted. Need to catch some z’s. Good luck

3 Likes

This only works for me if I append --skip-igd
and then it times out but at least it connects.

2 Likes

I haven’t had any luck connecting in the past few hours since I successfully connected a while ago. It keeps timing out. This is with --skip-igd and --local-addr 0.0.0.0:12000.

On another note, I also tried without the argument --skip-igd (testing that feature out) with manual NAT rules disabled, and ran the following command line:

RUST_LOG=info $HOME/.safe/node/sn_node --hard-coded-contacts ā€˜[ā€œ178.62.91.184:12000ā€]’ --genesis-key 817193a6d3ad98e543cfcd0fbd5a5d9152d4f040205646509c3120f10fec268fa13ddb8199116ecf37fe
8a12b3466342 --local-addr local_IP_of_VM:12000 --public-addr wan_ip:12000

It seemed to have configured the router’s UPnP properly seamlessly, where Int IP is the local IP of the VM running the safe node pid:

It then said bootstrapping a node… Joining as a new node… Sending JoinRequests… but eventually timed out:

I could see the state table on the router, and packets were sent on from the local VM IP to the bootstrap node 178.62.91.184, but stopped as soon as timeout was hit.

4 Likes

Yes, but no chunks.
(at least not in blobs directory. I suspect that small chunks may be stored inside db file)
Zero size of blobs directory is strange comparing with ~1.5GB from oct6 v1.


safe cat safe://hygoygyyd34jqo3phfarjez1kkph13zjnco7pocgttca77zuuzgddg3zieqso > 1.jpg fails with error

Error:
   0: ←[91mNetDataError: Failed to GET Spot: NoResponse←[0m

Location:
   ←[35m/rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b\library\core\src\result.
rs←[0m:←[35m1897←[0m

Backtrace omitted.
Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.

while safe dog works fine:

d:\SN>safe dog safe://hygoygyyd34jqo3phfarjez1kkph13zjnco7pocgttca77zuuzgddg3zie
qso

== URL resolution step 1 ==
Resolved from: safe://hygoygyyd34jqo3phfarjez1kkph13zjnco7pocgttca77zuuzgddg3zie
qso
= File =
XOR-URL: safe://hygoygyyd34jqo3phfarjez1kkph13zjnco7pocgttca77zuuzgddg3zieqso
XOR name: 0xce92e865bc2e08945e4a53792cdd22643ad830d18b31dede73b9863366f543ad
Native data type: PublicBlob
Media type: image/jpeg

Since it looks like there will be no useful data from this network anymore, I am uploading logs: Zippyshare.com - [now defunct] Free File Hosting

3 Likes

Just FYIs:

You shouldn’t need to have the genesis key or hard coded contacts in the node command if you already have the node_connection_info.config in the correct place (`~/.safe/node/node_connection_info.config).

No changes needed for CLI config once you have that too. (It should really be network.config or something to be fair).

4 Likes

First attempt was from my home PC, second was from a cloud VM

2 Likes

There’s something strange going on with your shell setup here.

The CLI gets installed to ~/.safe/cli/safe and then the installer tries to add ~/.safe/cli to your Bash profile.

Based on other output though, it looks like you’re using zsh and not Bash, although I would suspect that zsh by default may read ~/.bash_profile, since zsh is a Bash compatible shell.

Regardless of what the reason is though, it looks like the location for safe isn’t on your path. Run env in your terminal and see what the value of PATH is. Post that, and also post the contents of your Bash profile please. You can use cat ~/.bash_profile to get that.

Assuming you have root access to your machine, you could also copy the safe binary from ~/.safe/cli/safe to /usr/local/bin/safe, since /usr/local/bin is almost always on PATH. Or of course you can run the binary directly by using ~/.safe/cli/safe.

As a sort of incidental point, I’m personally not so sure about the location we’ve chosen as install locations for both safe and sn_node. It’s quite unusual in Linux to install binaries in hidden directories under the user’s home directories. Those are normally for configuration files. I do understand though that there’s an advantage here in that you don’t need root access to put the binaries there. I personally like my binaries to go under /usr/local/bin when I have root access to my system. If I have to have multiple versions around I’d put them in /opt/safe-x.x.x and then symlink whatever particular version I’m interested in, into /usr/local/bin.

3 Likes

Yes I had wondered about that myself from time to time and agree that somewhere in /usr/local/ is def more ā€˜UNIXy’

2 Likes

Is anyone able to put/get I tried before leaving the house but could not. Heading back now and may take it down?

I’m guessing the reasoning was to avoid having to have root privileges for running the install and always having a location where you can write the binary to. It might be better though to offer both options.

2 Likes

Oh I understand why it was done but it was always, to my mind at least, one of these things that would get sorted before general release.
Other projects seem to survive and prosper while requiring root privs to install – though of course in many cases that is ā€œmaskedā€ by the use of apt or yum etc

2 Likes

Can you share the logs somewhere, please?
I’d like to grep them for the IPs I was using, see what if anything I can learn from that.

4 Likes

The network is down - logs here

5 Likes

env

TMPDIR=/var/folders/5w/5rzmzxrx0r15xw7rxns288cc0000gn/T/

__CFBundleIdentifier=com.apple.Terminal

XPC_FLAGS=0x0

TERM=xterm-256color

SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.SuoxikV1ke/Listeners

XPC_SERVICE_NAME=0

TERM_PROGRAM=Apple_Terminal

TERM_PROGRAM_VERSION=440

TERM_SESSION_ID=F2CF8EAB-AE90-429F-A743-F217FE04AD9F

SHELL=/bin/zsh

HOME=/Users/me

LOGNAME=me

USER=me

PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

SHLVL=1

PWD=/Users/me

OLDPWD=/Users/me

LANG=en_US.UTF-8

_=/usr/bin/env

Your sorcery has worked @chriso!

Welcome to Safe CLI interactive shell!

Type 'help' for a list of supported commands

Pass '--help' flag to any top level command for a complete list of supported subcommands and arguments

Type 'quit' to exit this shell. Enjoy it!

The ~/.safe/cli/safe command got the interactive shell running which has always been the only way I can get things to work. Thank you! I am keeping that command written down for later use. Looks like the test is over again but that is a huge help to me personally.

Edit: safe node install --version 0.32.0 still not working for me though. Hmm.
I just get
Format of the config file at '/Users/me/.safe/cli/config.json' is not valid and couldn't be parsed

Up to you whether there is any further digging required. Anything I can do to help get over this hump for others and round things out I’m happy to help but if it’s not a good use of time, no worries either. I’ll prolly start learning a bit more about Terminal so I have a better grasp. Thanks for the help so far. :slight_smile:

1 Like

Yeah, so you can see PATH is not being modified by the installation process. I’m guessing now you’ve copied safe to /usr/local/bin? The shell can then find safe because that location is on PATH.

Based on what I can see on Google, zsh doesn’t read ~/.bash_profile by default, and that’s why PATH isn’t being changed. I’m quite surprised we never ran into this before though. I’m pretty sure @StephenC has tested the install script on macOS fairly recently and it worked ok.

If I was you, I would just delete that ~/.safe/cli/config.json file. It’s quite possibly incompatible with what we have now and I’m not sure there’ll be much in there you’ll be looking to keep.

Edit: @Nigel

3 Likes