gravitl / netclient

Apache License 2.0
67 stars 32 forks source link

unknown shorthand flag: 'n' in -n #325

Closed jakoberpf closed 1 year ago

jakoberpf commented 1 year ago

After upgrading netclient on macOS to 18.1 from 17.1 I cannot join a network anymore via the basic auth process.

sudo netclient join -n test -u test-user -s api.netmaker.example.de
Error: unknown shorthand flag: 'n' in -n
Usage:
  netclient join [flags]

Flags:
  -h, --help           help for join
  -t, --token string   enrollment token for joining network

Global Flags:
  -v, --verbosity int   set logging verbosity 0-4
jakoberpf commented 1 year ago

not the same issue but maybe related. When running to docker netclient process, the broker address is not in the token?

run -d --network host --privileged -e TOKEN=eyJhcGljb25uc3RyaW5nIjoiYXBpLm5ldG1ha2VyLmVycGYuZGU6NDQzIiwibmV0d29yayI6InRlc3QiLCJrZXkiOiI4MDI0MDRiNDNhYTBjMTIwIn0= -v /etc/netclient:/etc/netclient --name netclient gravitl/netclient:v0.18.1

[netclient] joining network
[netclient] 2023-04-03 17:20:25 setting OS 
[netclient] 2023-04-03 17:20:25 setting version 
[netclient] 2023-04-03 17:20:25 setting netclient hostid 
[netclient] 2023-04-03 17:20:25 setting name 
[netclient] 2023-04-03 17:20:25 setting macAddress 
[netclient] 2023-04-03 17:20:25 setting wireguard keys 
[netclient] 2023-04-03 17:20:25 setting wireguard interface 
[netclient] 2023-04-03 17:20:25 setting listenport 
[netclient] 2023-04-03 17:20:25 setting proxyListenPort 
[netclient] 2023-04-03 17:20:25 setting MTU 
[netclient] 2023-04-03 17:20:25 setting traffic keys 
Joining network:  test
checking for version compatibility  v0.18.1
joined test
[netclient] Starting netclient daemon
daemon called
[netclient] 2023-04-03 17:20:26 netclient daemon started -- version: v0.18.1 
[netclient] 2023-04-03 17:20:26 adding addresses to netmaker interface 
[netclient] 2023-04-03 17:20:27 netclient message queue started for server: broker.netmaker.example.de 
[netclient] 2023-04-03 17:20:27 Starting Proxy... 
[netclient] 2023-04-03 17:20:57 unable to connect to broker, retrying ... 
[netclient] 2023-04-03 17:20:57 could not connect to broker  error: broker address is blank 
[netclient] 2023-04-03 17:20:57 unable to connect to broker, retrying ... 
[netclient] 2023-04-03 17:20:57 could not connect to broker  error: broker address is blank 
[netclient] 2023-04-03 17:20:57 unable to connect to broker, retrying ... 
[netclient] 2023-04-03 17:20:57 could not connect to broker  error: broker address is blank 
[netclient] 2023-04-03 17:20:57 failed to establish connection to broker:  status can only transition to connecting from disconnected 
[netclient] 2023-04-03 17:20:57 unable to connect to broker  status can only transition to connecting from disconnected 
mattkasun commented 1 year ago

ability to connect using username/server/network restored in v0.18.7