Anyone else having issues with the 2021.9.0 esphome docker image (RasPi 3)?

My auto-updated (via Watchtower, to 2021.9.0) docker for esphome is continually restarting, looping with the below errors. If I roll back to 2021.8.2, the container starts just fine.

Before I start digging into it, has anyone else seen this and/or figured it out yet?

Cheers in advance.

Traceback (most recent call last):
  File "/usr/local/bin/esphome", line 33, in <module>
    sys.exit(load_entry_point('esphome', 'console_scripts', 'esphome')())
  File "/usr/src/app/esphome/__main__.py", line 770, in main
    return run_esphome(sys.argv)
  File "/usr/src/app/esphome/__main__.py", line 739, in run_esphome
    return PRE_CONFIG_ACTIONS[args.command](args)
  File "/usr/src/app/esphome/__main__.py", line 401, in command_dashboard
    return dashboard.start_web_server(args)
  File "/usr/src/app/esphome/dashboard/dashboard.py", line 854, in start_web_server
    app.listen(args.port)
  File "/usr/local/lib/python3.9/dist-packages/tornado/web.py", line 2109, in listen
    server.listen(port, address)
  File "/usr/local/lib/python3.9/dist-packages/tornado/tcpserver.py", line 152, in listen
    self.add_sockets(sockets)
  File "/usr/local/lib/python3.9/dist-packages/tornado/tcpserver.py", line 165, in add_sockets
    self._handlers[sock.fileno()] = add_accept_handler(
  File "/usr/local/lib/python3.9/dist-packages/tornado/netutil.py", line 246, in add_accept_handler
    io_loop = IOLoop.current()
  File "/usr/local/lib/python3.9/dist-packages/tornado/ioloop.py", line 263, in current
    loop = asyncio.get_event_loop()
  File "/usr/lib/python3.9/asyncio/events.py", line 639, in get_event_loop
    self.set_event_loop(self.new_event_loop())
  File "/usr/lib/python3.9/asyncio/events.py", line 659, in new_event_loop
    return self._loop_factory()
  File "/usr/lib/python3.9/asyncio/unix_events.py", line 54, in __init__
    super().__init__(selector)
  File "/usr/lib/python3.9/asyncio/selector_events.py", line 55, in __init__
    super().__init__()
  File "/usr/lib/python3.9/asyncio/base_events.py", line 397, in __init__
    self._clock_resolution = time.get_clock_info('monotonic').resolution
PermissionError: [Errno 1] Operation not permitted
Exception ignored in: <function BaseEventLoop.__del__ at 0x76251970>
Traceback (most recent call last):
  File "/usr/lib/python3.9/asyncio/base_events.py", line 681, in __del__
    _warn(f"unclosed event loop {self!r}", ResourceWarning, source=self)
  File "/usr/lib/python3.9/asyncio/base_events.py", line 419, in __repr__
    f'closed={self.is_closed()} debug={self.get_debug()}>'
  File "/usr/lib/python3.9/asyncio/base_events.py", line 1909, in get_debug
    return self._debug
AttributeError: '_UnixSelectorEventLoop' object has no attribute '_debug'

Stop using watchtower. And update to something after 2021.9.0, like 2021.9.6

What an incredibly unhelpful answer. There’s nothing wrong with Watchtower - wasn’t asking - and 2021.9.0 is the latest stable available version, pushed only a day ago.

Without commenting on Watchtower, because I don’t know what that is, I would just like to add that on my system (Home Assistant OS), using Frenck’s community addons, the most recent version available is in fact 2021.9.0 - at least, that’s what my system is showing as the latest update. I’m still running 2021.8.2, simply because I have a historic suspicion about .0 releases. :smiley:

Should we be getting our ESPHome versions from somewhere else, @nickrout? Please recommend. You’ll recall I manually switched over to that repository after it was listed on esphome.io as the correct way to install ESPHome.

The add-on for esphome (2021.9.0) works on my system. (pi4)

Sorry I didn’t see that this was tagged esphome, I assumed that it was home-assistant. And there was a loop reported for pi3 on HA core 2021.9.0.

Watchtower however has been warned against for home-assistant use.

Sorry for my prickly response - having a bad one at work. No excuse though…

Yeah, I realised that’s where the confusion might have been after reading a couple of other responses. And, for the record, I absolutely have watchtower turned off for my Home Assistant container (and Pihole).

Am I in the wrong spot to be asking about the esphome docker image? I don’t use Discord, and assumed with the Nabu Casa acquisition earlier this year, this would be an “official” place to ask.

LOL no worries, if prickly responses were punished, I’d have been banned ages ago.

I think you are in the right place. I haven’t had this problem but then again I am on amd64 and esphome-dev.

Lol - good to know I’m in the right company.

I saw they pushed a dev tag to docker hub a couple of hours ago, but got the same issue. Strangely, I’ve even tried moving my esphome config out of the way, so it’s not any of my devices yamls, and I get the same problem.

Last try will be an entirely new container (so brand new volumes across the board), and see if that helps.

Edit: that answers that - brand new container, no config, port-based (in case host network mode was the cause) and I get the same problems. Something funky with the 2021.9.0 image.

Edit 2: so spun up a fresh 2021.9.0 esphome container on my main Intel box, and it runs just fine. Guess I’ll leave it there until the devs figure out the problem with the arm container.

Hey, guys.

I have the same problem. There is a solution?

2021.9.0 is no longer the latest release of esphome.

I had the same problem with the 2021.9.1 container image. Guess I’ll just keep trying each update until it eventually works…

¯\_(ツ)_/¯

1 Like

With version 2021.9.1 I have the same problem

How are your addons configured?

I don’t have any addons configured. In fact, I tried with a completely brand new container with no config at all, and had the same issues.

What ha install method are you on? HAOS, spervised, docker or venv?

Also what is your docker command to start esphome?

I’m using the official esphome docker image, so no relationship to my HA instance (which runs in a separate container, using the official image).

You have answered neither of my questions.

I answered your first question.

My HA is running under docker, using the official image. I also pointed out that it’s unrelated - remember this thread is about the esphome docker image - not HA. I think we had this chat earlier in the thread…
[/quote]

Well, being the official esphome docker image, it’s whatever they had in their Dockerfile which, combined with their entrypoint.sh, appears to just run esphome per the following commandline:

esphome dashboard /config

Where /config can be a docker bind-mount to where I want my config stored, if not using a default docker volume.

It is still a little ambiguous given that 3 of the 4 install methods run under docker :slight_smile:

It is a while since I ran esphome under docker, but the instructions still seem to be to run the image from dockerhub, see Getting Started with ESPHome — ESPHome