Git Product home page Git Product logo

skywire-testnet's Introduction

skywire logo

NOTE: This repo is no longer actively maintained. Please check out the new Skywire Testnet and Mainnet repos.

Skywire

Other languages:

Links:

Skywire is still under heavy development.

2018-01-21 10 44 06

Table of Contents

Requirements

Install

First take a look at the script integration README to know a few facts ant tips that will help you to understand how Skywire is integrated to the Unix systems, very important is the part of the Network Policies.

Now if you read that you must realize that if you use a different IP set you will need to change a few things, we will point them out when needed.

Unix systems

mkdir -p $GOPATH/src/github.com/skycoin
cd $GOPATH/src/github.com/skycoin
git clone https://github.com/skycoin/skywire.git

Build the binaries for skywire

cd $GOPATH/src/github.com/skycoin/skywire/cmd
go install ./...

Set the IP of the manager

If you are using the default network IP set you are set, follow to the next step.

If you uses a different IP set you need to modify the file in static/script/skywire.defaults, in particular the variable called MANAGER_IP in the default file it points to the default manager IP, in the case of a different IP set this will need to be changed to the manager IP.

Just for a matter of precaution, after modify this file be sure that there isn't a fille called /etc/default/skywire if it's there erase it. It will be updated once you run skywire.

Run Skywire

Unix systems

Run Skywire Manager

cd $GOPATH/bin
./skywire-manager -web-dir ${GOPATH}/src/github.com/skycoin/skywire/static/skywire-manager

tip: If you run with the above command, you will not be able to close the current window or you will close Skywire Manger.

If you need to close the current window and continue to run Skywire Manager, you can use

cd $GOPATH/bin
nohup ./skywire-manager -web-dir ${GOPATH}/src/github.com/skycoin/skywire/static/skywire-manager > /dev/null 2>&1 &sleep 3

Note: do not execute the above two commands at the same time, just select one of them.

Run Skywire Node

Open a new command window

cd $GOPATH/bin
./skywire-node -connect-manager -manager-address 127.0.0.1:5998 -manager-web 127.0.0.1:8000 -discovery-address testnet.skywire.skycoin.com:5999-028ec969bdeb92a1991bb19c948645ac8150468a6919113061899051409de3f243 -address :5000 -web-port :6001 

tip: If you run with the above command, you will not be able to close the current window or you will close Skywire Node.

If you need to close the current window and continue to run Skywire Manager, you can use

cd $GOPATH/bin
nohup ./skywire-node -connect-manager -manager-address :5998 -manager-web :8000 -discovery-address testnet.skywire.skycoin.com:5999-028ec969bdeb92a1991bb19c948645ac8150468a6919113061899051409de3f243 -address :5000 -web-port :6001 > /dev/null 2>&1 &cd /

Stop Skywire Manager and Node.

  1. If the Skywire Manager and Node are started by using the terminal window, please press Ctrl + c on the respective terminal of Manager and Node.

  2. Use the shutdown terminal to keep running, please enter:

Stop Skywire Manager
cd $GOPATH/bin
pkill -F manager.pid
Stop Skywire Node
cd $GOPATH/bin
pkill -F node.pid

Official Images

Run Skywire Manager

Open a command window on a PC that will act like a manager and follow the install procedure, then to start a node do this:

${GOPATH}/src/github.com/skycoin/skywire/static/script/manager_start

tip: the manager start script will also run a local node, you don't need to run in manually on the manager.

Run Skywire Node

Open a command window on a node only computer and follow the install procedure, then to start a node:

${GOPATH}/src/github.com/skycoin/skywire/static/script/node_start

tip: the node is instructed to connect to the manager IP automatically, if you use a non default IP set you must check the file "/etc/default/skywire" and change the MANAGER_IP variable on each Pc of your setup.

This two files are the default start script for skywire services, take a peek on them to know more if yu are interested.

Stop Skywire Manager and Node.

If you started the manager and the nodes by the ways stated above you can stop them on each Pc by this command on a console:

${GOPATH}/src/github.com/skycoin/skywire/static/script/stop

This will check for the pid of the running processes and kill them. If you ran them by hand using a call to a the specific manager or node binaries this will not stop them, in this case you must run this:

killall node
killall manager
Installing the manager and node as a service using systemd

If you use a modern Linux OS (released after 2017) you are using systemd as init manager, skywire has the files needed to make them a service inside systemd.

Please note that the manager instance will start also a local node, so you must select just a manager on a net and the rest will be nodes.

Installing & start of mananger unit file on systemd
cp ${GOPATH}/src/github.com/skycoin/skywire/static/script/upgrade/data/skywire-manager.service /etc/systemd/system/
systemctl enable skywire-manager
systemctl start skywire-manager
Installing & start of nodes unit file on systemd
cp ${GOPATH}/src/github.com/skycoin/skywire/static/script/upgrade/data/skywire-node.service /etc/systemd/system/
systemctl enable skywire-node
systemctl start skywire-node

From this point forward you can user this services to start/stop your skywire instances via systemd commands:

# for the nodes
systemctl *start* skywire-node
systemctl *stop* skywire-node
systemctl *status* skywire-node
# for the manager
systemctl *start* skywire-manager
systemctl *stop* skywire-manager
systemctl *status* skywire-manager

Open Skywire Manager View

Open http://localhost:8000. The default login password for Skywire manager is 1234.

Connect to node

  1. Connect to node —— Search services —— Connect

  2. Connect to node —— Enter the key for node and app —— Connect

In the first way, you can search for nodes around the world, and select the nodes you want to connect to; The second way is to connect to the specified node.

Use Skywire App

After the default normal start, the App will display "** available port **" (e.g. 9443) after successful connection.

Use Firefox Browser

Install FoxyProxy Standard

Open Firefox Browser,address bar input"https://addons.mozilla.org/zh-CN/firefox/addon/foxyproxy-standard/", Click "add to Firefox" button to follow the prompts to install.

Configuration FoxyProxy Standard

After the installation is complete, browse the Firefox address bar enter about: "addons" into the plugin page, find FoxyProxy "Standard" and click on the preferences into the configuration page < br > select "Use Enabled Proxies By Patterns and Priority" enable FoxyProxy < br > Click "Add" to Add the configuration,

Proxy Type: SOCKS5
IP address, DNS name, server name: 127.0.0.1
Port: 9443

And then finally click "Save"

SSH tool

SSH

After this service is opened, the application public key will be generated. Based on the public key of the node and the public key, the node can be managed remotely in any machine running Skywire.

Note: do not open SSH at will, and show the Node Key and App Key to strangers.

SSH Client

Enter Node Key and App Key. After the connection is successful, the Port (Port) will be displayed under the button, for example, 30001, and finally, use any SSH remote connection tool connection.

Docker

docker build -t skycoin/skywire .

Start the manager

docker run -ti --rm \
  --name=skywire-manager \
  -p 5998:5998 \
  -p 8000:8000 \
  skycoin/skywire

Note: The images of skywire for ARM v5 and v7 are built upon busybox whereas the ARM v6 and v8 containers will run on alpine.

Open http://localhost:8000. The default login password for Skywire manager is 1234.

Start a node and connect it to the manager

docker volume create skywire-data
docker run -ti --rm \
  --name=skywire-node \
  -v skywire-data:/root/.skywire \
  --link skywire-manager \
  -p 5000:5000 \
  -p 6001:6001 \
  skycoin/skywire \
    node \
      -connect-manager \
      -manager-address skywire-manager:5998 \
      -manager-web skywire-manager:8000 \
      -address :5000 \
      -web-port :6001 \
      -discovery-address testnet.skywire.skycoin.com:5999-028ec969bdeb92a1991bb19c948645ac8150468a6919113061899051409de3f243

Docker Compose

docker-compose up

Open http://localhost:8000.

Download System Images

Note: these images can only be run on Orange Pi Prime.

Skyflash & Skybian

We developed our own custom flashing tool that prepares & flashes our custom OS Skybian for operation on our Skyminers. Skybian is our custom OS built upon armbian. It comes with Skywire and its dependencies preinstalled and its IP configuration is adjusted by Skyflash according to your network environment. Please refer to the installation guide on our wiki for more details & instructions.

Official Skyminer Skybian Images

We are hosting eight (8) prepared Skybian images which are ready to use, i.e. you only need to flash them. They come with the default official Skyminer IP ranges:

  • manager: 192.168.0.2
  • node 1: 192.168.0.3
  • node 2: 192.168.0.4
  • node 3: 192.168.0.5
  • node 4: 192.168.0.6
  • node 5: 192.168.0.7
  • node 6: 192.168.0.8
  • node 7: 192.168.0.9

In case you cannot operate the official Skyminer in its default IP configuration you must use Skyflash to change the IP addresses on the images.

The images are hosted here. Make sure to select the most recent Skybian version, please refer to the Skybian releases.

skywire-testnet's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

skywire-testnet's Issues

No demonize option & missing log output

Currently, manager and node need to be manually launched from command line, and there is no log output for either manager or node.

Your official instructions for running manager and node are as follows:

  1. cd $GOPATH/bin nohup ./manager -web-dir ${GOPATH}/src/github.com/skycoin/skywire/static/skywire-manager > /dev/null 2>&1 &sleep 3
  2. cd $GOPATH/bin nohup ./node -connect-manager -manager-address :5998 -manager-web :8000 -discovery-address discovery.skycoin.net:5999-034b1cd4ebad163e457fb805b3ba43779958bba49f2c5e1e8b062482904bacdb68 -address :5000 -web-port :6001 > /dev/null 2>&1 &cd /

It is important to allow people to easily start the manager and node without memorizing this crazy long launch commands / having them paste over from somewhere or creating additional script files. Also, currently, by routing all stdout to /dev/null the user has ZERO knowledge about what's happening, this needs to be addressed.

To tidy up this mess I suggest the following changes:

  1. Add a demonize option as a launch parameter for manager and node, with a configuration file for that in .skywire folder --> would be similar to how other daemons, like geth or bitcoind do it. no more need to type in such a long launch commands.
  2. Add a log file option as a launch parameter, or have a default log file in the .skywire folder (e.g. debug.log, like in other daemons).

Needless to say that this needs to be fixed before the network starts scaling up.

Multiple keys.json files on official images

I have noticed that there are two copies of the .skywire folder on the official images, and therefor two copies of keys.json, which includes the Public Key used by the node process. The ones in /usr/local/skywire/go/.skywire/node/keys.json are used when the node process is called by the script /etc/rebuild.sh (which is called by rc.local). But if a user logs in as root and starts the node process manually (perhaps for troubleshooting, or to enable logging), it uses the Public Key stored in /root/.skywire/node/keys.json.

This is a real problem for people who have already submitted a whitelist application with their public keys. If they start any processes manually or write their own scripts or use crontab (have not tested this to see which keys would be used), they risk starting starting their Nodes with a Public Key different than the one whitelisted and their uptime will not be measured.

Show Uptime Statistics

As read in the chats, the demand of a precise uptime-monitoring tool is high.
We could add it on the nodes-overview.

Update official node image names

In the Skywire telegram group, it’s been reported that the name of each of the official Skywire node and manager image packages are the same when extracted - and must be renamed to allow the user to easily identify which is which.

Could the image names be updated to better reflect which one they are (ie Manager.img, Node2.img, etc).

Sentence that doesn't make sense in Readme

Under "Stop skywire manager and node", it says this:

"Use the shutdown terminal to keep running, please enter:"

Did you mean:

"If the skywire manger / node is still running after you closed the terminal window, please enter:"

Skywire Manager Glitching out:

I connect to raspberry pi using ssh and enter these two commands:

nohup ./manager -web-dir ${GOPATH}/src/github.com/skycoin/skywire/static/skywire-manager &gt; /dev/null 2&gt;&amp;1 &amp; echo $! > manager.pid

nohup ./node -connect-manager -manager-address 192.168.1.1:5998 -manager-web 192.186.1.1:8000 > /dev/null 2>&1 & echo $! > node.pid

And then launch manager at the local ip address for the raspberry pi.

However when I click on the option of "Check Update", "Settings" , "Connect to node" or "Connect to node > Search Services", the pop-up that appears just dissapears.

With Terminal, I can get a glimpse of a error coming up:
bad_handshake

And with reboot, the warning sign comes up, I press "Yes", and then:
"Error
manager token is null"

I suddenly got this problem after a reboot. I was messing around with some sh scripts.

Node app (sockss process) not stable

This is a tough one to report. I know best practice is to include information on how to replicate an error, and include log files when possible. I do not know how to replicate this issue, and I cannot figure out if or where the sockss process logs to, but I know there is an issue with stability and uptime.

We have a lot of users from the community reporting that they have all their nodes correctly installed and running perfectly, without errors. But after some minutes or hours or days, they come back and check on their nodes to find that the Node app has disappeared from the Manager UI. Behind the scenes, I have verified that when this happens the sockss process is no longer running. Rebooting the node typically resolves this. I have also played with starting just the sockss process manually with

cd $GOPATH/bin
nohup ./sockss -node-address :5000 &

Anecdotally, it seems like this sockss process crashing is triggered at least sometimes by a remote node connecting. In other words, Node A connects to remote Node B, and subsequently the Node app (sockss process) crashes on Node B, either while Node A is connected or after Node A terminates the connection. This is hard to replicate, because it doesn't always happen. Most of the time the Node app (sockss process) is crashing while the Manager and Nodes are unattended.

This is a very serious problem for people who are trying to maintain 75% uptime. Users have been told that if that Node app (sockss process) is not running, their node will not qualify for rewards during testnet. It has people in the community trying to figure out how to monitor their nodes for uptime 24 hours a day, from work and while on vacation. Users are trying to figure out how to remotely reboot their nodes while away from home. Some users are setting up cron jobs to reboot their nodes every few hours just in case.

I don't know what causes the Node app (sockss process) to be so unstable, but it is something that needs addressed.

Open source manager front end code

Can you please provide the pre-built code of the manager front end?
I would like to experiment with making some improvements to the manager UI.
Thanks.

UpdatePassword error 500

When I enter wrong password into the "Old password" field, it won't print an error saying that the old password is wrong but instead do nothing with request resulting in server error 500

Multiple Docker build issues

While working on #42 I detected several issues:

  • vendor/github.com/mattn/go-sqlite3 is outdated and does not compile. It throws the following error
    # github.com/skycoin/skywire/vendor/github.com/mattn/go-sqlite3 vendor/github.com/mattn/go-sqlite3/sqlite3_go18.go:18:10: undefined: SQLiteConn
  • node throws the following error
    ERRO[0064] after launch error: fork/exec ./sockss: no such file or directory
  • There is no image for ARM arch in Docker Hub
    I'll be working on this issues ASAP

current images don't work; issues updating old images

the current (6/26/18) manager and node image downloads don't seem to want to work.

There is brief signal over HDMI but no text is displayed.
RED and GREEN LEDs both stay lit.

After digging out the backup images from an earlier flash I attempted to update...

git init
git remote add origin https://github.com/skycoin/skywire.git
git remote set-url origin https://github.com/skycoin/skywire.git
cd $GOPATH/src/github.com/skycoin/skywire
git reset --hard
git clean -f -d
git pull origin master

^at this point, I get: server certificate verification failed

ok i figured out it was from the wrong time.

hopefully, working images will be added soon.
the instructions should be updated to include:

git init
git remote add origin

before git remote set-url.

instructions for setting the time and date would also be nice to include:

https://wiki.debian.org/DateTime#Set_the_time_manually
date --set

Client node still shows connected in UI even after disconnecting from it

Hi,

Found this strange UI issue after someone established a connection to my node and afterwards he closed the connection by closing the node client.
The issue is that after you connect to a random node and disconnect afterwards from it by closing the node client, on the other end, on the node that you connected to the web ui still shows the connection as being established.
The solution is no other than to close the node app from the node you connected to or most probably a skynode service restart.
As a solution to this i would see a close button developed also on the client side to be able to close any connections that you dont want giving thus power to the client to close all the unwanted connections.

nodeclient

PS: I can also provide some logs in about 12 hours from manager, node and sockss processes. Also let me know if you need other informations.

Best regards!!!

Docker build

Hi! I'm having some trouble building width docker.

I've clone the repo and used "docker build -t skycoin/skywire .

Error:

ERROR in ./src/styles.scss 
Module build failed: Error: Can't resolve '~@angular/material/prebuilt-themes/deeppurple-amber.css' in '/home/node/net/skycoin-messenger/monitor/web/src' 
   at onError (/home/node/net/skycoin-messenger/monitor/web/node_modules/enhanced-resolve/lib/Resolver.js:61:15) 
   at loggingCallbackWrapper (/home/node/net/skycoin-messenger/monitor/web/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19) 
   at runAfter (/home/node/net/skycoin-messenger/monitor/web/node_modules/enhanced-resolve/lib/Resolver.js:158:4) 
   at innerCallback (/home/node/net/skycoin-messenger/monitor/web/node_modules/enhanced-resolve/lib/Resolver.js:146:3) 
   at loggingCallbackWrapper (/home/node/net/skycoin-messenger/monitor/web/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19) 
   at next (/home/node/net/skycoin-messenger/monitor/web/node_modules/tapable/lib/Tapable.js:252:11) 
   at /home/node/net/skycoin-messenger/monitor/web/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js:40:4 
   at loggingCallbackWrapper (/home/node/net/skycoin-messenger/monitor/web/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19) 
   at runAfter (/home/node/net/skycoin-messenger/monitor/web/node_modules/enhanced-resolve/lib/Resolver.js:158:4) 
   at innerCallback (/home/node/net/skycoin-messenger/monitor/web/node_modules/enhanced-resolve/lib/Resolver.js:146:3) 
   at loggingCallbackWrapper (/home/node/net/skycoin-messenger/monitor/web/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19) 
   at next (/home/node/net/skycoin-messenger/monitor/web/node_modules/tapable/lib/Tapable.js:252:11) 
   at innerCallback (/home/node/net/skycoin-messenger/monitor/web/node_modules/enhanced-resolve/lib/Resolver.js:144:11) 
   at loggingCallbackWrapper (/home/node/net/skycoin-messenger/monitor/web/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19) 
   at next (/home/node/net/skycoin-messenger/monitor/web/node_modules/tapable/lib/Tapable.js:249:35) 
   at resolver.doResolve.createInnerCallback (/home/node/net/skycoin-messenger/monitor/web/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:44:6) 
 @ multi ./src/styles.scss 
ERROR in ./src/styles.scss 
Module build failed: ModuleBuildError: Module build failed: Error: Can't resolve '~@angular/material/prebuilt-themes/deeppurple-amber.css' in '/home/node/net/skycoin-messenger/monitor/web/src' 
   at onError (/home/node/net/skycoin-messenger/monitor/web/node_modules/enhanced-resolve/lib/Resolver.js:61:15) 
   at loggingCallbackWrapper (/home/node/net/skycoin-messenger/monitor/web/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19) 
   at runAfter (/home/node/net/skycoin-messenger/monitor/web/node_modules/enhanced-resolve/lib/Resolver.js:158:4) 
   at innerCallback (/home/node/net/skycoin-messenger/monitor/web/node_modules/enhanced-resolve/lib/Resolver.js:146:3) 
   at loggingCallbackWrapper (/home/node/net/skycoin-messenger/monitor/web/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19) 
   at next (/home/node/net/skycoin-messenger/monitor/web/node_modules/tapable/lib/Tapable.js:252:11) 
   at /home/node/net/skycoin-messenger/monitor/web/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js:40:4 
   at loggingCallbackWrapper (/home/node/net/skycoin-messenger/monitor/web/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19) 
   at runAfter (/home/node/net/skycoin-messenger/monitor/web/node_modules/enhanced-resolve/lib/Resolver.js:158:4) 
   at innerCallback (/home/node/net/skycoin-messenger/monitor/web/node_modules/enhanced-resolve/lib/Resolver.js:146:3) 
   at loggingCallbackWrapper (/home/node/net/skycoin-messenger/monitor/web/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19) 
   at next (/home/node/net/skycoin-messenger/monitor/web/node_modules/tapable/lib/Tapable.js:252:11) 
   at innerCallback (/home/node/net/skycoin-messenger/monitor/web/node_modules/enhanced-resolve/lib/Resolver.js:144:11) 
   at loggingCallbackWrapper (/home/node/net/skycoin-messenger/monitor/web/node_modules/enhanced-resolve/lib/createInnerCallback.js:31:19) 
   at next (/home/node/net/skycoin-messenger/monitor/web/node_modules/tapable/lib/Tapable.js:249:35) 
   at resolver.doResolve.createInnerCallback (/home/node/net/skycoin-messenger/monitor/web/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:44:6) 
   at runLoaders (/home/node/net/skycoin-messenger/monitor/web/node_modules/webpack/lib/NormalModule.js:195:19) 
   at /home/node/net/skycoin-messenger/monitor/web/node_modules/loader-runner/lib/LoaderRunner.js:364:11 
   at /home/node/net/skycoin-messenger/monitor/web/node_modules/loader-runner/lib/LoaderRunner.js:230:18 
   at context.callback (/home/node/net/skycoin-messenger/monitor/web/node_modules/loader-runner/lib/LoaderRunner.js:111:13) 
   at Promise.resolve.then.then.catch (/home/node/net/skycoin-messenger/monitor/web/node_modules/postcss-loader/lib/index.js:189:71) 
   at <anonymous> 
   at process._tickCallback (internal/process/next_tick.js:188:7) 
 @ ./src/styles.scss 
 @ multi ./src/styles.scss 
npm ERR! code ELIFECYCLE 
npm ERR! errno 1 
npm ERR! [email protected] build-m: `ng build --prod --env=manager -op dist-manager` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] build-m script. 
npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 
 
npm ERR! A complete log of this run can be found in: 
npm ERR!    /root/.npm/_logs/2018-01-16T09_04_18_034Z-debug.log 
./tool.sh: line 52: err: command not found 

SSL verification in images

In the images, in /etc/rc.local, there is a line

export GIT_SSL_NO_VERIFY=1

This should never be done.

SSL verification should be configured to be working properly in this nodes.

This requires a correct system time and a cert chain installed.

$GOPATH and other variables not defined in Manager GUI terminal session

I am using the official images downloaded from the GitHub page. not 100% sure if this problem is isolated to the official images, and how the variables are defined, or if it is a more universal problem related to how the node daemon opens the terminal shell.

The issue is if I open a Terminal Session from withing the Manager GUI, variables such as $GOPATH are not defined. This means any user accessing the terminal this way will be unable to follow instructions in the README or in community generated guides which include lines such as:

cd $GOPATH/bin

or for example the instructions for updating the official images which include the line:

cd $GOPATH/src/github.com/skycoin/skywire

Update Skywire Readme with web-port info

The Skywire Readme file contains a cmd line for running the Node, but there is no explanation about the ‘-web-port’ cmd line parameter.

From discussions in the Skywire telegram group sounds like most people are running the Node cmd verbatim and just changing the Manager IP.

If running multiple Nodes behind a firewall, each must have a seperate ‘-web-port’ set.

For example, set it to
‘:6001’ for node 1
‘:6002’ for node 2
Etc.

Can we get the Readme updated with details of this parameter and recommendations for multiple nodes

master dashboard

  • dashboard displays all registered nodes in a list
  • transport status

Discovery address

I just found two discovery address, and every connection get out via them, did the testnet implement via multi hops? BTW, if we can only dicovery with that two ip, the ISP can blocked skywire easily.

Wish get more client user be the entry node, and broadcast through DHT.

Docker build fails on Linux x86_64 and arm64

Hello,

I tried to build the image using the Dockerfile provided here and on Dockerhub on my PC ( Debian 9 Stretch 64bit , Intel Core i3 ) and it fails with the below error :
Step 10/14 : COPY —from=build-go /go/bin/* /usr/bin/ COPY failed: no source files were specified
Then i modified the Dockerfile and i added a dummy file in that location ( RUN touch /go/bin/dummy-file ) and run the build again and it succeeded this time but when i try to start the container it fails wiht th efollowing error :
docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"manager\": executable file not found in $PATH": unknown.
Moreover , if i pull the image from Dockerhub and run it on my PC it works but if i run it on a Orange Pi Prime on Armbian 5.38 ( 4.14.14-sunxi64 #10 SMP Thu Jan 25 20:42:04 CET 2018 aarch64 GNU/Linux ) it fails with the next error :
root@MC01OPP01:~# docker run -ti --rm --name node -v skywire-data:/root/.skywire skycoin/skywire node -address :5000 -web-port :6001 standard_init_linux.go:190: exec user process caused "exec format error"

issue connecting to other nodes

I have a DIY miner and everything seems to be setup properly.
The nodes are all connected to the discovery address.
When I go into the list, select any node and press connect, I get please wait connecting for like a minute, and then it dissapears and it says fail.

screenshot 2018-05-27 14 06 36

screenshot 2018-05-27 14 06 47

My setup involves only a single router, which runs pfSense as router OS.
I've tried disabling the firewall entirely, but that did not help at all.

This is either an issue with skywire, or something related to my setup. I've seen these issues on skywire telegram chat, but there are only a few that experience this.

screenshot 2018-05-27 14 29 31

Tried disabling the block bogon networks as well without success.

Any help would be much appreciated.

Can't handle message

guys, i send serialized message from viscript to meshnet-node and meshnet-node crashed with error:
"panic: runtime error: makeslice: len out of range
github.com/skycoin/skywire/node.(*Node).listenForApps.func1(0x6d0340, 0xc42046e008, 0xc4200922c0)
/usr/lib/go-1.7/src/github.com/skycoin/skywire/node/node_app.go:45 +0x12a
created by github.com/skycoin/skywire/node.(*Node).listenForApps
/usr/lib/go-1.7/src/github.com/skycoin/skywire/node/node_app.go:58 +0x146"

SSH Server doesn't close

I have encountered an issue of the SSH Server and SSH Client functionality of the manager web interface while creating the recent SSH guide on the wiki.
Issue: If you started the SSH Server once, other Skywire nodes are still connected to you even after closing the SSH Server using the manager GUI. The incoming connection will not be displayed so you have no visual confirmation if there is a connection established.

To test out the SSH connect function the two nodes need to be on different subset, the SSH server is on 10.0.0.0/24 subnet and the SSH Client is on 192.168.220.0/24 subnet. All displayed keys are test keys so you can't reproduce the issue using the displayed keys.

Start the SSH Server:

SSHS

Then connect the SSH Client:

SSHC

Results in this (working established from the SSH Client):

SSHC_connect

Displayed from the SSH Server side:
SSHS_incoming

Check if the SSH connection can be utilized:
SSHC_hostname

Now if you close the SSH Server the connection of the SSH Client stays open:
Security_issue

The process responsible for opening incoming connections on the SSH Server pi gets terminated correctly.

As you can see the displayed public key on the right terminal window is exactly the public key of the SSH Server pi that should not be connected anymore.

In difference to #83 the displayed connection actually fails and displays it visually after the SSH server was closed or after the remote pi was rebooted:

GUI_issue

After a reboot you cannot establish a SSH connection to the SSH Server, tested it by obtaining the SSHS key from the file system without actually using the SSH Server start function within the web interface.

Best regards

Version info

I was trying to find a command line option to discover which version of the Skywire software was installed, and was unable to find one, or any way to check the version for that matter.

Should there be an easy way to check this?

skycoin -version
or
make ARGS=‘-version’ run

A little question

if skywire is translated to other languages, should not README file has an ordered list of translations?.
by example:

Table of Languages:

  • Chinese readme
  • Spanish readme
  • Italian readme

go install failing with undefined producer

root@skynode02:~/go/src/github.com/skycoin/skywire# go install ./...
# github.com/skycoin/skywire/discovery/db
discovery/db/models.go:87:2: undefined: producer.SendOnline
discovery/db/models.go:87:23: undefined: producer.MqOnline
discovery/db/models.go:176:2: undefined: producer.SendOnline
discovery/db/models.go:176:23: undefined: producer.MqOnline
root@skynode02:~/go/src/github.com/skycoin/skywire# go version
go version go1.10 linux/arm64

This seem to be related to commit 60edf4e from what I can tell.

TypeError - Cannot read property 'ngOriginalError' of undefined when running manager

Following directions to install and run the manager from the latest master release. I can sign in with the password but it's not possible to do anything else with the browser.

Using Chrome Version 66.0.3359.181 (Official Build) (64-bit).

Same issue seems apparent in Firefox Quantum 60.0.1 (64-bit) but error is more vague: TypeError: t is undefined.

some error with README.md

There are serval path errors
Eg:
wrong path...

go run cmd/socks/socks.go 2

in fact, The file is located at cmd/demo/socks/socks.go

Node daemon: root access & bypass of security standards (by design)

https://github.com/skycoin/skywire/blob/561cf0be3fbaa1a8f05f70b50b71f56e84cd6128/node/api/api.go#L113

We know that the node daemon usually runs with root privileges. Now, the node has a handful of build-in functionalities, including running commands, spawning a shell, or even starting a full terminal window. The node does all of this by creating sub processes which runs under the same privileges as the node itself, meaning root privileges. What does this mean? When we open a terminal window from the manager, this terminal is run with root privileges. Cool, right? Not exactly.

Speaking of hardening SSH security: https://www.digitalocean.com/community/tutorials/ssh-essentials-working-with-ssh-servers-clients-and-keys. These measures are completely useless, because the node daemon does not care about SSH. The node is able to spawn a root shell on the underlying system without asking for any permission, in this regard, acting like a malicious backdoor.

What needs to be addressed with this issue?

  1. Implement a way of authentication, may it be by public-private key pairs or by a password input, on launching sensitive commands on the node (like launching a terminal). Currently only a token string is checked before running a command. This represents no security, as token strings can be hijacked / spoofed (A hijacked token string allows running root commands on all nodes without authentication).
  2. Allow users to disable some of the nodes functionality. There is no reason to give the node daemon so much power, even neglecting all system available resources like SSH. These features should be disabled by default! Maintaining nodes is perfectly possible using secure means like SSH, why implement an additional backdoor into the system?

This issue needs to be addressed as quickly as possible. The current node api ignores basic security standards by bypassing secure authentication mechanism. This puts the nodes at risk to be used in a larger scale botnet by malicious attackers, and ultimately renders the network insecure ( - the "new internet" should build on privacy and security).

BR

Date/time incorrect on official images

After flashing the official images to an SD card for an Orange Pi Prime install, the date is set incorrectly to some time in January 2018. This makes it impossible to follow the instructions in the README to "Stay up to date by updating via git:" attempting this results in an error message:

fatal: unable to access 'https://github.com/skycoin/skywire.git/': server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

At first, I was resolving the date issue with:

apt-get install ntp
service ntp start

But a little testing revealed that the date was also corrected by simply doing:

apt-get update
apt-get upgrade

I think that the provided official images should be updated to have the correct date after a fresh install, but failing that, at a bare minimum the README should be updated so people know to fix the incorrect date before attempting to update.

Node app (sockss process) not starting after updating Skywire

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 &

Auto updating

  • Create a standalone api service to check is there any update
  • Create script to checkout files from github and install

Command to start node from README.md doesn't work correctly

If I try to start the node using the command from README.md, I get a bunch of errors and even though the node starts, the node manager interface is completely non-responsive. I am unable to access Settings, Check Update, Reboot, or anything.

I have tried changing the discovery address to
139.162.66.24:5999-03844a5482328ed32cc82d85c0cfaeefd7ec2106986673576ccee0df67c43b116f
on the advice of Zhiyi Wang, but had similar results. At this point, I cannot seem to get a properly functioning node using publicly available documentation. If I cannot, then I assume that other users cannot as well.

Here is a dump of the output:

root@skypi:~/go/bin# ./node -connect-manager -manager-address :5998 -manager-web :8000 -discovery-address messenger.skycoin.net:5999-028667f86c17f1b4120c5bf1e58f276cbc1110a60e80b7dc8bf291c6bec9970e74 -address :5000 -web-port :6001
DEBU[0000] writeOP &factory.regWithKey{PublicKey:cipher.PubKey{0x3, 0x94, 0x90, 0xee, 0x14, 0x21, 0x14, 0x4, 0x3b, 0x93, 0xbc, 0x5d, 0x0, 0xb0, 0xb, 0x8d, 0x21, 0xe2, 0x78, 0x66, 0xee, 0x3c, 0x4, 0x49, 0x87, 0xd8, 0x83, 0x2f, 0xdd, 0xa7, 0x65, 0xde, 0xab}, Context:map[string]string(nil), Version:1} app=messenger ctxId=1 type=tcp
DEBU[0000] writeOP &factory.regCheckSig{Sig:cipher.Sig{0x53, 0x5c, 0xe2, 0x8b, 0x9f, 0x13, 0x8f, 0x1c, 0x3d, 0xa8, 0xb6, 0x68, 0xaa, 0x6b, 0xab, 0xc6, 0x9, 0xb2, 0x32, 0x2c, 0x82, 0x92, 0xac, 0x20, 0x9d, 0x35, 0xf6, 0x85, 0x3f, 0x5e, 0xc3, 0x33, 0x77, 0xb0, 0xf7, 0x26, 0xf1, 0xbb, 0x16, 0x16, 0x24, 0xd9, 0x50, 0xba, 0x7, 0x1f, 0xc4, 0x7b, 0x13, 0x53, 0xd9, 0x8e, 0xb3, 0x75, 0xa4, 0x2f, 0x93, 0xd0, 0x55, 0x14, 0x11, 0xc6, 0x9d, 0xca, 0x0}, Version:1} app=messenger ctxId=1 type=tcp
DEBU[0000] listen on :5000
DEBU[0000] execute op &factory.regWithKeyResp{Num:[]uint8{0xf, 0x17, 0x85, 0xe3, 0x1, 0x40, 0xde, 0xdf, 0xea, 0x5b, 0x69, 0x6b, 0x4b, 0x4c, 0x6e, 0x82}, Hash:cipher.SHA256{0xc6, 0x55, 0xb6, 0x10, 0x73, 0x6b, 0x40, 0x9d, 0xf, 0xa4, 0xb5, 0xd, 0xd8, 0x34, 0x21, 0x70, 0xc6, 0x44, 0x3e, 0xfe, 0xa3, 0x13, 0x5f, 0x9c, 0x14, 0x48, 0x16, 0xef, 0x24, 0xd7, 0xbb, 0xf1}, PublicKey:cipher.PubKey{0x2, 0x86, 0x67, 0xf8, 0x6c, 0x17, 0xf1, 0xb4, 0x12, 0xc, 0x5b, 0xf1, 0xe5, 0x8f, 0x27, 0x6c, 0xbc, 0x11, 0x10, 0xa6, 0xe, 0x80, 0xb7, 0xdc, 0x8b, 0xf2, 0x91, 0xc6, 0xbe, 0xc9, 0x97, 0xe, 0x74}, Version:1} err app=messenger ctxId=1 type=tcp
DEBU[0000] writeOP &factory.regWithKey{PublicKey:cipher.PubKey{0x3, 0x94, 0x90, 0xee, 0x14, 0x21, 0x14, 0x4, 0x3b, 0x93, 0xbc, 0x5d, 0x0, 0xb0, 0xb, 0x8d, 0x21, 0xe2, 0x78, 0x66, 0xee, 0x3c, 0x4, 0x49, 0x87, 0xd8, 0x83, 0x2f, 0xdd, 0xa7, 0x65, 0xde, 0xab}, Context:map[string]string{"node-api":":6001"}, Version:1} app=messenger ctxId=2 type=tcp
DEBU[0000] writeOP &factory.regCheckSig{Sig:cipher.Sig{0x28, 0x5d, 0x53, 0x2b, 0x8d, 0x5d, 0x3b, 0x8d, 0xd4, 0x13, 0x9, 0xbc, 0x19, 0x60, 0xf8, 0x7f, 0x4d, 0xb5, 0xe1, 0xb4, 0x80, 0xc0, 0xf6, 0xa1, 0x42, 0xe7, 0x31, 0xdc, 0x18, 0x8f, 0x1f, 0x53, 0x4c, 0x46, 0xc1, 0x83, 0x80, 0x24, 0x24, 0x13, 0xb8, 0x95, 0xf3, 0x4e, 0xb9, 0xf6, 0x9a, 0x40, 0x7b, 0x19, 0x72, 0x10, 0x23, 0x4f, 0x4a, 0x79, 0x86, 0x29, 0xac, 0x59, 0xd, 0x51, 0x92, 0x72, 0x1}, Version:1} app=messenger ctxId=2 type=tcp
DEBU[0000] execute op &factory.regWithKeyResp{Num:[]uint8{0x94, 0x1d, 0x1d, 0x70, 0x52, 0xfb, 0x15, 0x8a, 0x98, 0x50, 0x53, 0x2, 0x9, 0xbb, 0x62, 0xc9}, Hash:cipher.SHA256{0xb1, 0xa, 0x54, 0x83, 0x52, 0x98, 0x39, 0x96, 0x4a, 0xa1, 0xd, 0xe1, 0x73, 0x58, 0xcd, 0xd1, 0xa3, 0x4c, 0xe2, 0xd2, 0x30, 0x2, 0x34, 0xde, 0x98, 0xb6, 0x99, 0x45, 0xa9, 0x93, 0x31, 0x97}, PublicKey:cipher.PubKey{0x3, 0x3d, 0xd5, 0x34, 0xf3, 0xc1, 0x54, 0xea, 0xf1, 0x67, 0x64, 0x7, 0xb8, 0x31, 0x48, 0x0, 0x86, 0xec, 0x1a, 0x32, 0x4, 0x46, 0xe5, 0x37, 0xc1, 0x78, 0x8c, 0x7c, 0x13, 0xd9, 0xb5, 0xc6, 0x20}, Version:1} err app=messenger ctxId=2 type=tcp
DEBU[0000] http server listening on :6001
DEBU[0001] writeOP &factory.regWithKeyResp{Num:[]uint8{0xa5, 0x99, 0xaf, 0xc1, 0x58, 0x30, 0x27, 0xdb, 0x34, 0xfe, 0xec, 0x28, 0xb4, 0x4d, 0x8b, 0xa6}, Hash:cipher.SHA256{0xa9, 0x26, 0xd5, 0xff, 0x58, 0xa9, 0x7b, 0xfd, 0xd9, 0x4a, 0xd1, 0x63, 0x45, 0x10, 0x38, 0x36, 0x36, 0x43, 0x48, 0x2c, 0xf9, 0x30, 0xb8, 0x3b, 0x72, 0x43, 0x7, 0xdb, 0x13, 0x94, 0x74, 0xfb}, PublicKey:cipher.PubKey{0x3, 0x94, 0x90, 0xee, 0x14, 0x21, 0x14, 0x4, 0x3b, 0x93, 0xbc, 0x5d, 0x0, 0xb0, 0xb, 0x8d, 0x21, 0xe2, 0x78, 0x66, 0xee, 0x3c, 0x4, 0x49, 0x87, 0xd8, 0x83, 0x2f, 0xdd, 0xa7, 0x65, 0xde, 0xab}, Version:1} app=messenger ctxId=3 type=tcp
DEBU[0001] reg 025acbff8340ecd506e77be7ca9bcd702f97396d183556671672e3cbb111bba8c3 0x4420274680
DEBU[0001] writeOP &factory.NodeServices{Services:[]*factory.Service{(*factory.Service)(0x4420395880)}, ServiceAddress:""} app=messenger ctxId=1 type=tcp

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.