HTTP(s) webserver not starting
See original GitHub issueI’m runing hass-emulated-hue in a standalone docker (not as add-on). HUE Bridge cannot be found on the network. Also port 80 or 443 or not responding on the IP of the docker container.
Steps to Reproduce
Start the docker image:
docker run --name=hass-emulated-hue -hostname=hass-emulated-hue -e TZ=Europe/Amsterdam -e \
HASS_URL=https://homeassistant.example.com -e HASS_TOKEN=*** -e VERBOSE=true --network lan-static --ip x.x.x.x \
-v hass-emulated-hue-config:/config/.emulated-hue ghcr.io/hass-emulated-hue/core:latest
Expected behavior
HUE Bridge is discoverable on the network. Also ports 80 and/or 443 should at least make a TCP connection. While browsing other issues, I noticed that the logs should contain lines like these:
emulated_hue.api -- Started HTTP webserver on port 80
emulated_hue.api -- Started HTTPS webserver on port 443
but those are not in my logs.
Logs
Output from docker container:
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-set-vars.sh: executing...
[21:31:30] INFO: Starting Emulated Hue...
[cont-init.d] 00-set-vars.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
2022-06-08 21:31:30,501 DEBUG emulated_hue.utils -- Loading /root/.emulated_hue/emulated_hue.json failed: [Errno 2] No such file or directory: '/root/.emulated_hue/emulated_hue.json'
2022-06-08 21:31:30,507 INFO emulated_hue.config -- Auto detected listen IP address is x.x.x.x
2022-06-08 21:31:30,519 DEBUG getmac -- Raw MAC found: None
2022-06-08 21:31:30,522 DEBUG getmac -- Raw MAC found: 00:50:56:ba:6b:8a
2022-06-08 21:31:30,525 DEBUG aiorun -- Entering run()
2022-06-08 21:31:30,537 DEBUG aiorun -- Creating default executor
2022-06-08 21:31:30,561 INFO hass_client -- Connected to Home Assistant wss (version 2022.6.4)
Also I see a log entry in Home Assistant when the container starts:
[140174100621440] Client unable to keep up with pending messages. Stayed over 512 for 5 seconds
Hardware Info:
- Architecture: x86
- Addon version: ghcr.io/hass-emulated-hue/core:latest
- OS: Docker: VMWare VCH, HASS: Supervised
- Hardware : PC/Server
Issue Analytics
- State:
- Created a year ago
- Comments:10 (3 by maintainers)
@meden The image uses host networking which allows direct access to host ports. You will therefore not see any port mappings. The ports uses can be configured in the config options.
@fjgalesloot I’m not entirely sure what could be happening here. Can you list the steps that you took to reproduce this from a clean home assistant install? I am unable to reproduce this.
This message here is key
s6-overlay-suexec: fatal: can only run as pid 1.
. This occurs because something is overriding the default entrypoint. Oftentimes there is some setting to disable this behavior termedinit
which you’ll need to find.