supervised-installer: Bug Report: installation steps don't mention enabling and mapping `systemd-journal-gatewayd`
OS Version
Debian 11
System Information
unsure
What happened?
The ADR mentions this step in additional supported conditions:
Systemd journal gateway is enabled and mapped into supervisor as
/run/systemd-journal-gatewayd.sock
The installation guide does not include any info on setting this up, it simply says to install systemd-journal-remote
. It also doesn’t currently seem to handle this as part of running the script, based on discussions in here.
Think there either needs to be guidance about how to do this in the step-by-step install guide or the script needs to handle this part.
Machine Type
odroid-n2
Installer output
No response
Relevant log output
No response
ADR
- I have read through the ADR and have confirmed that my system is compliant with the requirements
- I understand that if my system is found to not be compliant, my issue will be closed immediately without further investigation
Code of Conduct
- I have read and agree to the Home Assistant Code of Conduct
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 10
- Comments: 103 (13 by maintainers)
Commits related to this issue
- Create systemd socket override for systemd-journal-gatewayd As stated in https://github.com/home-assistant/supervised-installer/issues/247 the default action for systemd-journal-gatewayd is to listen... — committed to p0wertiger/supervised-installer by p0wertiger a year ago
- Check and fix systemd socket file As stated in #247 with the default setup the path /run/systemd-journal-gatewayd.sock may be a directory, not a file, we have to fix that — committed to p0wertiger/supervised-installer by p0wertiger a year ago
- Issue #247 Ensure systemd-journal-gatewayd socket is correct (#277) * Create systemd socket override for systemd-journal-gatewayd As stated in https://github.com/home-assistant/supervised-installe... — committed to home-assistant/supervised-installer by p0wertiger a year ago
blendrik’s post was the last piece of the puzzle for me!
Running debian, I also found my socket file in
/lib/systemd/system/systemd-journal-gatewayd.socket
, unlike in sdotter’s post. I then made the same changes toListenStream
and then followed jfparis’s advice so that the sock file just referenced, actually exists:I can now see host logs and the journal-gatewayd repair is gone. Of course, the TCP errors are still there while viewing host logs via HA.
(The above assumes the pkgs were already updated as the HA docs instruct)
Thanks everyone.
after installation => os-agent_1.4.1_linux_x86_64.deb => systemd-journal-remote => homeassistant-supervised-1.3.1.deb, no errors in HA,
in file: /usr/lib/systemd/system/systemd-journal-gatewayd.socket
systemd-journal-gatewayd starts automatically after reboot. systemctl status systemd-journal-gatewayd.socket
after reboot i see the Host logs, before the phrase “Started Journal Gateway Service” Following are some errors:
It confuses me that I don’t have /etc/systemd/system/systemd-journal-gatewayd.socket file as written above there is only /usr/lib/systemd/system/systemd-journal-gatewayd.socket i did:
but it did not help, the result is the same:
I have a Supervised installation on Debian and a reinstallation of the supervisor, removed the “unsupported” notification in home assistant. (and i did confirm that it is the right version) but the host log and the status of the systemd-journal-gatewayd.service is filled with:
just like what @dandek01 is seeing. so something is still not right
I am on debian bullseye.
I have installed journal-remote via
sudo apt install systemd-journal-remote
and install the new version ofhomeassistant-supervised.deb
package and rebootedAt the end of that
/run/systemd-journal-gatewayd.sock
is a directory (instaed of a unix socket)And Obviously fix is then
sudo rm -rf /run/systemd-journal-gatewayd.sock
sudo touch /run/systemd-journal-gatewayd.sock
sudo reboot
Tried, did not help… 😦
There hasn’t been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
It works but not for long After starting the Journal Gateway Service, there are errors:
I have tried systemd-journal-remote versions 247.3-7+deb11u1 and 251.3-1~bpo11+1 from bullseye-backports. The result is the same
It sounds like people were installing an older pkg of supervisor when rerunning the script. When they would wget, it would create a homeassistant-supervised.deb.1, then homeassistant-supervised.deb.2 and so on, but when they tried to install, it would install the original/older version.
It is documented in the readme and required as a dependency in the debian control file you must have version 1.3.0 or later of the HA supervised debian package installed on your system if for whatever reason it is not functioning try re-running the installer and rebooting your host
There are currently two issues tracking the “log spam” on its own: https://github.com/home-assistant/core/issues/87148 https://github.com/home-assistant/supervised-installer/issues/255
I find the relatively low volume of complaints somewhat surprising given the performance impact this must have on some SoC devices. Perhaps the issue isn’t as wide-spread and is a manifestation of some sort of an edge-case?
I managed to fix original problem with this -
/run/systemd-journal-gatewayd.sock
was a directory and the service was listening on network port. However, the correct way of fixing this is probably service override, not editing the original unit file, it should go like this:The issue with excessive logs exist when I open Settings -> System -> Logs -> Host
For RaspberryPi OS:
The file
/usr/lib/systemd/system/systemd-journal-gatewayd.socket
installed byhomeassistant-supervised.deb
is placed in the wrong directory. On my system it’s located in/lib/systemd/system/systemd-journal-gatewayd.socket
. So I commented out the line with the port and added the sock-file as soWith this, at least I got rid of the systemd-journal-issues and can see system logs within HA.
What do you see when running:
wget https://github.com/home-assistant/supervised-installer/releases/latest/download/homeassistant-supervised.deb
Hi @DChe47 Yes. After upgrading Debian to 12, this problem disappears.
I use HA Supervised on Debian 11. I had more spam messages in log of Host and i try to this: sudo rm -rf /run/systemd-journal-gatewayd.sock sudo touch /run/systemd-journal-gatewayd.sock After full reboot log of Host does no present and I have problem:
`● systemd-journal-gatewayd.service - Journal Gateway Service Loaded: loaded (/lib/systemd/system/systemd-journal-gatewayd.service; indirect; vendor preset: disabled) Active: failed (Result: exit-code) since Sun 2024-01-28 22:32:16 MSK; 40min ago TriggeredBy: ● systemd-journal-gatewayd.socket Docs: man:systemd-journal-gatewayd(8) Process: 7943 ExecStart=/lib/systemd/systemd-journal-gatewayd (code=exited, status=1/FAILURE) Main PID: 7943 (code=exited, status=1/FAILURE)
янв 28 22:32:16 ha-master systemd[1]: Started Journal Gateway Service. янв 28 22:32:16 ha-master systemd-journal-gatewayd[7943]: Can’t listen on more than one socket. янв 28 22:32:16 ha-master systemd[1]: systemd-journal-gatewayd.service: Main process exited, code=exited, status=1/FAI> янв 28 22:32:16 ha-master systemd[1]: systemd-journal-gatewayd.service: Failed with result ‘exit-code’. ` Can I fix it? Help me please
Yes you are right! I updated my system to Debian12, this error disappeared)
This is a different problem not strictly related to original bug description
I don’t think that you are right with this
For me LIB is a shortcut for /usr/lib>So that’s why the both path shows the same file, and both .socket is the same.
In my case even after activating
systemd-journal-remote.socket
it kept recreating a directory after reboot.Turns out there are two systemd socket configuration files.
One is
/lib/systemd/system/systemd-journal-gatewayd.socket
, but the correct one is/usr/lib/systemd/system/systemd-journal-gatewayd.socket
, belonging to two different packages. Activatingsystemd-journal-gatewayd.socket
will then activate the wrong one. The/lib
directory seems to have precedence over the/usr/lib
directory. Amazingly, there is zero information available anywhere about this precedence.I then tried symlinking
/etc/systemd/system/systemd-journal-gatewayd.socket
to/usr/lib/systemd/system/systemd-journal-gatewayd.socket
, (of course followed bysystemctl daemon-reload
) but this also did not work (probably some security reason). So now I have hard linked it, which seems to do the job.I then rebooted, and finally it works.
Awesome! Glad it helped someone else at least!
I see
homeassistant-supervised.deb
and if I run wget again I seehomeassistant-supervised.deb.1
But in my case it was impossible to make that mistake because I downloaded it to tmp dir that is deleted on every reboot. And when I installed file I saw version I was installing.@moto3001 your conclusion is not correct, at least not in my case. I installed debian-supervised twice just in case. In both cases I installed v1.3.1. For some reason after reboot service systemd-journal-gatewayd and systemd-journal-gatewad.socket didn’t started after reboot. I enabled both services. I have to run them manually and then they run. I don’t know what the problem is but there is a problem. I’m running debian 11.
Yes, it is, but it does not resolve the issue.