gravitl / netmaker

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

unable to authenticate: Post http: server gave HTTP response to HTTPS client #1437

Closed chinasoftgit closed 2 years ago

chinasoftgit commented 2 years ago

Contact Details

No response

What happened?

docker-compse.yml:

version: "3.4"

services: netmaker: container_name: netmaker image: gravitl/netmaker:v0.14.2 volumes:

I used host IP, how can close https ?

Version

v0.14.0

What OS are you using?

No response

Relevant log output

No response

Contributing guidelines

afeiszli commented 2 years ago

You Have: SERVER_NAME: "HOST_IP"

These should be: SERVER_API_CONN_STRING: "api.BASE_DOMAIN:443" SERVER_HTTP_HOST: "api.BASE_DOMAIN" SERVER_NAME: "broker.BASE_DOMAIN"

example: SERVER_API_CONN_STRING: "api.netmaker.example.com:443" SERVER_HTTP_HOST: "api.netmaker.example.com" SERVER_NAME: "broker.netmaker.example.com"

You must change these values, restart the server, and create new access keys.

chinasoftgit commented 2 years ago

I don't have a domain 。I revise it as you say, but log error: ./netclient join -t eyJhcGljb25uc3RyaW5nIjoiYXBpLm5ldG1ha2VyLmV4YW1wbGUuY29tOjQ0MyIsIm5ldHdvcmsiOiJ0ZXN0Iiwia2V5IjoiNDY3YTQzNzk3YWQ2NGM2MiIsImxvY2FscmFuZ2UiOiIifQ== [netclient] 2022-08-02 18:49:35 joining test at api.netmaker.example.com:443 [netclient] 2022-08-02 18:49:35 unable to authenticate: Post "http://api.netmaker.example.com:443/api/nodes/adm/test/authenticate": dial tcp: lookup api.netmaker.example.com on 127.0.0.53:53: no such host

netmaker must have domain ? can only use host IP?

afeiszli commented 2 years ago

You must have a domain, this is a requirement.