Can't access host computer web service

Hi to all,

All this described is at my home lan.

In a pc I have setup lxd, haproxy and a few containers as web servers.
At the router I have opened 80/443 and showing my ip.(not stastic but its working yet)
I can access the containers web servers fron outside of the lan.

What I can’t do is to access the host computers web server, I have a small apcups with web gui connected to it and it would be nice to have access but visiting 192.168.1.3/cgi-bin/apcupsd/multimon.cgi
says 503 Service Unavailable No server is available to handle this request.

Hi Blades,

Have you try to tcpdump the the network traffic on the lxd host and on the webserver ?

regards,

The host has two network interfaces, let’s say, enp5s0 and lxdbr0. When you setup a network service on the host (as with apcupsd), then this service will start listening on a network port on one or more network interfaces. There is a requirement that only one service can listen/bind on a specific network interface and port.

It looks like HAProxy runs on the host, on ports 80 and 443, and redirects the incoming connections to the appropriate container. By doing so, apcupsd would not be able to run on the host on port 80, and fail to run (and should say so in the logs). Hence the error message 503 Service Unavailable No server is available to handle this request, which comes from HAProxy and says that it has not been able to serve the URL 192.168.1.3/cgi-bin/apcupsd/multimon.cgi because it has not been configured to process it.

An approach would be to setup apcupsd to listen to another port, like 8000, but still on the main network interface.

1 Like

I will check this out this week and reply what happened.

Actually there was a problem between pc and ups communication, that was the mess. Is working fine as soon as I fixed that comm error.

Thank you!