Updating node failed: Update("Could not find the required path in the archive: \"sn_node\"")

When I try to upgrade to the latest version of node I get this…

willie@gagarin:~$ safe -V
sn_cli 0.46.0
willie@gagarin:~$ safe node bin-version
safe_network 0.55.0
willie@gagarin:~$ safe node update
Starting logging to stdout
Checking target-arch... x86_64-unknown-linux-musl
Checking current version... v0.55.0
Checking latest released version... v0.55.3-0.54.1-0.47.1
New release found! v0.55.0 --> v0.55.3-0.54.1-0.47.1
New release is compatible

sn_node release status:
  * Current exe: "/home/willie/.safe/node/sn_node"
  * New exe release: "sn_cli-0.47.1-x86_64-unknown-linux-musl.tar.gz"
  * New exe download url: "https://api.github.com/repos/maidsafe/safe_network/releases/assets/55811860"

The new release will be downloaded/extracted and the existing binary will be replaced.
Downloading...
[00:00:03] [========================================] 10.26MB/10.26MB (0s) Done
Extracting archive...  ERROR 2022-02-04T16:46:30.960162Z [sn/src/bin/sn_node.rs:L249]:
	 ➤ Updating node failed: Update("Could not find the required path in the archive: \"sn_node\"")

Its not a stopper, I can download and install manually. But it will trip up someone…

1 Like

I have been getting that with arm too. Thought is was just my problem.

2 Likes

I just ran your script and it runs fine and lunches vdash @Southside Ubuntu server on an i5

2 Likes

While we’re here - its not a priority, but it would be nice if we could use safe node -V rather than safe node bin-version

The proper thing to do would be to raise an issue of GitHub and attempt a PR. @happybeing - would this make a “good first issue” for one of your Rust students?

2 Likes

Was this with your patch running the node as a service?

Yea your one with my run as a service patch that I sent you. It’s working perfect with @folaht network not able to put or get but it’s starting the node and logs are running

2 Likes

Thats cool for now
Cos I am a lazy sod can you post the entirety of the script you ran to connect just there, please? I will use that as the guts of a PR. This is just as much to give me practice with PRs and merging as anything.
There is still an problem with the testnet-menu branch not selecting a default if the choice of testnet is invalid but I’ll get that fixed shortly.

2 Likes

tested and working right now on @folaht test net

#!/usr/bin/env bash
# https://github.com/safenetwork-community
# safenetwork-community  

##
# Color  Variables
##
red='\e[31m'
green='\e[32m'
blue='\e[34m'
clear='\e[0m'

##
# Color Functions
##

ColorGreen(){
	echo -  $green$1$clear
}
ColorBlue(){
	echo -  $blue$1$clear
}
ColorRed(){
	echo -  $red$1$clear
}





clear
echo  "********************** SAFE NODE INSTALLER  *****************************************"
echo ""
echo ""
echo ""
echo ""
echo  "    This script will install everything needed to join the SAFE network testnets for "
echo  "    Ubuntu like machines"
echo  "    The programs lised below will be installed if required. Your root password will be required."
echo ""
echo ""
echo " - snap                   -assists in installin the dependencies"
echo " - curl                   -fetches the SAFE applications"
echo " - sn_cli                 -the SAFE client program  "
echo " - safe_network           -the SAFE network functionality "
echo " - moreutils              -helper programs to assist in idenntifying your network settins"
echo " - build-essential        -required to build vdash on top of rust "
echo " - rust                   -Rust is a systems programming lanuage   "
echo " - vdash                  -vdash is a Rust program by @happybeing to monitor your SAFE node  "
echo ""
echo ""
echo ""
echo -ne $(ColorRed " ################# Any existing SAFE installation will be DELETED ##################")
echo ""
echo ""
echo ""
echo ""
echo "             Once everything is installed, your node will connect to the chosen testnet and vdash will be"
echo "                             configured to display network and node information"
echo ""
echo ""
echo "                If you are happy with the above and have read the Readme, type 'y' to proceed [y,N]"
read -r input

if [[ $input == "Y" || $input == "y" ]]; then
        echo "                            OK then, let's go."
else
       echo "Bye now..."     
       exit
fi

echo "           Which testnet do you want to connect to?"

echo ""
echo "           None of these testnets are guaranteed or even likely to be running at any given time"
echo "           Please refer to threads on https://safenetforum.org for current news on live testnets."

echo ""
echo "               1     sjefolaht"
echo "               2     comnet"
echo "               3     southsidenet"
echo "               4     playground"
echo ""
echo ""
echo "                                    Please select 1, 2, 3 or 4"
read SAFENET_CHOICE
echo ""

case $SAFENET_CHOICE in

  1)
  SAFENET=sjefolaht
  CONFIG_URL=https://link.tardigradeshare.io/s/julx763rsy2egbnj2nixoahpobgq/rezosur/koqfig/sjefolaht_node_connection_info.config?wrap=0
    
    ;;

  2)  SAFENET=comnet
    CONFIG_URL=https://sn-comnet.s3.eu-west-2.amazonaws.com/node_connection_info.config
    ;;

  3)
  SAFENET=southsidenet
    CONFIG_URL=https://comnet.snawaffadyke.com/southsidenet.config

    ;;

    4)
  SAFENET=playground
    CONFIG_URL=https://safe-testnet-tool.s3.eu-west-2.amazonaws.com/public-node_connection_info.config

    ;;


  *)
    echo " Invalid selection, please choose 1-4 to select a testnet"
    ;;
esac
echo ""
echo "                    Your node will attempt to connect to "$SAFENET
echo "" 


echo "                   For some testnets, it will be necessary to allocate a fixed size for your vault."
echo "                   Again please refer to threads on https://safenetforum.org for details. If no size"
echo "                   is specified, 5GB will be selected as default."
  
GB_ALLOCATED=5
read -e -i "$GB_ALLOCATED" -p '                   How many GB do you want to allocate to your vault? [5]' GB_ALLOCATED
VAULT_SIZE=${GB_ALLOCATED}
echo "                   $VAULT_SIZE" "GB will be allocated for storing chunks"

echo ""
echo ""
echo ""
echo ""
echo "              Certain setups may require the default port that SAFE uses to be changed"
echo "              Most users will be OK with the default port at 12000 "
echo "              Only change this if you know what you are doing."
echo ""

#####################################################################################################################################change for default port
#SAFE_PORT=12000
#read -e -i "$SAFE_PORT" -p '              Press Enter to accept the default or edit it here [12000]' #SAFE_PORT
#echo $SAFE_PORT

SAFE_PORT=12000
read -e -i "$name" -p "              Press Enter to accept the default or edit it here $SAFE_PORT    " input
SAFE_PORT="${input:-$SAFE_PORT}"
echo $SAFE_PORT
###########################################################################################################################################################

sleep 2

echo ""
echo ""
echo ""
echo ""
echo "              Now installing SAFE and all necessary dependencies."
echo "              This may take a few minutes depending on your download speed  "
echo "              Thank you for your patience  "
echo ""            
echo "              The world has waited a long time for SAFE - just a few seconds more...."

#exit

#sudo apt -qq update >/dev/null
#sudo apt -qq install -y snapd build-essential moreutils >/dev/null
sudo snap install curl
sudo snap install rustup --classic
rustup toolchain install stable
cargo install vdash




PATH=$PATH:/$HOME/.safe/cli:$HOME/.cargo/bin 

ACTIVE_IF=$( ( cd /sys/class/net || exit; echo *)|awk '{print $1;}')
LOCAL_IP=$(echo $(ifdata -pa "$ACTIVE_IF"))
PUBLIC_IP=$(echo $(curl -s ifconfig.me))
SAFE_PORT=$SAFE_PORT
VAULT_SIZE=$((1024*1024*1024*$GB_ALLOCATED))
LOG_DIR=$HOME/.safe/node/local_node
SN_CLI_QUERY_TIMEOUT=3600

# Install Safe software and configuration

rm -rf "$HOME"/.safe # clear out any old files

#get the CLI
curl -so- https://raw.githubusercontent.com/maidsafe/safe_network/master/resources/scripts/install.sh | bash
echo ""
echo ""
echo ""
echo $(safe --version) "install complete"

safe networks add $SAFENET "$CONFIG_URL"
safe networks switch $SAFENET
safe networks
sleep 2
safe node install
echo ""
echo ""
echo ""
echo $(safe node bin-version) "install complete"

# Join a node from home

echo "Attempting to join the '$SAFENET' network using the following parameters"
echo ""
echo "--max-capacity" $VAULT_SIZE
echo "--local-addr" "$LOCAL_IP"":"$SAFE_PORT
echo "--public-addr" "$PUBLIC_IP"":"$SAFE_PORT
echo "--log-dir" "$LOG_DIR"
echo "--skip-auto-port-forwarding"


############################neik proposal to run as service	###################################################################################################

#RUST_LOG=safe_network=trace,qp2p=info \
#    ~/.safe/node/sn_node \
#    --max-capacity $VAULT_SIZE \
#    --local-addr "$LOCAL_IP":$SAFE_PORT \
#    --public-addr "$PUBLIC_IP":$SAFE_PORT \
#    --skip-auto-port-forwarding \
#    --log-dir "$LOG_DIR" & disown

# start as service 

safe node killall
sudo systemctl stop sn_node.service
	
echo -n "#!/bin/bash
RUST_LOG=safe_network=trace,qp2p=info \
	~/.safe/node/sn_node \
	--max-capacity $VAULT_SIZE \
	--local-addr "$LOCAL_IP":$SAFE_PORT \
	--public-addr "$PUBLIC_IP":$SAFE_PORT \
	--skip-auto-port-forwarding \
	--log-dir "$LOG_DIR" & disown"\
| tee ~/.safe/node/start-node.sh

chmod u+x ~/.safe/node/start-node.sh
	
echo -n "[Unit]
Description=Safe Node
[Service]
User=$USER
ExecStart=/home/$USER/.safe/node/start-node.sh
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target"\
|sudo tee /etc/systemd/system/sn_node.service

sudo systemctl start sn_node.service

####################################################################################################################################################################

#clear
echo "_____________________________________________________________________________________________________"
echo ""
echo "                    Now cofiguring vdash from @happybeing"
echo ""
echo ""
echo "       press 'q' to quit vdash     --- this will not interfere with your node ---"
echo  ""

sleep 3

# Install or update vdash

vdash "$LOG_DIR"/sn_node.log
4 Likes

tested it right now just to be sure
im just dying to try them on a new test net :slight_smile:
that’s me up to 4 nodes now

2 Likes

If @Josh does not start up his comnet tonight, I will fire up southsidenet with a single node on AWS and then add more nodes on AWS free-tier and locally to see if we can get a critical mass.

2 Likes

I was planing to but if you want put SouthsideNet through its paces we can do that first?
(I try not to go too early just in case Maidsafe have plans)

3 Likes

Nah southsidenet is a very min-spec single t2-micro AWS freebie
Useful only for testing connectivity and answering the Q “Could we theoretically start a SAFE Network from a single node?”

Thats not a Q I think will ever be asked in real life TBH

More folk will have more fun and learn more if you go ahead with your usual Friday night plans. For which we thank you and again I think that a grant from BGF to cover your expenses would be appropriate.

4 Likes

In any case the AWS resources will be far more useful as another node attempting to join your comnet.

3 Likes

I don’t think this will be possible. The --version will be reserved for the main safe exe.

Regarding the node update, hopefully I can look into that soon.

2 Likes

Its no big deal - just my slight OCD kicking in.
You have far more important stuff to do.

1 Like

It’s cool. I was just explaining that I don’t think it can be done. The --version is a keyword argument that’s reserved for the main exe the argument parsing framework is applied to.

3 Likes

This topic was automatically closed after 60 days. New replies are no longer allowed.