I'm pretty new to LXD having recently discovered it. I'm making progress with the basic interactions with images and containers - it looks promising.
Currently I am stuck on a problem connecting from the host to a service running in a local container. This is my first time trying this. I get a "connection refused" error. More details below:
user@sparky1:~$ curl 10.0.3.49 curl: (7) Failed to connect to 10.0.3.49 port 80: Connection refused user@sparky1:~$
The host is Ubuntu Server 14.04 on my laptop - it's a new install and is pretty plain-vanila. I let the system do all of the configuration (including the lxcbr0 bridge) and haven't changed any of the out-of-the-box defaults.
I'm running a container based on a CentOSv6 image. The container is started and inside I am running a web server. From within the container I can connect to its local web server on port 80 just fine (by running "curl hostname"). It connects on the loopback IP 127.0.0.1 I get a valid response from the local web server from within the container. Yay.
A successful response (even though it's a 403 reponse):
[root@wc1 ~]# curl wc1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>403 Forbidden</title> </head><body> <h1>Forbidden</h1> <p>You don't have permission to access / on this server.</p> <hr> <address>IBM_HTTP_Server at wc1 Port 80</address> </body></html> [root@wc1 ~]#
If I try connecting via the IP on the bridge, either from within the container or from the host then I get the mentioned "connection refused" error.
So, I'm trying to figure out what it will take to allow connections from the host to the the web server running in the container. I have spent a few hours googling and have not found the answer (or been too dense to recognize it).
The firewall is disabled ("ufw status" says so). What am I missing? Thanks in advance.