gravitl / netmaker

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

[Bug]: The server runs in IP+Port mode and the client cannot join #2048

Open xcf13363175 opened 1 year ago

xcf13363175 commented 1 year ago

Contact Details

No response

What happened?

Since I don’t want to occupy port 443, the server uses IP+Port mode, both web-ui and API can work, but the client cannot join.

Please tell me if I can use this method to implement the deployment of netmaker, and if I made a mistake.

Version

v0.17.1

What OS are you using?

Linux

Relevant log output


netclient join -n xx -u xx-s x.x.x.x:8081

[netclient] 2023-02-17 03:40:38 error connecting to x.x.x.x:8081 : tls: first record does not look like a TLS handshake 
[netclient] 2023-02-17 03:40:38 Join failed: tls: first record does not look like a TLS handshake'

 netclient join -t token

Joining network:  xx
[netclient] 2023-02-17 03:56:16 join failed error creating node Post "https:///api/nodes/xx": http: no Host in request URL 

Contributing guidelines

afeiszli commented 1 year ago

The new version of netmaker (0.18.0) removes the server client, so this is no longs a requirement. It is currently in pre-release but this should be used going forward.

xcf13363175 commented 1 year ago

Thank you very much for your reply, it is still an error in version 0.17.1.

netclient join -t token

[netclient] 2023-02-17 05:50:00 joining kube-net at x.x.x.x:8081 
[netclient] 2023-02-17 05:50:00 error installing:  error creating node Post "https://x.x.x.x/api/nodes/xxx-net": http: server gave HTTP response to HTTPS client
xcf13363175 commented 1 year ago

I may not understand it accurately. Does it mean that the current version still requires SSL to occupy 443, and the 0.18.0 pre-release version does not distinguish between the server and the client, and the ip+port mode can be used.

LordHumphrey commented 1 year ago

I may not understand it accurately. Does it mean that the current version still requires SSL to occupy 443, and the 0.18.0 pre-release version does not distinguish between the server and the client, and the ip+port mode can be used.我可能理解不准确。是不是说现在的版本还是需要SSL占用443,而且0.18.0预发布版不区分server和client,可以使用ip+port模式。

https://github.com/gravitl/netmaker/issues/1437#issuecomment-1202342173 Maybe must have a domain?