Kodi Community Forum

Full Version: Starting from systemd service causes connection problems [not a bug]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
After updating to systemd v234.11, booting a machine that runs both kodi and mysqld results in kodi not connecting to the mysqld database but instead displaying a blank library. Corresponding entries in the kodi.log suggest that it is unable to connect to the network:
Code:
...
ERROR: Unable to open database: MyVideos92 [2003](Can't connect to MySQL server on '10.1.10.2' (101 "Network is unreachable"))
...

Kodi is started using the following systemd service which it has for years without issue on this hardware:
Code:
# cat /usr/lib/systemd/system/kodi.service
[Unit]
Description=Kodi standalone
After=systemd-user-sessions.service network-online.target sound.target mysqld.service
Requires=network-online.target
[email protected]
[Service]
User=kodi
Group=kodi
PAMName=login
TTYPath=/dev/tty1
ExecStart=/usr/bin/xinit /usr/bin/kodi-standalone -- :0 -nolisten tcp vt1
Restart=on-abort
StandardInput=tty
[Install]
WantedBy=graphical.target

If I add a "ExecStartPre=/usr/bin/sleep 2s" to the above service, kodi works as expected, connecting without issue. Can something be done with kodi itself to be more tolerant of whatever is causing the delay? Any suggestions are welcomed as the ExecStartPre line seems hacky.

Link to complete debug log.
Quote:After updating to systemd v234.11

So I guess that's the problem, or not? If everything works as expected before the update but does't work after, then I would blame the update.
You are correct, DaVu. Downgrading to 233.75 corrects the behavior. I opened a ticket upstream: https://github.com/systemd/systemd/issues/6500
No action upstream (although the ticket is still open).  I am still seeking input from the community for a fix.  Thanks!
Interesting. As you already bisected the commit.