zerotier / ZeroTierNAS

NAS packages for ZeroTier
https://zerotier.com
445 stars 95 forks source link

Synology DS418j #7

Closed plieningerweb closed 6 years ago

plieningerweb commented 6 years ago

Does not go online / can not join network

DS418j Realtek RTD1293 Dual Core 2 Yes rtd1296 DDR4 1GB

image

joseph-henry commented 6 years ago

I think the RTD 1293 and RTD 1296 use the same package architecture. Try this: https://download.zerotier.com/dist/zerotier-1.2.4-syn-rtd129x-6.1.spk

Since I don't have one of these devices in-house it would be fantastic if you could let me know if this fixes your problems (or creates others).

Thanks

plieningerweb commented 6 years ago

It worked once after installation. After restarting the station, it is "deaktivated", and I have to go to activate the app again. Then it shows connected and online in zerotier, but ping / ssh / etc. over the IP in zerotier have 0% answers.

How can I further support you to debug the issue? What commands / syslog / etc. do you need?

joseph-henry commented 6 years ago

For convenience you can start stop and check the status via:

/etc/init.d/zerotier start
/etc/init.d/zerotier stop
/etc/init.d/zerotier status

Also did the NAS install any updates during that restart?

plieningerweb commented 6 years ago

The commands are not there. /etc/init.d does not exist. Only /etc/init, which contains config files only.

I restarted the NAS manually and there were no updates installed.

thunfischbrot commented 6 years ago

Same issue here on DS414j with the new comcerto packages. It worked with automatically assigned IPs, not with a manually set one (from zerotier web interface). It worked for all my other nodes. So I restartet, and now I cannot get it working again. Stopped, started, uninstalled and installed again. The network interface shows up, but only with IPv6 address, and zerotier is stuck at requesting configuration.

/e: After rebooting, restarting, reinstalling and removing and recreating the zerotier network (deleting it at my.zerotier.com) it works, as long as I let it auto-assign the IPv4 address.

/e2: ...and it is not working again. Shown as offline in my.zerotier.com, though as online in Zerotier inside DSM, with status OK for that network.

thunfischbrot commented 6 years ago

The Synology cli for services is

synoservice --status pkgctl-zerotier
synoservice --stop pkgctl-zerotier
synoservice --start pkgctl-zerotier
plieningerweb commented 6 years ago

How can we debug it?

joseph-henry commented 6 years ago

Check for the presence of a watchdog process and the zerotier-one process via:

ps aux | grep zerotier

It should output something like the following:

12946  0.8  0.6 145344  6244 ?  8:46 /usr/local/zerotier/bin/zerotier-one -d
12002  0.1  0.1  11793  1698 ?  1:47 /bin/bash /usr/local/zerotier/bin/ztui_watchdog.sh -daemon

Then, also check for the presence of a /dev/net/tun.

It could be that the process is failing to start, or that the TUN is being torn down on restart.

It could also be that the initialization script is buggy. You can see that by inspecting /etc/init.d/zerotier.

joseph-henry commented 6 years ago

Also,

/opt/var/log/zerotier-one.log

Will contain some logged activity. I can add more to what's logged if we can't figure it out from here.

plieningerweb commented 6 years ago

results:

setup@emu:~$ cat /opt/var/log/zerotier-one.log
cat: /opt/var/log/zerotier-one.log: No such file or directory
setup@emu:~$ 
setup@emu:~$ cat /opt/var/log/zerotier-one.log
cat: /opt/var/log/zerotier-one.log: No such file or directory
setup@emu:~$ ps aux | grep zerotier
setup     6718  0.0  0.1  16612  1892 pts/1    S+   18:52   0:00 grep --color=auto zerotier
root      7683  0.2  0.2   3332  2508 ?        S    10:01   1:15 /bin/bash /usr/local/zerotier/bin/ztui_watchdog.sh -daemon
root     16388  5.9  0.7 142684  7104 ?        Sl   10:21  30:22 /usr/local/zerotier/bin/zerotier-one -d
root     16391  0.2  0.2   3328  2416 ?        S    10:21   1:12 /bin/bash /usr/local/zerotier/bin/ztui_watchdog.sh -daemon
setup@emu:~$ cat /dev/net
net/                network_latency     network_throughput
setup@emu:~$ cat /dev/net/tun 
cat: /dev/net/tun: Permission denied
setup@emu:~$ ls /dev/net
tun
setup@emu:~$ cat /etc/init.d/zerotier
cat: /etc/init.d/zerotier: No such file or directory
setup@emu:~$ cat /etc/init/
Display all 194 possibilities? (y or n)
setup@emu:~$ cat /etc/init/
Display all 194 possibilities? (y or n)
setup@emu:~$ ls /etc/init/z*
ls: cannot access /etc/init/z*: No such file or directory
setup@emu:~$ cat /opt/var/log/zerotier-one.log
cat: /opt/var/log/zerotier-one.log: No such file or directory

setup@emu:~$ sudo sh /usr/local/zerotier/bin/start-stop-status status
ZeroTier is running.

setup@emu:~$ sudo sh /usr/local/zerotier/bin/start-stop-status stop
/usr/local/zerotier/bin/start-stop-status: line 62: /opt/var/log/zerotier-one.log: No such file or directory
Stopping ZeroTier

setup@emu:~$ sudo /usr/local/zerotier/bin/zerotier-one 
ERROR: unable to add ip addresses to ifcfg

Is there a verbose / debug flag for zerotier-one?

plieningerweb commented 6 years ago

Any ideas / help how I could further debug this/support you? Would be really really nice to make it work soon, as of right now we can not ssh into the box from remote.

joseph-henry commented 6 years ago

If anyone is still experiencing GUI problems can you provide me with the following information:

Thanks for your patience.

thunfischbrot commented 6 years ago

screen shot 2018-01-13 at 00 16 05 Thank you for your patience.

Browser: Tried Firefox 57.0.4 on macOS and Windows 7, as well as latest Chrome on macOS and Windows 7.

Console says Error: Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings. react.min.js:15:19949 as soon as Zerotier window is opened, every two to three seconds.

Disabled all extensions, restarted, reloaded, same.

Both direct access via internal IP, via VPN and via Synology Quickconnect exhibit the same behaviour.

No firewall.

I set up the NAS on the same day I installed Zerotier the first time, I guess there are few non-default settings.

joseph-henry commented 6 years ago

Interesting. I can actually replicate the issue when accessing via QuickConnect.

thunfischbrot commented 6 years ago

I re-installed and checked again. It takes a while, but it does show up locally: 2018-01-17 14_01_22-nanoserver - synology diskstation 2018-01-17 14_01_33-nanoserver - synology diskstation

This is great, I think I was just too impatient the last time! Still doesn't work via quickconnect, but that's not a major issue for me.

joseph-henry commented 6 years ago

@thunfischbrot I'm very glad to hear this! I will keep working on a solution for QuickConnect. And yes, some of the ARM-based models seem to struggle with the authorization and identity generation task for some reason.

plieningerweb commented 6 years ago

Pre reboot:

$ ps aux | grep zerotier
root      7765  0.2  0.1   3332  1664 ?        S     2017  93:48 /bin/bash /usr/local/zerotier/bin/ztui_watchdog.sh -daemon
setup    27152  0.0  0.2  16612  1924 pts/2    S+   13:14   0:00 grep --color=auto zerotier

After reboot:

$ ps aux | grep zerotier
root      7519  0.2  0.2   3220  2352 ?        S    13:17   0:00 /bin/bash /usr/local/zerotier/bin/ztui_watchdog.sh -daemon
setup     8473  0.0  0.2  16612  1952 pts/1    S+   13:17   0:00 grep --color=auto zerotier

Seems like the init script is totally broken. /usr/local/zerotier/bin/ztui_watchdog.sh -daemon does have the wrong path to zerotier, not /usr/local/zerotier/bin/zerotier-one. Furthermore it would only be started if no tun device exists. But its already there after a restart.

I will now reinstall zerotier once again, and check at the clean install if it would work if I ran it from ssh.

plieningerweb commented 6 years ago

After reinstall and no reboot:

Its connected and ps aux shows running

$ ps aux | grep zerotier
root     14697  0.2  0.2   3204  2464 ?        S    13:48   0:00 /bin/bash /usr/local/zerotier/bin/zerotier-watchdog.sh daemon
root     14704 18.8  0.8 142472  8340 ?        Rl   13:48   0:11 /usr/local/zerotier/bin/zerotier-one -d
setup    17699  0.0  0.2  16612  2092 pts/1    S+   13:49   0:00 grep --color=auto zerotier

Ok, after restart still there. I noticed that the file /usr/local/zerotier/bin/zerotier-watchdog.sh changed quite a lot compard to the one I had before the reinstall. Seemed like the version was substaintially updated since last time. Didnt know that. Zerotier is working for now (configuired over local IP in webinterface). Thanks for the awesome range of hardware support. Where can I donate or otherwise support this project?

joseph-henry commented 6 years ago

@plieningerweb Glad it seems to work, thanks for your help. The only way we have set up to receive donations is via cryptocurrency. But really the most valuable thing to us is your continued patience and spreading the word.

BTC: 1Gp5JLv6iUFsA5kSt5so6qTjHoWtnEUokk ETH: 0x777BEb3971a855F0924ed0f0C93c49bC3F3A4981 LTC: LZeKgHAy9BJcPC1TaqN5AN6mWH5gQ8Knrp

I'll close this ticket soon unless anyone objects.