RoonServer not working from systemd, can connect if start manually

Roon Core Machine

Pop!_OS 20.04 LTS
Intel i5-8259U (8) @ 3.800GHz
31975MiB

Networking Gear & Setup Details

wired 1 gig ethernet through Ubiquity switch

Connected Audio Devices

Raspberry Pi via Ethernet

Number of Tracks in Library

~10,000

Description of Issue

So I updated my core to 1.8 (936). When I did I lost my connection to the core. Many restarts and frustrations later, I have learned that since that update the systemd daemon is somehow not working. If I stop the service

sudo systemctl stop roonserver.service

and then start the server manually

sudo /opt/RoonServer/start.sh

Everything works fine. Not sure what changed with this update, but would certainly appreciate any help in how to troubleshoot the problem.

My Manjaro Linux is based on Arch and not Ubuntu/Debian, but the systemctl commands are probably similar.

systemctl enable (use permanently)
systemctl start (start manually)
systemctl stop (stop manually)
systemctl restart (manually restart)

Yep, that’s it…

sudo systemctl enable roonserver.service
sudo systemctl status roonserver.service

Etc.

@Bob_Smith1, execute the first and second lines, and post. You shouldn’t need to run the start script, even after an upgrade.

Perhaps I wasn’t clear. This is not the first time I have tried to get the core running. It has successfully been running on boot of the machine for months until this update. But if I manually start it with start.sh it will not load unless I stop the service first. I was trying to show the steps I have to take to make the core accessible. systemctl enable has been done a long time ago.

Why aren’t you using systemd to restart?

Because it doesn’t work. I have restarted the whole computer many times. I have

sudo systemctl restart roonserver.service

Several times. It doesn’t work unless I start it manually, and I am trying to figure out why. Here is the systemctl status output after attempting to restart it

● roonserver.service - RoonServer
Loaded: loaded (/etc/systemd/system/roonserver.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2022-05-02 07:26:47 MDT; 25s ago
Main PID: 63723 (start.sh)
Tasks: 54 (limit: 38209)
Memory: 1.8G
CGroup: /system.slice/roonserver.service
├─63723 /bin/bash /opt/RoonServer/start.sh
├─63727 /opt/RoonServer/RoonDotnet/RoonServer RoonServer.dll
├─63832 /opt/RoonServer/RoonDotnet/RoonAppliance RoonAppliance.dll -watchdogport=36185
└─63833 /opt/RoonServer/Server/processreaper 63832
May 02 07:26:47 linhtpc start.sh[63727]: Started
May 02 07:26:52 linhtpc start.sh[63727]: Not responding
May 02 07:27:08 linhtpc start.sh[63727]: 00:00:20.850 Debug: PathForResource, filename: …/.update
May 02 07:27:08 linhtpc start.sh[63727]: 00:00:20.850 Debug: PathForResource, candidate: /opt/RoonServer/Server/…/.update
May 02 07:27:08 linhtpc start.sh[63727]: Error
May 02 07:27:10 linhtpc start.sh[63727]: 00:00:22.851 Debug: PathForResource, filename: …/Appliance/RoonAppliance
May 02 07:27:10 linhtpc start.sh[63727]: 00:00:22.851 Debug: PathForResource, candidate: /opt/RoonServer/Server/…/Appliance/RoonAppliance
May 02 07:27:10 linhtpc start.sh[63727]: Initializing
May 02 07:27:10 linhtpc start.sh[63727]: Started
May 02 07:27:12 linhtpc start.sh[63727]: Not responding

If you run the script directly, systemd commands won’t work. Immediately following a reboot, what is the output of systemctl status roonserver.service?

I have been dealing with this same problem myself lately and its getting highly annoying, I would love a solution. if I run it using ./start.sh from the directory it runs, but get many sudo errors about missing symlinks and files etc, but using the systemctl command doesn’t work, even went as far as uninstalling Roon itself and reinstalling it and same issue. Is there something permission wise wrong on newer builds?

“It doesn’t work” sadly does not contain much information to go on forward with troubleshooting.

Is it possible to share those errors?

Did any one of you two look into the Roon logs for possibly more descriptive errors? What about the OS system logs?

Sounds ubuntu based; may run into permission issues with snap apps?
If the OS uses SELinux or similar control mechanisms, re-permitting Roon process/binaries may be needed after updates?

2 Likes

I will have to get back to you on those logs, I just was sitting here on phone at work thinking how frustrating it was that it wasn’t working lately and happened to be on forum and see someone with the exact same issue. It was running smoothly till about the last time I recall seeing prompt for an update, I did think it might be SELinux at one point, set that to permissive and still nothing.

The same. I am aware that both can’t be going at the same time. Below is the output of systemctl status roonserver.service after a reboot

● roonserver.service - RoonServer
Loaded: loaded (/etc/systemd/system/roonserver.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2022-05-02 20:18:28 MDT; 1min 44s ago
Main PID: 2333 (start.sh)
Tasks: 52 (limit: 38208)
Memory: 10.3G
CGroup: /system.slice/roonserver.service
├─2333 /bin/bash /opt/RoonServer/start.sh
├─2369 /opt/RoonServer/RoonDotnet/RoonServer RoonServer.dll
├─3494 /opt/RoonServer/RoonDotnet/RoonAppliance RoonAppliance.dll -watchdogport=41039
└─3495 /opt/RoonServer/Server/processreaper 3494
May 02 20:19:39 linhtpc start.sh[2369]: Started
May 02 20:19:41 linhtpc start.sh[2369]: Not responding
May 02 20:19:57 linhtpc start.sh[2369]: 00:00:40.539 Debug: PathForResource, filename: …/.update
May 02 20:19:57 linhtpc start.sh[2369]: 00:00:40.539 Debug: PathForResource, candidate: /opt/RoonServer/Server/…/.update
May 02 20:19:57 linhtpc start.sh[2369]: Error
May 02 20:19:59 linhtpc start.sh[2369]: Initializing
May 02 20:19:59 linhtpc start.sh[2369]: 00:00:42.539 Debug: PathForResource, filename: …/Appliance/RoonAppliance
May 02 20:19:59 linhtpc start.sh[2369]: 00:00:42.539 Debug: PathForResource, candidate: /opt/RoonServer/Server/…/Appliance/RoonAppliance
May 02 20:19:59 linhtpc start.sh[2369]: Started
May 02 20:20:01 linhtpc start.sh[2369]: Not responding

I have half a mind just disable the service and to make a root crontab entry to start it at boot, but I’d prefer to solve the problem.

OK, I think I have made it work, but not entirely sure why. My threat above to make a root crontab entry failed. I noticed that when things were working manually, I was running /opt/RoonServer/start.sh as a user. If I tried

sudo /opt/RoonServer/start.sh

I would get numerous messages about

00:00:04.539 Warn: get lock file path: /tmp/.rnsgem0-
00:00:04.639 Warn: get lock file path: /tmp/.rnsgem0-
00:00:04.740 Warn: get lock file path: /tmp/.rnsgem0-
00:00:04.840 Warn: get lock file path: /tmp/.rnsgem0-
00:00:04.941 Error: Failed to acquire exclusive lock
/opt/RoonServer/start.sh: line 34: kill: (15620) - No such process

So this same thing would be happening when I’d try and start the service I’m sure. But for whatever reason, doesn’t happen as a user. If I go into /tmp and manually delete all .rns* entries (I had 4 of them) and then restart the service via systmctl… it works again. We’ll see if this holds true after reboots and more time.

EDIT
Spoke too soon. Worked for awhile, then locked up and back to the same problem. The crontab idea works now, so I’m just going with that until someone can identify the problem and a better solution.

Hey @Bob_Smith1,

We’re sorry to hear that you were having issues launching Roon. In checking your system diagnostics it seems that you’re up and running again. Can you please send us an update to confirm that? Thanks!