gravitl / netmaker

Netmaker makes networks with WireGuard. Netmaker automates fast, secure, and distributed virtual networks.
https://netmaker.io
Other
9.4k stars 547 forks source link

netclient-install.sh failed #49

Closed changchichung closed 3 years ago

changchichung commented 3 years ago

OS: ubuntu 20.04 x64

netclient is a folder already exists , so the script won't get the netclient binary.

chchang@dc039:~/git/netmaker$ curl -sfL https://raw.githubusercontent.com/gravitl/netmaker/v0.1/netclient-install.sh |SERVER_URL=ws.abc.com:50051 NET_NAME=TEST_VPN KEY=abcdefg sh -
netclient: 是個目錄 <---it means netclient is a folder 

so I temporary rename the netclient folder and run the install script again , but there are some other error messages

chchang@dc039:~/git/netmaker$ mv netclient netclient.bak
chchang@dc039:~/git/netmaker$ curl -sfL https://raw.githubusercontent.com/gravitl/netmaker/v0.1/netclient-install.sh |SERVER_URL=ws.abc.com:50051 NET_NAME=TEST_VPN KEY=abcdefg sh -
--2021-03-31 09:33:00--  https://github.com/gravitl/netmaker/releases/download/v0.1/netclient
...
...
...

netclient                        100%[========================================================>]  13.75M  10.2MB/s    於 1.3s    

2021-03-31 09:33:04 (10.2 MB/s) - 已儲存 `netclient' [14421311/14421311]

Beginning agent installation.
SERVER SETTINGS:
     Server: ws.abc.com:50051
     AccessKey: abcdefg
Writing to existing config file at /etc/netclient/.netconfig
NODE REQUESTING SETTINGS:
     Password: changeme
     Group: TEST_VPN
     Public Endpoint: 1.1.1.1
     Local Address: 192.168.11.39
     Name: 
     Interface: 
     KeepAlive: 
     Port: 
     Mac Address: 10:bf:48:d6:0c:96
     Private Key: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
     Public Key: agIbVtXcxWJclz8zui59+h9XqSSBsUI5jvBjYk9XnE8=
Writing node settings to netconfig file.
Error installing:  rpc error: code = Unknown desc = Key: 'Node.Group' Error:Field validation for 'Group' failed on the 'group_exists' tag
Cleaning up (uninstall)
Deleting remote node with MAC: 10:bf:48:d6:0c:96
Authenticating with GRPC Server
Error reading token. Logging in to retrieve new token.
2021/03/31 09:33:06 Failed to authenticate: rpc error: code = Unauthenticated desc = Something went wrong with Auto Login: rpc error: code = Unknown desc = mongo: no documents in result
remove /etc/netclient/.nettoken: no such file or directory
Failed to stop netclient.service: Unit netclient.service not loaded.
Error stopping netclient.service. Please investigate.
exit status 5
Failed to disable unit: Unit file netclient.service does not exist.
Error disabling netclient.service. Please investigate.
exit status 1
Failed to stop netclient.timer: Unit netclient.timer not loaded.
Error stopping netclient.timer. Please investigate.
exit status 5
Failed to disable unit: Unit file netclient.timer does not exist.
Error disabling netclient.timer. Please investigate.
exit status 1
Error removing file. Please investigate.
remove /etc/systemd/system/netclient.timer: no such file or directory
Please investigate any stated errors to ensure proper removal.Failure to delete node from server via gRPC will mean node still exists and needs to be manually deleted by administrator.chchang@dc039:~/git/netmaker$ 
chchang@dc039:~/git/netmaker$ 
changchichung commented 3 years ago

I know the reason why the script failed to establish a vpn connection. I created a network named "test_VPN" (watch the capitalization)

https://i.imgur.com/xaqJrAG.png

but the name shows all in capitalization everywhere. https://i.imgur.com/4rQmWVW.png so I misunderstanding the network name , after fix the name to correct one , it's ok now to run the script without error