bindaddress (use address) is allowed multiple times per syntax, but only the last value is being used

Issue #1015 resolved
Ulrich Windl created an issue

Basically this is an enhancement request to allow binding to multiple addresses for the “httpd port”.

This may be important for hosts having multiple IP addresses, such as cluster nodes where addresses may be added and be removed dynamically.

The manual page is not very much explicit about “use address”, so I looked it up in p.y to find httpdlist which allows a list of httpdoptions. One of those is bindaddress.

However the implementation of bindaddress simply sets a variable from the parameter, replacing any previous setting.

When specifying multiple use address monit -t does not complain, but the httpd socket only binds to the last address given.

So there are two possible resolutions:

  1. Fix the grammar to allow only one bindaddress
  2. Fix the implementation to bind to all specified bind addresses

Note: Other options have a similar problem, like pemfile.

Comments (2)

  1. Ulrich Windl reporter

    Actually I think supporting multiple addresses (via an array of sockets queried via select) would be preferable.

    As monit reload also connects to the daemon, it would be preferable to use localhost for that, while still wanting (especially if you enabled SSL) to connect via a web browser from external.

  2. Log in to comment