Default docker-compose doesn't work for me

I am installing HA in docker on my Orange Pi (armbian), but when i try to use the default config (especially host mode network, doesn’t happen on bridge) i get an error like this

homeassistant  | s6-rc: info: service s6rc-oneshot-runner: starting
homeassistant  | s6-rc: info: service s6rc-oneshot-runner successfully started
homeassistant  | s6-rc: info: service fix-attrs: starting
homeassistant  | s6-rc: info: service fix-attrs successfully started
homeassistant  | s6-rc: info: service legacy-cont-init: starting
homeassistant  | s6-rc: info: service legacy-cont-init successfully started
homeassistant  | s6-rc: info: service legacy-services: starting
homeassistant  | services-up: info: copying legacy longrun home-assistant (no readiness notification)
homeassistant  | s6-rc: info: service legacy-services successfully started
homeassistant  | 2023-06-21 11:13:31.080 WARNING (MainThread) [zeroconf] Error with socket 14 (('192.168.0.157', 5353))): [Errno 1] Operation not permitted
homeassistant  | Traceback (most recent call last):
homeassistant  |   File "/usr/local/lib/python3.11/asyncio/selector_events.py", line 1196, in sendto
homeassistant  |     self._sock.sendto(data, addr)
homeassistant  | PermissionError: [Errno 1] Operation not permitted
homeassistant  | 2023-06-21 11:13:31.765 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 1] Operation not permitted, transport: <_SelectorDatagramTransport fd=19 read=polling write=<idle, bufsize=0>>, socket: <asyncio.TransportSocket fd=19, family=2, type=2, proto=0, laddr=('0.0.0.0', 41293)>
homeassistant  | 2023-06-21 11:13:31.769 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 1] Operation not permitted, transport: <_SelectorDatagramTransport fd=19 read=polling write=<idle, bufsize=0>>, socket: <asyncio.TransportSocket fd=19, family=2, type=2, proto=0, laddr=('0.0.0.0', 41293)>
homeassistant  | 2023-06-21 11:13:31.773 ERROR (MainThread) [async_upnp_client.ssdp] Received error: [Errno 1] Operation not permitted, transport: <_SelectorDatagramTransport fd=23 read=polling write=<idle, bufsize=0>>, socket: <asyncio.TransportSocket fd=23, family=2, type=2, proto=0, laddr=('0.0.0.0', 49149)>

My docker-compose.yml file

version: '3'
services:
  homeassistant:
    container_name: homeassistant
    image: "ghcr.io/home-assistant/home-assistant:stable"
    volumes:
      - ./config:/config
      - /etc/localtime:/etc/localtime:ro
    restart: unless-stopped
    privileged: true
    network_mode: host

Is your docker daemon running as root?

Yes, it does.

Try setting your port in the compose file.

Here is mine for reference.

# 2023-05-07
version: '3.3'
services:
    home-assistant:
        restart: always
        container_name: home-assistant
        privileged: true
        devices:
      # your usb device forwarding to the docker image
          - /dev/ttyUSB0:/dev/ttyUSB0
        volumes:
            - /home/pcwii/homeassistant:/config
            - /var/run/docker.sock:/var/run/docker.sock
            - /run/dbus:/run/dbus:ro
        environment:
            - TZ=america/toronto      
            - PUID=1000
            - PGID=1000
            - UMASK=007
        network_mode: host
        ports:
          - 8123:8123
        image: homeassistant/home-assistant:stable

That won’t help cause specified ports while on host network mode does literally nothing.

Thanks for trying though.

So for anyone wondering, my firewall was blocking all output connections except for http,https and ssh which caused the issue. Now i accept all the outgoing traffic.

1 Like

Not sure what is actually meant by that, but for all future visitors of this thread, a firewall issue won’t give you “permission denied” in you docker containers, it would likely give you timeouts after, usually, 30 seconds.

Maybe the OP did something else to fix the original issue that he doesn’t remember, then stumbled on a firewall issue, but both are unrelated.

Nope, i only changed the firewall settings, it is repeateable