Closed angyen closed 1 year ago
May I know if you could assist on this?
I fixed this with a bash script that will run every two minutes.
Could you share the bash script and how to apply it?
Thank you in advance.
Did you execute exactly as per the instructions at https://key-networks.com/ztncui
sudo sh -c "echo ZT_TOKEN=`sudo cat /var/lib/zerotier-one/authtoken.secret` >> /opt/key-networks/ztncui/.env"
Note the backticks around sudo cat /var/lib/zerotier-one/authtoken.secret
Did you execute exactly as per the instructions at https://key-networks.com/ztncui
sudo sh -c "echo ZT_TOKEN=`sudo cat /var/lib/zerotier-one/authtoken.secret` >> /opt/key-networks/ztncui/.env"
Note the backticks around
sudo cat /var/lib/zerotier-one/authtoken.secret
Yes I did.
and I just did it again so to make sure that all the command are entered correctly and the following are the screen shots of various tab after I executed the command for your reference.
I am still getting the Response code 401.
Do you see a line in /opt/key-networks/ztncui/.env
like:
ZT_TOKEN=XXXXXXXXXXXXXXXXXXXXXXXX
where XXXXXXXXXXXXXXXXXXXXXXXX is the content of /var/lib/zerotier-one/authtoken.secret
?
Please show the output of:
ls -l /opt/key-networks/ztncui/.env
From your screenshot, you are not using backticks. Instead, you are using single quotes. Please see https://en.wikipedia.org/wiki/Backtick
Backtick is normally directly under the esc
key in the top left corner of your keyboard.
Thank you so much for pointing out my mistake It works now after I replaced the quote with backtick.
Great to hear that - thanks for your feedback!
Set the ZT_TOKEN in .env worked for me too.
Good day.
After I input the commands:-
sudo -i echo ZT_TOKEN=
cat /var/lib/zerotier-one/authtoken.secret>> /opt/key-networks/ztncui/.env chmod 400 /opt/key-networks/ztncui/.env chown ztncui.ztncui /opt/key-networks/ztncui/.env systemctl restart ztncui
I am able to login again but when I go to "networks" tab, I am not able to see my existing networks. The following message is shown:Error retrieving list of networks on this controller: HTTPError: Response code 401 (Unauthorized)
May I know how to resolve this?