Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to add host #45

Open
mohsenbastani opened this issue Aug 27, 2022 · 4 comments
Open

unable to add host #45

mohsenbastani opened this issue Aug 27, 2022 · 4 comments

Comments

@mohsenbastani
Copy link

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.

@Exanteros
Copy link

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

@localtux
Copy link

localtux commented Feb 14, 2023

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.

@matthewalanpenning
Copy link
Contributor

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?

@localtux
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants