Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node app (sockss process) not starting after updating Skywire #80

Open
mrhodlr opened this issue Jun 4, 2018 · 4 comments
Open

Node app (sockss process) not starting after updating Skywire #80

mrhodlr opened this issue Jun 4, 2018 · 4 comments
Labels

Comments

@mrhodlr
Copy link

mrhodlr commented Jun 4, 2018

I recently took steps to update all my nodes to the latest version of Skywire, and since the update, the Node app (sockss process) no longer starts by default when I reboot my nodes. Similar, but not related to skycoin/skywire#79.

Background: I am using official images downloaded from the GitHub page on Orange Pi Prime boards in an official Skyminer. Everything was configured correctly and has been more less stable and working as intended for a week or more.

I decided to follow the advice in the README and make sure Skywire was up to date using the following instructions:

Run this once if you're using the official images to change the remote repository:

git remote set-url origin https://github.com/skycoin/skywire.git

Stay up to date by updating via git:

cd $GOPATH/src/github.com/skycoin/skywire
git reset --hard
git clean -f -d
git pull origin master
go install -v ./...

Firstly, I was unable to update using git pull origin master until I fixed the date/clock issue (see skycoin/skywire#77). After fixing this issue, I was able to follow the steps to update via git.

After completing the update I rebooted my node. When the node started, it started without the Node app (sockss process), which is supposed to be launched by default. I confirmed this over several reboots. At this point I had seven nodes working normally and one updated node not working correctly. I proceeded to follow the same directions to update all 8 of my nodes, and now they all start without the Node app (sockss process). This is not an intermittent issue (Like Issue #79), but happens 100% of the time, no matter how many times I reboot. I have only been able to start the Node app (sockss process) manually by logging in and typing

cd $GOPATH/bin
nohup ./sockss -node-address :5000 &
@gz-c gz-c added the setup label Jun 4, 2018
@magicstone1412
Copy link

I had the same issue using pure image of orange pi prime

@stdevPavelmc
Copy link
Contributor

stdevPavelmc commented Nov 13, 2018

Hi to all,

Playing with a new Orange Pi Prime I hit this issue also; taking a peek on the code I found the cause of the bug:

The script that calls/start the manager and node bins (rebuild.sh) is called very early on the boot process when there are no environment vars set. At the time of the Orange Pi Prime generation the call for the sockss process was made in a static way inside the skywire code and that worked at that time.

But later in the skywire repo the calls in the api code to start the sockss bin switched to use the $GOPATH env var to build the calling argument, and at this point $GOPATH & $GOROOT are not defined, so we have this bug now.

Here is a gist with the script you can run to fix your working system: https://gist.github.com/stdevPavelmc/5c9c2938683aa86e085c79d9f21365e3

If you need to apply it and don't know how, there is a simple one line command that will do the job (log into your system as root and run this, your system must have internet connectivity)

wget --no-check-certificate https://gist.github.com/stdevPavelmc/5c9c2938683aa86e085c79d9f21365e3/raw/1fe0131dccf77c109047376705dd2d15b27c29ba/opiprime-skywire-fix.sh -O-  | sh

This will fix on the wild images, I will make a PR to note this issue on the README.md "UPDATE" part of skywire repo. I'm cloning the build repo to patch the image build process... (the repo has about 2Gb and counting... slow connection here, sorry)

Also In the research process of the cause I noted the /static/script folder, specifically the update-skywire script, but it's at a glance and old approximation to the updates.

This can be the unique and final way to update skywire inside the Orange Pi Prime image, this is more consistent that a descriptive process in the README.md and we have control of it in the repo, detached from the image.

Can I fix that to work with the actual Orange Pi Prime image or it's used in other places that I have not noticed yet?

That script and others in the repo can be modified to be used in the final Orange Pi Prime image and then we then will have more control over the image from inside the skywire repo itself, detaching the skywire code from the base OS.

Cheers.

@mahansky
Copy link
Contributor

Good job @stdevPavelmc
Your solution works, but in order to use the oneliner on official images, --no-check-certificate parameter is required in the wget as it throws errors without it.

I don't think the update-skywire script is used anywhere, there are these two used based on the OS: unix and win

We agreed that it wouldn't do any good to update official images at this time as the mainnet is getting closer and will require reflash.

@stdevPavelmc
Copy link
Contributor

stdevPavelmc commented Nov 14, 2018

Thanks, you are welcomed.

I edited the instructions to use --no-check-certificate

Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants