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

Ubuntu 16.04 Node Failing to Start #8

Closed
geodavies opened this issue May 17, 2017 · 17 comments

Comments

Projects
None yet
@geodavies
Copy link

commented May 17, 2017

Some error seems to occur when starting the node via the service command. I get the following output from 'service mysterium-node status'.

`● mysterium-node.service - Server for decentralised VPN built on blockchain
Loaded: loaded (/lib/systemd/system/mysterium-node.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2017-05-17 20:17:26 UTC; 9min ago
Docs: https://mysterium.network/
Process: 1312 ExecStart=/usr/bin/mysterium_server ${DAEMON_OPTS} (code=exited, status=1/FAILURE)
Main PID: 1312 (code=exited, status=1/FAILURE)
CPU: 0

May 17 20:17:26 ip-10-0-1-183 systemd[1]: Started Server for decentralised VPN built on blockchain.
May 17 20:17:26 ip-10-0-1-183 systemd[1]: mysterium-node.service: Main process exited, code=exited, status=1/FAILURE
May 17 20:17:26 ip-10-0-1-183 systemd[1]: mysterium-node.service: Unit entered failed state.
May 17 20:17:26 ip-10-0-1-183 systemd[1]: mysterium-node.service: Failed with result 'exit-code'.
May 17 20:17:26 ip-10-0-1-183 systemd[1]: mysterium-node.service: Service hold-off time over, scheduling restart.
May 17 20:17:26 ip-10-0-1-183 systemd[1]: Stopped Server for decentralised VPN built on blockchain.
May 17 20:17:26 ip-10-0-1-183 systemd[1]: mysterium-node.service: Start request repeated too quickly.
May 17 20:17:26 ip-10-0-1-183 systemd[1]: Failed to start Server for decentralised VPN built on blockchain.
May 17 20:17:26 ip-10-0-1-183 systemd[1]: mysterium-node.service: Unit entered failed state.
May 17 20:17:26 ip-10-0-1-183 systemd[1]: mysterium-node.service: Failed with result 'exit-code'.
`

Are there any log files I can look at so see if I can find the root of the failure. The status is not very descriptive.

@Hostile

This comment has been minimized.

Copy link

commented May 18, 2017

same on ubuntu 16.04

@Waldz Waldz self-assigned this May 18, 2017

@Waldz Waldz added the bug label May 18, 2017

@Waldz Waldz added this to the MVP milestone May 18, 2017

@Waldz

This comment has been minimized.

Copy link
Member

commented May 18, 2017

Thanks for detailed description, we will fix it.

Problem is because You try to start Service via Systemd.
Currently it was tested only with Initd:

/etc/init.d/mysterium-node start
@Hostile

This comment has been minimized.

Copy link

commented May 18, 2017

thx

@geodavies

This comment has been minimized.

Copy link
Author

commented May 18, 2017

It appears as though the .deb file only installs with systemd as when I run the command you suggested I get: '/etc/init.d/mysterium-node: No such file or directory'

I've had a look inside of of the init.d directory and can confirm it's not there.

I have also tried running with 'systemctl start mysterium_node' but get a similar issue of 'Unit mysterium_node.service could not be found.'

@ewrogers

This comment has been minimized.

Copy link

commented May 18, 2017

Confirmed to be an issue on 16.04. There appears to be two problems:

  • root is required to run iptables, service runs as mysterium-node (permissions?)
  • Not sure where ${DAEMON_OPTS} are injected from, but do not seem to work

My workaround is to manually edit the /lib/systemd/system/mysterium-node.service file like so (replacing NODE_KEY with your own):

NOTE: This will run the service as root!

[Unit]
Description=Server for decentralised VPN built on blockchain
Documentation=https://mysterium.network/
After=network-online.target

[Service]
# User=mysterium-node
# Group=mysterium-node
WorkingDirectory=/etc/mysterium-node
ExecStart=/usr/bin/mysterium_server --node=NODE_KEY --runtime-dir /tmp
KillMode=control-group
Restart=on-failure

[Install]
WantedBy=multi-user.target

Did a reboot and now the service is running without issue.

@Waldz Waldz changed the title Ubuntu 14.04 Node Failing to Start Ubuntu 16.04 Node Failing to Start May 19, 2017

@Waldz

This comment has been minimized.

Copy link
Member

commented May 19, 2017

Exact starting command should be like this:

sudo /usr/bin/mysterium_server --node=NODE_KEY --config-dir=/etc/mysterium-node --runtime-dir=/var/run/mysterium-node
@hubiktomas

This comment has been minimized.

Copy link

commented May 19, 2017

Same problem here with Debian 8.8 - manually changing systemd startup script worked.

@princevince

This comment has been minimized.

Copy link

commented May 20, 2017

This is what I get when running from the command-line:

1495313522082784450 [Info] [ipify.api] IP detected: [my-public-ip-address]
1495313522083917601 [Info] [nat] IP forwarding enabled
1495313522084779221 [Info] [nat] Forwarding packets from '10.8.0.0/24' to IP: [my-public-ip-address]
listen unix /var/run/mysterium-node/openvpn-management-4ec7ba0nat.sock: bind: no such file or directory

@hubiktomas

This comment has been minimized.

Copy link

commented May 20, 2017

I had the same problem. Just create the mysterium-node directory if it is not there and it should work. It is a workaround for a problem that is there.

@princevince

This comment has been minimized.

Copy link

commented May 20, 2017

Thanks! That worked.

@seamlik

This comment has been minimized.

Copy link

commented May 22, 2017

Please fix this bug ASAP, or it just blocks more volunteers from trying. Ubuntu and Debian already use systemd now, testing it on systemd should have been the top priority.

@geodavies

This comment has been minimized.

Copy link
Author

commented May 22, 2017

Can confirm the temporary fix suggested by @ewrogers worked for me also.

@fnzv

This comment has been minimized.

Copy link

commented May 25, 2017

@geodavies The workaround works but how its safe to run as root?

@ewrogers

This comment has been minimized.

Copy link

commented May 26, 2017

You should be using the docker container for proper isolation.

@ne0ark

This comment has been minimized.

Copy link

commented May 26, 2017

Be aware that 16.04 will start the mysterium but !check will fail best way is to start it using sudo /usr/bin/mysterium_server --node=NODE_KEY --config-dir=/etc/mysterium-node --runtime-dir=/var/run/mysterium-node

@Nipol

This comment has been minimized.

Copy link

commented May 31, 2017

Clearing.

/lib/systemd/system/mysterium-node.service

[Unit]
Description=Server for decentralised VPN built on blockchain
Documentation=https://mysterium.network/
After=network-online.target

[Service]
# User=mysterium-node
# Group=mysterium-node
WorkingDirectory=/etc/mysterium-node
ExecStart=/usr/bin/mysterium_server --node=NODE_KEY --config-dir=/etc/mysterium-node --runtime-dir=/var/run/mysterium-node
KillMode=control-group
Restart=on-failure

[Install]
WantedBy=multi-user.target

reboot. or reload.

sudo mkdir /var/run/mysterium-node
sudo service mysterium-node start
sudo service mysterium-node status

check.

@cricket007

This comment has been minimized.

Copy link

commented Jun 1, 2017

Alternative solution, actually define DAEMON_OPTS in some fashion

$ sudo cat /etc/default/mysterium-node 
MYSTERIUM_SERVER_NODE=
MYSTERIUM_SERVER_CONF_DIR=/etc/mysterium-node
MYSTERIUM_SERVER_RUN_DIR=/var/run/mysterium-node

Couldn't figure out how to get this working, but someone may get the idea.

DAEMON_OPTS="--node=$MYSTERIUM_SERVER_NODE --config-dir=$MYSTERIUM_SERVER_CONF_DIR"

Then, you could edit the service this way

ExecStart=/usr/bin/mysterium_server --node=${MYSTERIUM_SERVER_NODE} --config-dir=${MYSTERIUM_SERVER_CONF_DIR} --runtime-dir=${MYSTERIUM_SERVER_RUN_DIR}

Tested with Debian 8.8

@ramzius ramzius closed this Sep 12, 2018

@zolia zolia referenced this issue May 3, 2019

Closed

Smart Contract - Metatask #1018

9 of 13 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.