key-networks / ztncui

ZeroTier network controller UI
GNU General Public License v3.0
1.51k stars 227 forks source link

Wont Run on Centos - libstdc not found #113

Open Nifty-07 opened 1 year ago

Nifty-07 commented 1 year ago

I installed ztnci on Centos 7 and it all worked fine. I created a few networks, users, etc. After about a month it stopped working. Executed form the command line and it gave the below error:

Error: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /opt/key-networks/ztncui/node_modules/argon2/build/Release/argon2.node)

After backing up, I reinstalled using the below from root: yum reinstall https://download.key-networks.com/el7/ztncui/1/ztncui-release-1-1.noarch.rpm -y Installed: ztncui-release.noarch 0:1-1 Complete!

yum reinstall ztncui -y created /opt/key-networks/ztncui/.env

systemctl status ztncui ztncui.service - ztncui - ZeroTier network controller user interface Loaded: loaded (/usr/lib/systemd/system/ztncui.service; enabled; vendor preset: disabled) Active: failed (Result: start-limit) since Sun 2023-03-12 18:08:01 AEDT; 37min ago Docs: https://key-networks.com Main PID: 27864 (code=exited, status=1/FAILURE)

Changed to ztncui directory and ./ztncui which gave me the below information:

Error: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /opt/key-networks/ztncui/node_modules/argon2/build/Release/argon2.node) at process.dlopen (pkg/prelude/bootstrap.js:2255:28) at Object.Module._extensions..node (node:internal/modules/cjs/loader:1189:18) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Module.require (node:internal/modules/cjs/loader:1005:19) at Module.require (pkg/prelude/bootstrap.js:1855:31) at require (node:internal/modules/cjs/helpers:102:18) at bindings (/snapshot/src/node_modules/bindings/bindings.js:112:48) at Object. (/snapshot/src/node_modules/argon2/argon2.js:3:37) at Module._compile (pkg/prelude/bootstrap.js:1930:22) { code: 'ERR_DLOPEN_FAILED' }

Would greatly appreciate advice on how to get ztncui working again as it appears to be a library issue.

key-networks commented 1 year ago

Is it possible for you to upgrade to Centos 8 or AlmaLinux 8 or 9?

Nifty-07 commented 1 year ago

Negative, its a hosted server which is used by a charitable organisation so I volunteer my time. Current version CentOS v7.9.2009 STANDARD kvm

key-networks commented 1 year ago

I'll see if I can build the RPM on CentOs 7.

key-networks commented 1 year ago

I've tried building on CentOs 7, but have hit a snag with compiling argon2. It comes up with this error: npm ERR! g++: error: unrecognized command line option ‘-std=gnu++14’

It seems that gcc 4.8.5 does not support the C++14 standard. It would require installing at least gcc 5.2 and associated libstdc++, which would break compatibility with standard CentOs 7 anyway.

Does anyone have any suggestions?

maaad commented 1 year ago

Same problem with ztncui-0.8.13-1.x86_64.rpm and Oracle Linux Server release 7.9: ztncui[3152]: Error: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /opt/key-networks/ztncui/node_modules/argon2/build/Release/argon2.node)

Nifty-07 commented 1 year ago

I am needing to authorise some members but unable to get ztncui to run. .Will editing the member.json entries (“authorized:true”, "lastAuthorizedCredentialType":"api","lastAuthorizedTime":

Many thanks

key-networks commented 1 year ago

You can have a look at https://github.com/zerotier/ZeroTierOne/tree/dev/controller on how to talk to the zerotier-one API.

Otherwise, an upgrade to some flavour of EL8 or 9 should allow the RPM to install.

Brueggus commented 1 year ago

I just broke my ztncui installation by yum updateing from ztncui-0.7.1-1.x86_64 to ztncui-0.8.13-1.x86_64...

Is there any chance to get the old rpm for a downgrade? It no longer seems to be available in the repository.

Brueggus commented 1 year ago

So here's a hack which I wouldn't recommend for production environments. But it gets things going again:

# Install a newer libstdc to /opt
yum install http://mirror.ghettoforge.org/distributions/gf/el/7/gf/x86_64/gcc10-libstdc++-10.2.1-7.gf.el7.x86_64.rpm

# Create an override file for the ztncui service and make it use the newer lib
systemctl edit ztncui

# Content
[Service]
Environment="LD_LIBRARY_PATH=$PATH:/opt/gcc-10.2.1/usr/lib64"

# Enjoy
systemctl restart ztncui
key-networks commented 1 year ago

Thanks @Brueggus for your helpful post.

Nifty-07 commented 1 year ago

Thank you, the hack worked so I could authorise the additional members.

Can anyone point me to an arm64 deb???