I was trying to chase where this is being used in the code and verify the unix socket path. I can confirm now that “/run/systemd-journal-gatewayd.sock” is hardcoded in the code: supervisor/supervisor/host/logs.py at 3cd617e68f07799dce6bc480196dd532ac5aa374 · home-assistant/supervisor · GitHub
There were several issues in my setup, first that socket file was turned into a directory as already mentioned several times here. This is because the container hassio_supervisor
binds this file to its own file socket file:
$ docker inspect hassio_supervisor
...
"Mounts": [...
{
"Type": "bind",
"Source": "/run/systemd-journal-gatewayd.sock",
"Destination": "/run/systemd-journal-gatewayd.sock",
"Mode": "rw",
"RW": true,
"Propagation": "rprivate"
}
and if the socket file wasn’t properly initialized by the host system, the default behaviour of docker would automatically create an empty directory and bind that, thus, it became a directory instead of a file. To make sure the socket is created, follow what ShortPutt already did, do
$ systemctl edit systemd-journal-gatewayd.socket
# add the these lines at the top
[Socket]
ListenStream=
ListenStream=/run/systemd-journal-gatewayd.sock
Verify the override, by using the cat
systemctl command: systemctl cat systemd-journal-gatewayd.socket
.
Second issue in my setup was that systemd-journal-remote.service
was listening in HTTPS.
$ systemctl cat systemd-journal-remote.service
...
[Service]
ExecStart=/lib/systemd/systemd-journal-remote --listen-https=-3 --output=/var/log/journal/remote/
...
As you can see, --listen-https
is given. All I had to do is replace that with --listen-http
instead.
$ systemctl edit systemd-journal-remote.service
# again add these lines at the top
[Service]
ExecStart=
ExecStart=/lib/systemd/systemd-journal-remote --listen-http=-3 --output=/var/log/journal/remote/
Use the systemctl cat
again to verify the change.
Afterwhich, I just reboot
.
For reference, this is my HA machine info:
$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
$ uname -a
Linux ha 5.10.0-29-amd64 #1 SMP Debian 5.10.216-1 (2024-05-03) x86_64 GNU/Linux
$ root@ha:~# ha info
arch: amd64
channel: stable
docker: 26.1.3
features:
- reboot
- shutdown
- services
- network
- hostname
- timedate
- os_agent
- resolved
- journal
- disk
hassos: null
homeassistant: 2024.5.5
hostname: ha
logging: info
machine: qemux86-64
operating_system: Debian GNU/Linux 11 (bullseye)
state: running
supervisor: 2024.05.1