zerotier / ZeroTierNAS

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

Synology Nas'es lose virtual interface address after reboot. #28

Closed freekdegreef closed 4 years ago

freekdegreef commented 6 years ago

I have 3 different Synology Nas units with this same issue:

After a reboot these devices lose their virtual interface mac address, which re-lists them (un-authorized) on their respective ZeroTier networks. They are running version 1.2.8 and DSM 6.2

On Reddit somebody suggest I'd submit a issue here and suggested it might be deleting it's identity after a reboot?

joseph-henry commented 6 years ago

Hello @freekdegreef it shouldn't be deleting its identity on reboot but I won't rule out that possibility.

Can you check your /var/lib/zerotier-one directory? You should see something like the following:

-rw------- 1 root   24 May  4 17:30 authtoken.secret
drwx------ 4 root 4096 May  4 17:30 controller.d
-rw-r--r-- 1 root  141 Dec  4  2017 identity.public
-rw------- 1 root  270 Dec  4  2017 identity.secret
drwxr-xr-x 2 root 4096 May  4 17:32 networks.d
drwxr-xr-x 2 root 4096 Jun 21 01:12 peers.d
-rw-r--r-- 1 root  634 May  4 17:30 planet
-rw-r--r-- 1 root    6 May 31 18:10 watchdog.pid
-rw-r--r-- 1 root    4 May 31 18:10 zerotier-one.port
joseph-henry commented 6 years ago

As a test I've uninstalled an older version 1.2.5 from my home machine, installed 1.2.8r0, rebooted, updated DSM to 6.2-23739 and rebooted a few times, everything including the identity files are still in place.

It is worth noting that after an install of a new version of ZT it will erase your /var/lib/zerotier-one/networks.d so you will need to manually re-join your networks.

Can you list the packages you have installed on your devices? I'm thinking there might be some sort of interaction with something else.

kennethkalmer commented 6 years ago

I don't know how much help this is, but I saw this happen on a DS215j.

I was on DSM 6.1-something when I installed 1.2.8r0 for the first time, and after upgrading to DSM 6.2-23739 it also lost the network and/or node address. However, there was an immediate update available (DSM 6.2-23739 Update 2), which I installed again and rebooted and the network configs persisted just fine afaict.

I'm brand new to ZeroTier, and being able access my Synology without QuickConnect and/or port-forwarding is a breath of fresh air.

joseph-henry commented 5 years ago

I can't reliably reproduce this issue, but I've uploaded a new set of packages for 1.2.12. This new version will remove identity files upon uninstallation so make sure you back those up somewhere: http://download.zerotier.com/dist/

Let me know if either of you are still experiencing issues and I can take another look.

ajayjohn commented 5 years ago

I came here from https://www.reddit.com/r/zerotier/comments/8xnpeo/synology_changes_interface_address_after_reboot/ and I have the same issue too. Post reboot, the Synology ZT ID changes and then I have to reauthorize the device to let it connect to my network again. Please let me know if there is any additional information that I can provide.

Device: Synology DS716+II Processor Family: Braswell

joseph-henry commented 5 years ago

@ajayjohn, Which version of the package are you using? Try the latest here: http://download.zerotier.com/dist/

You can expect the package to remove your identity files on uninstall but it should never do that on reboot. Let me know if you still see this issue with the 1.2.12 package.

ajayjohn commented 5 years ago

@joseph-henry The latest version seems like it does not lose the ZT ID. So that issue is probably fixed. Thanks! However, now ZT starts up with a PORT_ERROR and leaving the network and joining it again does not seem to fix it. Any suggestions?

Edit: running sudo ls /dev/net/ gives me ls: cannot access /dev/net/: No such file or directory

rjbaat commented 5 years ago

I have installed the latest beta: zerotier-1.2.12r1-syn-apollolake-6.1.spk and have the same problem on 2x 418play. i get the message: zerotier-cli: missing port and zerotier-one.port not found in /var/packages/zerotier/target/var

The package form the site 1.2.8 was giving me the problem that on reboot the id was changing and i had to reauthorise the device on the network.

after uninstall and reinstall i get PORT_ERROR.

Also i get sometimes: zerotier-cli: missing authentication token and authtoken.secret not found (or readable) in /var/packages/zerotier/target/var

rjbaat commented 5 years ago

I have reinstalled the latest version again and when issuing the command: zerotier-cli help:

zerotier-cli: missing authentication token and authtoken.secret not found (or readable) in /var/packages/zerotier/target/var

But the contents of the folder are there:

-rw------- 1 root root  24 Dec 29 15:16 authtoken.secret
-rw------- 1 root root 270 Dec 29 15:16 identity.secret
-rw-r--r-- 1 root root 141 Dec 29 15:16 identity.public
-rw-r--r-- 1 root root 634 Dec 29 15:16 planet
drwx------ 1 root root  24 Dec 29 15:16 controller.d
drwxr-xr-x 1 root root  96 Dec 29 15:20 networks.d
drwxr-xr-x 1 root root 510 Dec 29 15:21 peers.d
-rw-r--r-- 1 root root   5 Dec 29 15:23 zerotier-one.pid
-rw-r--r-- 1 root root   4 Dec 29 15:23 zerotier-one.port
ajayjohn commented 5 years ago

@joseph-henry The latest version seems like it does not lose the ZT ID. So that issue is probably fixed. Thanks! However, now ZT starts up with a PORT_ERROR and leaving the network and joining it again does not seem to fix it. Any suggestions?

Edit: running sudo ls /dev/net/ gives me ls: cannot access /dev/net/: No such file or directory

Unfortunately, the current latest version still does not have the issue resolved :( Wondering if development has paused on the NAS builds.

elsurudo commented 5 years ago

Having the same issue on DS218j w/ zerotier-1.2.8r0-syn-armada38x-6.1.spk – does anyone have a workaround?

zhongyb commented 5 years ago

Follow this link can fix this problem

alatteri commented 5 years ago

@joseph-henry

Using the latest packages available, I am getting the PORT_ERROR on 3 different Synology NAS. Works when you first install ZT, but then fails after a reboot.

RS819 Realtek RTD1296 SoC DSM 6.2.2-24922

RS816 MARVELL Armada 385 88F6820 DSM 6.2.2-24922

DS1511+ INTEL Atom D525 DSM 6.2.2-24922

mrschwarz50 commented 5 years ago

Follow this link can fix this problem

I had the same problem (PORT_ERROR) with a DS218j after uninstalling and reinstalling the Zerotier package. I followed the instructions at the above link and resolved the problem. I had to log in as root and used the same password as the admin account. Using the admin account wouldn't work.

I have restarted the NAS 3 times and the connection is stable.

TGeRi commented 5 years ago

The fix on the link works like a charm. ZeroTier 1.2.13, Synology NAS, newest DSM! THANK YOUR!

joseph-henry commented 5 years ago

Hey everyone, my apologies for taking so long on this. Here's an updated set of packages to preview 1.4.0. It addresses the following issues:

To view logs for this package, see: /var/log/packages/zerotier.log

rjbaat commented 4 years ago

I installed the latest release version: 1.4.0 on a 418play. But after a reboot of the nas it is not working for me. The cli gives me this error missing authentication token and authtoken.secret not found (or readable) in /var/lib/zerotier-one

joseph-henry commented 4 years ago

@rjbaat I would suggest trying the command as root. Otherwise it appears this issue was resolved. Re-open if I am mistaken.