Bug
After #1681 (feat: support configuration of external third-party services), CLP_DB_HOST,
CLP_QUEUE_HOST, CLP_REDIS_HOST, and CLP_RESULTS_CACHE_HOST are no longer set in
controller.py for bundled services. However, docker-compose-all.yaml still uses them
as the host_ip for port bindings:
ports:
- host_ip: "${CLP_DB_HOST:-127.0.0.1}"
published: "${CLP_DB_PORT:-3306}"
target: 3306
Because the env vars are never set, Docker always falls back to 127.0.0.1, so bundled
services' ports are only reachable from localhost. Users can no longer configure, for
example, database.host: "0.0.0.0" to expose the bundled database on all network
interfaces — which was previously needed for multi-host deployments where workers on other
machines connect to a host running the bundled database.
Expected: Setting database.host: "0.0.0.0" (or a specific IP) in clp-config.yaml
causes the bundled database's port to be published on that address, making it reachable
from other hosts.
Actual: The published port is always bound to 127.0.0.1 regardless of the configured
host, making the service unreachable from other hosts.
CLP version
Any commit after #1681 was merged.
Environment
Any environment running the CLP package (Docker Compose deployment).
Reproduction steps
- In
etc/clp-config.yaml, set database.host: "0.0.0.0".
- Run
./sbin/start-clp.sh.
- From another host (or via a network interface other than loopback), attempt to connect
to the host machine on port 3306.
- Observe that the connection is refused — the port is only bound to
127.0.0.1.
Root cause: _set_up_env_for_database(), _set_up_env_for_queue(),
_set_up_env_for_redis(), and _set_up_env_for_results_cache() in controller.py no
longer emit CLP_DB_HOST / CLP_QUEUE_HOST / CLP_REDIS_HOST /
CLP_RESULTS_CACHE_HOST for bundled services. The fix is to restore those assignments
(using _get_ip_from_hostname(self._clp_config.<service>.host)) inside the
if BundledService.<SERVICE> in self._clp_config.bundled branch of each method.
Bug
After #1681 (feat: support configuration of external third-party services),
CLP_DB_HOST,CLP_QUEUE_HOST,CLP_REDIS_HOST, andCLP_RESULTS_CACHE_HOSTare no longer set incontroller.pyfor bundled services. However,docker-compose-all.yamlstill uses themas the
host_ipfor port bindings:Because the env vars are never set, Docker always falls back to
127.0.0.1, so bundledservices' ports are only reachable from localhost. Users can no longer configure, for
example,
database.host: "0.0.0.0"to expose the bundled database on all networkinterfaces — which was previously needed for multi-host deployments where workers on other
machines connect to a host running the bundled database.
Expected: Setting
database.host: "0.0.0.0"(or a specific IP) inclp-config.yamlcauses the bundled database's port to be published on that address, making it reachable
from other hosts.
Actual: The published port is always bound to
127.0.0.1regardless of the configuredhost, making the service unreachable from other hosts.
CLP version
Any commit after #1681 was merged.
Environment
Any environment running the CLP package (Docker Compose deployment).
Reproduction steps
etc/clp-config.yaml, setdatabase.host: "0.0.0.0"../sbin/start-clp.sh.to the host machine on port
3306.127.0.0.1.Root cause:
_set_up_env_for_database(),_set_up_env_for_queue(),_set_up_env_for_redis(), and_set_up_env_for_results_cache()incontroller.pynolonger emit
CLP_DB_HOST/CLP_QUEUE_HOST/CLP_REDIS_HOST/CLP_RESULTS_CACHE_HOSTfor bundled services. The fix is to restore those assignments(using
_get_ip_from_hostname(self._clp_config.<service>.host)) inside theif BundledService.<SERVICE> in self._clp_config.bundledbranch of each method.