Skip to content

Instantly share code, notes, and snippets.

@MrCelticFox
Last active January 4, 2022 05:19
Show Gist options
  • Save MrCelticFox/1a42c147f56995de99f453b80cf58b79 to your computer and use it in GitHub Desktop.
Save MrCelticFox/1a42c147f56995de99f453b80cf58b79 to your computer and use it in GitHub Desktop.

Quick guide for mandatory Jan 3 Gala Node upgrade

Just a quick guide to combine some of the steps from different articles people posted on discord. This method avoids having to create a whole new machine on Vultr and configure it again, you can use your existing host, upgrade it and then upgrade the software. I personally find this method faster but YMMV.

Please read these references first:

https://www.vultr.com/docs/how-to-upgrade-your-plan-without-reinstalling/
https://support.gala.games/en_US/Gala-Node-Software-Linux/how-do-i-run-a-founder%E2%80%99s-node-on-ubuntu-linux

This guide assumes you are using Vultr VPS hosting and that you have read the links above and upgraded your plan for your Gala Node host to 2vCPU, 4096MB RAM, 80GB SSD, 3.00TB Transfer. However the steps should work on any VPS provider using Ubuntu.

It also assumes you have already setup SSH keys or PuTTy for access to the host, if you haven't then read that section in the links above too. You should use the root user for this.

Steps

  • When the above is done, SSH (or PuTTy) to your host and update your host OS (to avoid out of date packages):
    sudo apt update && sudo apt upgrade -y

  • Restart host (always good after updating, note that it will kill your session and you should connect again):
    sudo reboot

  • Now we should stop the old process running (if this gives no output then you can skip this step and the next one!). First get the process number of older node (first number in the line). :
    ps -ef | grep "[g]ala-"

  • Now kill that process with the following command (mine was process 540, yours will be different):
    kill -9 540

  • If you check https://app.gala.games/nodes/my-node/ you should now see your node is offline.

  • Now download and install the new node software (note that the command is different to the old one!):
    wget -O install-headless.sh https://static.gala.games/node/install-headless.sh; sudo bash install-headless.sh

  • Press Enter, then copy the link for the 2FA verification (use mouse or Ctrl+Shift+C to copy, not Ctrl+C) and paste it into your browser. Follow instructions (you will need to login and type your authenticator code), when this is complete go back to the terminal and you will see the option to select workload. USE THE ARROW KEYS to move the cursor around. Press the Space key to select the boxes (you will see an x appear in them). Highlight the Save button with the arrow keys and press Enter.

  • You should get a confirmation note to say your node is configured. Note that it says you can run the gala-node daemon but I didn't need to as it happened automatically.

  • Then press the Esc key to leave that dialog! Press Enter to skip the next screen.

  • Run the gala-node stats command and you should see a block of text including "nodesOnline":1,"currentVersion":"2.3.1". If you see that then you're done. :)

  • Go back to https://app.gala.games/nodes/my-node/ and you can confirm this by seeing your node is now online.

Troubleshooting

Refresh token not passed...

The most common error people seem to be getting is output like this when running gala-node stats:

{"timestamp":"2022-01-02T21:22:02.676Z","level":"\u001b[31merror\u001b[39m","message":"caught                err in daemon:
Error: Error in token refresh Error: Refresh token not passed properly\n    at                ApiService.refreshToken 
(/snapshot/headless-node/dist/src/services/apiService.js:31:23)\n    a               t refreshTokens (/snapshot/headless-
node/dist/src/lib/tokens.js:26:48)\n    at daemon (/snapsh               ot/headless-node/dist/src/appEntries
/daemon.js:22:35)\n    at process._tickCallback (internal/               process/next_tick.js:68:7)\n    at 
Function.Module.runMain (pkg/prelude/bootstrap.js:1376:13)\               n    at startup (internal/bootstrap
/node.js:320:19)\n    at bootstrapNodeJSCore (internal/boot               strap/node.js:660:3)"}

A fix that worked for some people is the following:
gala-node config device

Followed by:
sudo systemctl start gala-node

Then check again with gala-node stats or ps -ef | grep "[g]ala-" so see if the node is online and the process is running.

Everything working but nodes don't show up

If nothing else here works for you, you may need to change your machine ID. I have never had to do this, but many people have, you can read more about it here:
https://support.gala.games/Gala-Node-Software-Linux/how-to-change-machine-id-on-a-linux-machine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment