HTTP server could not start if no network interface available
I have a strange behavior using 5.19.0 version of monit on a Linux isolated equipment: the HTTP interface is not available if only the loopback interface is available.
Using the same binary and configuration file and adding an interface (here eth0), the socket is correctly created on the loopback interface (as shown in netstat.log).
I have tested using a previous version of monit (5.18.0) and the problem was not present.
Comments (7)
-
Account Deleted reporter -
I can confirm this bug, if interfaces are down monit httpd wont start even when listening on 0.0.0.0 which should be possible by recent kernels. Why is the use of AI_ADDRCONFIG in monit? Any benefits from using this non default flag? If there are non can this be removed? I think a lot of startup problems are related to this.
This also affects 5.20.0
-
repo owner - changed status to resolved
Thanks for bringing this to our attention. Removed usage of AI_ADDRCONFIG with this checkin dcc28e7ffaed. Could you guys be so kind and checkout Monit from Git and test and let us know if this solves the problem you have?
-
repo owner Fixed Issue
#537→ <<cset 4198fddf251f>>
-
Account Deleted reporter Using the same situation with a v5.19.0 and the version from the commit 4198fddf251f, I confirm that the problem is not present using your correction. Seems good for me! Thanks!
-
Hi,
When will be an stable release be available having this fix? We are planning to deploy onto production soon and were hoping we don't have to compile from source for this bug.
Thanks!
-
repo owner Issue
#559was marked as a duplicate of this issue. - Log in to comment
Seems to be link with the flag AI_ADDRCONFIG in hints for getaddrinfo calls. I tried to remove it and it works better.