Remote host add problem

In my remote host IP 192.168.1.10 , i run two command

lxc config set core.https_address [0.0.0.0]:8443
lxc config set core.trust_password passw0rd

Then I am trying to add this from my master server by below command

root@lxd:~# lxc remote add 192.168.1.10
Error: Get “https://192.168.1.10:8443”: Service Unavailable

What is the issue? both are lxd version 4.13

Can you ping 192.168.1.10 OK from the remote server?

Assuming yes, then on the LXD server can you confirm it is listening on LAN address by running:

sudo ss -tlpn | grep lxd

Yes the can Ping each other. But no one can add remote.

I am trying from borh server. here is bellow output

root@lxd1:~# lxc remote add 192.168.1.11
Error: Get “https://192.168.1.11:8443”: Service Unavailable
root@lxd1:~# sudo ss -tlpn | grep lxd
LISTEN 0 128 *:8443 : users:((“lxd”,pid=3317,fd=20))

root@lxd:~# lxc remote add 192.168.1.10
Error: Get “https://192.168.1.10:8443”: context deadline exceeded
root@lxd:~# sudo ss -tlpn | grep lxd1

Actually I need to add 192.168.1.10 as my remote

Can you use telnet <remote ip> 8443 from the remote host and check you can actually connect to the remote port, it may be there is a firewall blocking access.

root@lxd:~# telnet 192.168.1.10 8443
Trying192.168.1.10…
Connected to 192.168.1.10.
Escape character is ‘^]’.

root@lxd1:~# telnet 192.168.1.10 8443
Trying 192.168.1.10…
Connected to 192.168.1.10.
Escape character is ‘^]’.

So I’m assuming that lxd1 is the 192.168.1.10 address. Is there anything in the syslogs for that server indicating any problems, as it suggests the request is timing out.

Is there any possiblity to firewall or proxy issue?

On the server (the 192.168.1.10 host) please run:

lxc monitor --type=logging --pretty

And then on the remote client, re-run:

lxc remote add 192.168.1.10

And then show me the output from the monitor command.

In 192.168.1.10

image

and from my main lxd
image

They appear to be in different subnets, are you using a router or proxy in between them?

Yes ! both server has proxy configuration.

root@lxd1:~# ip r
default via 192.168.1.211 dev eno1np0 proto static
192.168.1.0/24 dev eno1np0 proto kernel scope link src 192.168.1.10

root@lxd:~# ip r
default via 192.168.1.211 dev eno1 proto static
10.63.26.0/24 dev lxdbr0 proto kernel scope link src 10.63.26.1 linkdown
192.168.1.0/24 dev eno1 proto kernel scope link src 192.168.1.11

Ah so that will likely be the issue then, looks like the proxy is interfering with it.

root@lxd1:~# ip r
default via 192.168.1.211 dev eno1np0 proto static
192.168.1.0/24 dev eno1np0 proto kernel scope link src 192.168.1.10

root@lxd:~# ip r
default via 192.168.1.211 dev eno1 proto static
10.63.26.0/24 dev lxdbr0 proto kernel scope link src 10.63.26.1 linkdown
192.168.1.0/24 dev eno1 proto kernel scope link src 192.168.1.11

My both server proxy configuration is same. And I got internet in both server by this proxy also both server can ssh them

@tomp

Please can you verify that you can add a remote from the local subnet to confirm its not an issue with LXD, but an issue with the way your proxy is working. Thanks