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

Ubiquiti USG mips64 package returns installation error. #1553

Open
stevenwright1 opened this issue Jan 31, 2022 · 19 comments
Open

Ubiquiti USG mips64 package returns installation error. #1553

stevenwright1 opened this issue Jan 31, 2022 · 19 comments
Assignees

Comments

@stevenwright1
Copy link

USG3P

Steven@ubnt:/etc$cat version
UniFiSecurityGateway.ER-e120.v4.4.56.5449062.211020.0831

Steven@ubnt:/config/data/firstboot/install-packages$ uname -a
Linux ubnt 3.10.107-UBNT #1 SMP Wed Oct 20 08:38:35 UTC 2021 mips64 GNU/Linux

Steven@ubnt:/config/data/firstboot/install-packages$ curl https://download.zerotier.com/dist/ubiquiti/zerotier-one_mips64.deb --output /config/data/firstboot/install-packages/zerotier-one.deb
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1145k 100 1145k 0 0 1894k 0 --:--:-- --:--:-- --:--:-- 2067k

Steven@ubnt:/config/data/firstboot/install-packages$ md5sum zerotier-one.deb
dfd1bf76858d8419d87bcafa091f799b zerotier-one.deb

Steven@ubnt:/config/data/firstboot/install-packages$ sudo dpkg -i /config/data/firstboot/install-packages/zerotier-one.deb
dpkg-deb: error: archive '/config/data/firstboot/install-packages/zerotier-one.deb' contains not understood data member control.tar.xz, giving up
dpkg: error processing /config/data/firstboot/install-packages/zerotier-one.deb (--install):
subprocess dpkg-deb --control returned error exit status 2
Errors were encountered while processing:
/config/data/firstboot/install-packages/zerotier-one.deb

@joseph-henry
Copy link
Contributor

Thanks for the report. I'll look into this.

@stevenwright1
Copy link
Author

Also, I had to create the "/config/data/firstboot/install-packages" directory structure.
I'm not sure why it didn't already exist on my device.

@joseph-henry
Copy link
Contributor

I should probably make a note of that detail in the docs. Thanks. I've updated the packaging on our download site and tested it on an ER-4 which should be the same chip architecture and it seems to work now. Let me know if you still have issues.

You only need to delete the old package and re-run the same instructions. The MD5 sum will be different.

@VeselyT
Copy link

VeselyT commented Feb 1, 2022

This does not work for me even with the new package

vt131@ubnt:~$ curl https://download.zerotier.com/dist/ubiquiti/zerotier-one_mips64.deb --output /config/data/firstboot/install-packages/zerotier-one.deb
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1146k  100 1146k    0     0   992k      0  0:00:01  0:00:01 --:--:-- 1097k
vt131@ubnt:~$ sudo dpkg -i /config/data/firstboot/install-packages/zerotier-one.deb
dpkg-deb: error: archive '/config/data/firstboot/install-packages/zerotier-one.deb' contains not understood data member control.tar.xz, giving up
dpkg: error processing /config/data/firstboot/install-packages/zerotier-one.deb (--install):
 subprocess dpkg-deb --control returned error exit status 2
Errors were encountered while processing:
 /config/data/firstboot/install-packages/zerotier-one.deb
vt131@ubnt:~$ md5sum /config/data/firstboot/install-packages/zerotier-one.deb
636f3421028715285c979156e1346a56  /config/data/firstboot/install-packages/zerotier-one.deb
vt131@ubnt:~$ uname -a
Linux ubnt 3.10.107-UBNT #1 SMP Wed Oct 20 08:38:35 UTC 2021 mips64 GNU/Linux

@stevenwright1
Copy link
Author

I've just checked. Same result as VeselyT.

@stevenwright1
Copy link
Author

root@ubnt:/config/data/firstboot/install-packages# cat /etc/debian_version
7.11

root@ubnt:/config/data/firstboot/install-packages# ar -x zerotier-one.deb
root@ubnt:/config/data/firstboot/install-packages# tar -xf data.tar.xz
tar: invalid tar magic

@joseph-henry
Copy link
Contributor

Sorry for the inconvenience. I just checked my router and it's running 9.12. Are you on latest firmware for your device? If so, I can look into building some packages for the older distro. I think that might fix it.

@jgherbert
Copy link

The problem - which I'm also facing - is that the USG-3, at least, even with the latest version of firmware (v4.4.56) runs an old version of dpkg which does not support xz compression:

# dpkg --version
Debian `dpkg' package management program version 1.16.18 (mips).

Ironically, xz itself is installed; so regarding the post above from @stevenwright1 trying to use tar -xf, so for testing purposes one could instead try this:

xz --decompress <file.tar.xz>

That will give you a tar file which you can then gzip. If you have a directory containing the control.tar.gz, data.tar.gz and debian-binary, you can then repackage it by going into that directory and using:

ar -r <new-package-name>.deb debian-binary control.tar.gz data.tar.gz

It's critical that debian-binary comes first in that file list, by the way.

Then you can run the installer using dpkg -i <new-package-name>.deb.

root@ubnt:~/zerotier-gzip# dpkg -i zt-gzipped.deb
Selecting previously unselected package zerotier-one.
(Reading database ... 33023 files and directories currently installed.)
Unpacking zerotier-one (from zt-gzipped.deb) ...
Setting up zerotier-one (1.8.4) ...
update-rc.d: warning: default stop runlevel arguments (0 1 6) do not match zerotier-one Default-Stop values (none)
[....] Starting ZeroTier One: zerotier-one/usr/sbin/zerotier-one: WARNING: failed to drop privileges (kernel may not support required prctl features), running as root
. ok

The only other issue I see when running is that when starting as a service, the PID is not being written to /var/lib/zerotier-one/zerotier-one.pid, so checking service zero tier-one status will say that the service is not running even though it is. However, it is definitely running and listening on 9993 and it seems to connect ok.

In conclusion, the USG needs a deb file which has been packed with gzip not xz.

@joseph-henry joseph-henry self-assigned this Feb 7, 2022
@RetroZA
Copy link

RetroZA commented Feb 23, 2022

Struggling with the same issue when attempting to install.

@zerg960
Copy link

zerg960 commented Mar 1, 2022

Step by step clarification:

mkdir -p /config/data/firstboot/install-packages
cd /config/data/firstboot/install-packages
curl https://download.zerotier.com/dist/ubiquiti/zerotier-one_mips64.deb --output /config/data/firstboot/install-packages/zerotier-one.deb

mv zerotier-one.deb zerotier-one-xz.deb
ar -x zerotier-one-xz.deb
xz --decompress control.tar.xz
xz --decompress data.tar.xz
gzip control.tar
gzip data.tar
ar -r zerotier-one.deb debian-binary control.tar.gz data.tar.gz
sudo dpkg -i zerotier-one.deb

sudo zerotier-cli join <networkid>

@yahoopl
Copy link

yahoopl commented May 7, 2022

After step by step I got missing iproute2 on newest UDM Pro build. Same thing with original package. Any idea?

root@ubnt:/config/data/firstboot/install-packages# sudo dpkg -i zerotier-one.deb
(Reading database ... 67927 files and directories currently installed.)
Preparing to unpack zerotier-one.deb ...
Unpacking zerotier-one (1.8.4) over (1.8.4) ...
dpkg: dependency problems prevent configuration of zerotier-one:
zerotier-one depends on iproute2; however:
Package iproute2 is not installed.

dpkg: error processing package zerotier-one (--install):
dependency problems - leaving unconfigured
Processing triggers for systemd (241-5~bpo9+1) ...
#-> ubnt-dpkg-cache install
removing /data/dpkg-cache/stretch/packages/zerotier-one_1.8.4_arm64.deb ... done
zerotier-one: action=install, package=/data/dpkg-cache/stretch/packages/zerotier-one_1.8.4_arm64.deb mark=manual
<-# ubnt-dpkg-cache install
Errors were encountered while processing:
zerotier-one

@piersdd
Copy link

piersdd commented May 10, 2022

also following zerg960 Step by step clarrification;
on USG-3P firmware version 4.4.55.5377096;

  • errors encountered,
  • zerotier-cli does successfully JOIN

thankyou Zerg

admin@USGFrontDoor:/config/data/firstboot/install-packages$ sudo dpkg -i zerotier-one.deb
Selecting previously unselected package zerotier-one.
(Reading database ... 33053 files and directories currently installed.)
Unpacking zerotier-one (from zerotier-one.deb) ...
Setting up zerotier-one (1.8.4) ...
update-rc.d: warning: default stop runlevel arguments (0 1 6) do not match zerotier-one Default-Stop values (none)
[....] Starting ZeroTier One: zerotier-one/usr/sbin/zerotier-one: WARNING: failed to drop privileges (kernel may not support required prctl features), running as root
. ok 
admin@USGFrontDoor:/config/data/firstboot/install-packages$ 

@piersdd
Copy link

piersdd commented May 10, 2022

although, whilst the binaries survive a minor system upgrade (to version 4.4.56.5449062), and apparently still connected to the ZeroTier network, packets do not appear to flow, and the member shows as OFFLINE in the ZeroTier Central.

admin@USGFrontDoor:~$ sudo zerotier-cli info
200 info 935abcdefd 1.8.4 ONLINE

may also require a documentation change

admin@USGFrontDoor:~$ sudo systemctl stop zerotier-one.service
sudo: systemctl: command not found

@piersdd
Copy link

piersdd commented Jun 2, 2022

although, whilst the binaries survive a minor system upgrade (to version 4.4.56.5449062), and apparently still connected to the ZeroTier network, packets do not appear to flow, and the member shows as OFFLINE in the ZeroTier Central.

Update:

  • Packets DO flow after re-install, however
  • software is NOT reinstalled automatically upon system upgrade as documented

@BumperBender
Copy link

Thanks to everyone contributing to this - by following instructions from Zerg960 i have be able to install the ZeroTier on several Unifi USG and connect from phones/laptops with ease, it has been a learning process but I'm stoked to be able to connect

One question though - how do you get ZeroTier to reconnect after a reboot of the USG, I gave it plenty of time but in the end I manually rerun these 2 commands
sudo dpkg -i zerotier-one.deb
sudo zerotier-cli join

@Ganesh-AT
Copy link

If anyone is successfully running ZeroTier on a USG, I would love to hear back about any issues that you are facing. I am currently running into periodic link disconnects that I have documented here - https://discuss.zerotier.com/t/zerotier-one-issues-with-mips64-build-on-unifi-usg-pro-4/9999 , and would like to investigate it deeper if it is something specific to my installation.

@whachoe
Copy link

whachoe commented Feb 9, 2023

If anyone is successfully running ZeroTier on a USG, I would love to hear back about any issues that you are facing. I am currently running into periodic link disconnects that I have documented here - https://discuss.zerotier.com/t/zerotier-one-issues-with-mips64-build-on-unifi-usg-pro-4/9999 , and would like to investigate it deeper if it is something specific to my installation.

I'm experiencing the same issue. If i find a workaround/fix, i'll come back here..

@iceman3k
Copy link

iceman3k commented Oct 2, 2023

Issue still unresolved

@kjetilpp
Copy link

kjetilpp commented Feb 10, 2024

Same issue on USG 3P

KjetilPP@ubnt:/config/data/firstboot/install-packages$ sudo dpkg -i zerotier-one.deb
Selecting previously unselected package zerotier-one.
(Reading database ... 33023 files and directories currently installed.)
Unpacking zerotier-one (from zerotier-one.deb) ...
Setting up zerotier-one (1.8.4) ...
update-rc.d: warning: default stop runlevel arguments (0 1 6) do not match zerotier-one Default-Stop values (none)
[....] Starting ZeroTier One: zerotier-one/usr/sbin/zerotier-one: WARNING: failed to drop privileges (kernel may not support required prctl features), running as root
. ok 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests