lxd-dashboard icon indicating copy to clipboard operation
lxd-dashboard copied to clipboard

unable to add host

Open mohsenbastani opened this issue 2 years ago • 4 comments

Hi. I have been install lxd cluster in private network . I forwarded 8443 on public IP to lxd host IP address on port 8443. when I load https://public_ip:8443 on browser I see: {"type":"sync","status":"Success","status_code":200,"operation":"","error_code":0,"error":"","metadata":["/1.0"]} but I can't add host to dashboard . (Unable to connect to remote host) how I can find the problem? lxd-dashboard installed as a container in lxd cluster and use from internal ovn network. I forwarded another public IP address to the lxd-dashboard container to access it directly from browser. Regards.

mohsenbastani avatar Aug 27 '22 11:08 mohsenbastani

Is this thread closed? If not, I am here to help :)

Exanteros avatar Jan 06 '23 18:01 Exanteros

Hello, I would like to join this ticket. I have this exact problem on my server, I can't add a host.

LXDWare version: 3.6.0 (same problem with version 3.4.0)

Host System (IP 10.1.40.2): ArchLinux Container with LXDWare Alpine (IP 10.1.40.3), built according to the instructions on the LXDWare website for Alpine containers. I have installed the certificate.

The whole thing was implemented using macvlan, all clients get their IP addresses from the MAC addresses from DHCP.

The error message is: "Unable to connect to remote host".

Thanks for the help, if more info is needed please let me know.

grafik

Edit: I think it might have something to do with macvlan, because the host can't send a ping to the container and the container can't send a ping to the host.

localtux avatar Feb 14 '23 04:02 localtux

I think you are correct in possibly the macvlan setup being the issue. That error is coming from line 82 of https://github.com/lxdware/lxd-dashboard/blob/master/lxd-dashboard/backend/lxd/remotes.php. At this point of the code a php curl request was sent to the host and port defined in the request (10.1.40.3) and did not get back a trusted nor untrusted connection from its LXD API. How is your macvlan configured?

matthewalanpenning avatar Feb 15 '23 10:02 matthewalanpenning

Hello and thank you for the answer. I got a tip from a bash script that solved the issue. It's actually because in macvlan no communication between host and container is possible. The script creates a new bridge over the network card. The bridge gets an IP from the same network and sets the routes, if I interpret the script correctly. I don't want to post the script directly, but who is interested it is in the GIT with the name "cvmiller". Unfortunately the script did not work directly but with a little adjustment it works now. Now I can also use LXDware. Thanks for all the work I find this manager great.

localtux avatar Feb 15 '23 15:02 localtux