Hi,
I am unable to launch new on remote host , i have 2 servers one in google cloud and one in linode.
when i try to execute some command like “lxc exec remote:testcontainer bash” , it works flawless but if i try to create a new container in gives and error.
root@staging2-api-clone:~# lxc launch proxy_image-v8 lin:test1234
Creating test1234
Error: Failed instance creation:
- https://10.175.234.1:8443: Failed to connect to LXD server "https://10.175.234.1:8443": Get "https://10.175.234.1:8443/1.0": Unable to connect to: 10.175.234.1:8443
- https://[fd42:88ad:c57:161d::1]:8443: Failed to connect to LXD server "https://[fd42:88ad:c57:161d::1]:8443": Get "https://[fd42:88ad:c57:161d::1]:8443/1.0": Unable to connect to: [fd42:88ad:c57:161d::1]:8443
- https://192.168.1.4:8443: Failed to connect to LXD server "https://192.168.1.4:8443": Get "https://192.168.1.4:8443/1.0": Unable to connect to: 192.168.1.4:8443
remote host is listening on 8443 flawlessly.
root@staging2-api-clone:~# curl 45.x.x.x:8443
Client sent an HTTP request to an HTTPS server.
P.S : i have already added remote on public IPs below are the details:
Then try again to launch the container from the remote host and see what gets outputted, this will confirm the remote client is connecting to the LXD server.
So we need to start using consistent naming so I can understand your setup
You’ve mentioned server1 and server2, but your remote name in lxc launch proxy_image-v8 lin:test1234 is lin (I assume Linode). But does that represent server1, server2 or serverA?
Also, what are the public IPs (not lxdbr0) of the two servers?
Finally, can you show the output of lxc remote ls on your local client machine?
name=lin (name in my lxc remote list on server A)
lxc info=
environment:
addresses:
- 45.79.x.x:8443
- 192.168.161.244:8443
- '[2600:3c00::f03c:92ff:febf:5a9e]:8443'
- 10.185.26.1:8443
- '[fd42:91:f32c:454f::1]:8443'
public IP =45.79.x.x
Image name i am using = proxy_image-v8
command i am running = lxc launch proxy_image-v8 lin:test1234
i hope it makes things clear for you. if still thing there is any ambiguity or less information feel free to ask.
lxc remote list is given below
root@staging2-api-clone:~# lxc remote list
+-----------------------+------------------------------------------+---------------+-------------+--------+--------+--------+
| NAME | URL | PROTOCOL | AUTH TYPE | PUBLIC | STATIC | GLOBAL |
+-----------------------+------------------------------------------+---------------+-------------+--------+--------+--------+
| images | https://images.linuxcontainers.org | simplestreams | none | YES | NO | NO |
+-----------------------+------------------------------------------+---------------+-------------+--------+--------+--------+
| lin | https://45.79.x.x:8443 | lxd | tls | NO | NO | NO |
Right so that’s the issue I think, you’re asking lin to launch a container using an image on staging2-api-clone but lin cannot connect to staging2-api-clone to get the image (admittedly the error could be clearer in my view).
@tomp but lin server can also connect to staging server see below results
root@localhost:~# telnet 35.184.49.x 8443
Trying 35.184.49.x...
Connected to 35.184.49.x.
Escape character is '^]'.
root@localhost:~# curl 35.184.49.x:8443
Client sent an HTTP request to an HTTPS server.
Which it then informs the remote server lin where it is reachable.
I suspect this is because staging2-api-clone is on GCP and GCP don’t give you a proper public IP on the VM, but instead use 1:1 DNAT, whereas Linode give you a proper public IP on the VM.
If you run ip a on staging2-api-clone this will show you the IPs LXD will know about.
yes you are right that is the case with GCP it does not list the public IP on interface same with AWS how to resolve it ?? so if there is anything we can configure in LXD to add public IP then I think it will work.
@stgraber have you come across this issue before where we need the lxc client to inject an manually specified public IP as one of the remotely reachable addresses it provides in order for the image transfer to proceed?
i have been using LXD for 7-8 months and i used on private networks in Gcp. but now we have requirement to use multi cloud. I guess it will also fail if i put servers across different VPCs