Hi guys,
I have HA in docker on RPi3 with configured WOL. I have also pivpn running on this machine and everything worked fine until few days ago. Here are logs whats going on.
2024-01-09 10:25:35.838 INFO (MainThread) [homeassistant.components.wake_on_lan] Send magic packet to mac a1:b2:c3:d4:e5:f6 (broadcast: 255.255.255.255, port: 9)
2024-01-09 10:25:35.850 INFO (SyncWorker_15) [wakeonlan] macs: ('a1:b2:c3:d4:e5:f6',)
ip_address: 255.255.255.255
port: 9
int: None
2024-01-09 10:25:35.859 INFO (SyncWorker_15) [wakeonlan] packet: b'\xff\xff\xff\xff\xff\xff\xa1\xb2\xc3\xd4\xe5\xf6\xa1\xb2\xc3\xd4\xe5\xf6\xa1\xb2\xc3\xd4\xe5\xf6\xa1\xb2\xc3\xd4\xe5\xf6\xa1\xb2\xc3\xd4\xe5\xf6\xa1\xb2\xc3\xd4\xe5\xf6\xa1\xb2\xc3\xd4\xe5\xf6\xa1\xb2\xc3\xd4\xe5\xf6\xa1\xb2\xc3\xd4\xe5\xf6\xa1\xb2\xc3\xd4\xe5\xf6\xa1\xb2\xc3\xd4\xe5\xf6\xa1\xb2\xc3\xd4\xe5\xf6\xa1\xb2\xc3\xd4\xe5\xf6\xa1\xb2\xc3\xd4\xe5\xf6\xa1\xb2\xc3\xd4\xe5\xf6\xa1\xb2\xc3\xd4\xe5\xf6'
2024-01-09 10:25:35.907 ERROR (MainThread) [homeassistant.components.script.wake_up_pc] wake up PC: Error executing script. Unexpected error for call_service at pos 1: [Errno 126] Required key not available
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 451, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 684, in _async_call_service_step
await service_task
File "/usr/src/homeassistant/homeassistant/core.py", line 1744, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1781, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/usr/src/homeassistant/homeassistant/components/wake_on_lan/__init__.py", line 50, in send_magic_packet
await hass.async_add_executor_job(
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.10/site-packages/wakeonlan.py", line 68, in send_magic_packet
sock.send(packet)
OSError: [Errno 126] Required key not available
2024-01-09 10:25:36.100 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 484, in _async_run
return await self.script.async_run(script_vars, context)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1524, in async_run
await asyncio.shield(run.async_run())
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 409, in async_run
await self._async_step(log_exceptions=False)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 453, in _async_step
self._handle_exception(
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 476, in _handle_exception
raise exception
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 451, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 684, in _async_call_service_step
await service_task
File "/usr/src/homeassistant/homeassistant/core.py", line 1744, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1781, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/usr/src/homeassistant/homeassistant/components/wake_on_lan/__init__.py", line 50, in send_magic_packet
await hass.async_add_executor_job(
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.10/site-packages/wakeonlan.py", line 68, in send_magic_packet
sock.send(packet)
OSError: [Errno 126] Required key not available
I added there some logs, mac changed. When I run this code locally it works fine. However when I run this script inside the docker container it returns same error. So I quite dont understand. Does it have something with docker image? Last things I updated on Rpi was only changing VPN settings - changed host ip address to domain address.
Home Assistant 2022.11.5
Docker version 24.0.6, build ed223bc
docker-compose
version: '3'
services:
homeassistant:
container_name: homeassistant
image: "homeassistant/home-assistant:latest"
volumes:
- /home/path/to/homeassistant/config:/config
- /home/path/to/homeassistant/tmp:/tmp
- /etc/localtime:/etc/localtime:ro
network_mode: "host"
restart: always
privileged: true