zeronsd
zeronsd copied to clipboard
zeronsd-xxxxxxx.service fails after start
I tried to set up ZeroTier with ZeroNSD, but I can't get the latter one to run. I tried to set up ZeroNSD in two different ways, which led to different errors. For both setups I put the Token in /var/lib/zerotier-one/token
.
- I installed ZeroNSD on the same server as ZeroTier.
journalctl
tells me the following:
zeronsd[21772]: Error: Error: Unexpected Response Response { url: Url { scheme: "http", cannot_be_a_base: false, username: "", password: None, host: Some(Ipv4(127.0.0.1)), port: Some(9993), path: "/network/ea818c27fb295a73", query: None, fragment: None }, status: 404, headers: {"cache-control": "no-cache", "pragma": "no-cache", "content-type": "application/json", "content-length": "2", "connection": "close"} }. Are you joined to ea818c27fb295a73?
- I installed ZeroNSD on a different server in the ZeroTier network. Here, ZeroTier was already installed via the Snap package so I edited the service file in the following way:
[Unit]
Description=zeronsd for network ea818c27fb295a73
Requires=snap.zerotier.one.service
After=snap.zerotier.one.service
[Service]
Type=simple
ExecStart=/usr/bin/zeronsd start -t /var/lib/zerotier-one/token -w -d beyond.corp ea818c27fb295a73
TimeoutStopSec=30
Restart=always
[Install]
WantedBy=default.target
Here, the journalctl
output is this:
zeronsd[1094963]: Dec 12 15:16:34.274 INFO zeronsd::init: Welcome to ZeroNS!
zeronsd[1094963]: Error: No such file or directory (os error 2)
Unfortunately, I don't even know which file or directory it tries to read here.
I already saw #195, but the solution there didn't help.
Does anyone have an idea why this fails? And what is the recommended place to install ZeroNDS (same server or different one)?
This could be because the API changed since I last was able to address issues with this repository. If you could humor me, there is #206 which fixes these issues. Since there are no packages yet, I will need you to build directly from source:
cargo install --git https://github.com/zerotier/zeronsd
Also, if you didn't create a "token" file or pass it over the environment according to the docs, you could get this error. So ensure you have done both things.
Hope this helps!
Sorry, you will need to manually incorporate the patch from #206 to get a full reproduction, so just clone the repository and use this to build:
cargo install --path .
Also ensure you're using the correct zeronsd
after you do that, which will be in $HOME/.cargo/bin
. You will also need a rust environment to run cargo.
Hope this helps!