Score:0

Ubuntu 18.04: Unable to start a service in systemd

kp flag

I'm using Ubuntu 18.04 and trying to install a package named dv-runtime-dev. And to launch remote control, I need to start a service using the command

sudo systemctl start dv-runtime.service

And I got the result as follows

Failed to start dv-runtime.service: Unit dv-runtime.service is not loaded properly: Is a directory.
See system logs and 'systemctl status dv-runtime.service' for details.

Then I run the status command and get the following hint

● dv-runtime.service
   Loaded: error (Reason: Is a directory)
   Active: inactive (dead)

Note that this .service file exists when the package installed. But this file is located in a folder named dv-runtime.service. In other words, to access this file, the path would be

/lib/systemd/system/dv-runtime.service/dv-runtime.service

So I think it might be the same name of the folder and the file that makes the system confused. I then tried to move this .service file out of the folder or even changed its path, but nothing worked.

I also tried to delete that folder and move the .service file in the .../system/ path. Now by using the command

systemctl list-uint-files --type=service

I can see dv-runtime.service in that list (which previously cannot), but the state is disabled. This time I ran the start service command again, and got

Job for dv-runtime.service failed because the control process exited with error code.
See "systemctl status dv-runtime.service" and "journalctl -xe" for details.

Here I checked the status and the journal using the commands as suggested, and the error information appeared to be

● dv-runtime.service - DV-Runtime service deamon
   Loaded: loaded (/lib/systemd/system/dv-runtime.service; disabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Fri 2022-10-28 00:18:31 CST; 892ms ago
  Process: 10072 ExecStartPre=/bin/touch /etc/dv-runtime.xml (code=exited, status=217/USER)

and

10/28 00:19:03 zeo-HP-Pavilion-Aero-Laptop-13-be0xxx systemd[10105]: dv-runtime.service: Failed to determine user credentials: No such process
10/28 00:19:03 zeo-HP-Pavilion-Aero-Laptop-13-be0xxx systemd[10105]: dv-runtime.service: Failed at step USER spawning /bin/touch: No such process

It appears that the error has something to do with the user, but I don't know how to locate this user problem. Now I have no idea how to start this service now and I hope somebody could help me. Appreciated with much thanks!

David avatar
cn flag
Have you tried using an absolute path ? sudo systemctl start /dv-runtime.service/dv-runtime.service
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.