Failed to get properties: No such interface '' in Ubuntu 16.04.3 LTS

7,601

The error is in start-tdk-api.sh. I'm guessing either an environment variable is not set (like PATH) or you're not executing in the directory you think you're in.

You can set environment variables in the service file or update the PATH variable in the script (probably the easiest).

You can also set the working directory for the script in the service file:

[Service]
WorkingDirectory=/directory/to/run/from
Share:
7,601

Related videos on Youtube

Nunyet de Can Calçada
Author by

Nunyet de Can Calçada

no puedor, pecador de la pradera ! Ese peasso de Nullpointer que sale de la pantalla y me dise: Quietoooooor, que esto peta mas que una escopeta de feria, por la Gloria de mi Madre !!!! no puedo, no puedo, no puedo Ese peasso de Scrum ceremonias !!!! y que has hechor ? y que haras ??? y que hacees ?? y yo que sé, for my Mother's glory !!!!!!!! 7 Nullpointers que vienen de Bonaaansaaaa

Updated on September 18, 2022

Comments

  • Nunyet de Can Calçada
    Nunyet de Can Calçada almost 2 years

    I Created this Unit file tdk-api.service in the /etc/systemd/system folder with this permissions: -rwxr-xr-x

    with this content:

    [Unit]
    Description = tdk API daemon
    
    [Service]
    Type = simple
    ExecStart =  /usr/local/bin/start-tdk-api.sh
    ExecStop =   /usr/local/bin/stop-tdk-api.sh
    ExecReload = /usr/local/bin/reload-tdk-api.sh
    
    [Install]
    WantedBy = multi-user.target
    

    But I have an error when starting:

    root@localhost:/etc/systemd/system# sudo systemctl start tdk-api
    Failed to start tdk-api.service: Unknown unit: tdk-api.service
    See system logs and 'systemctl status tdk-api.service' for details.
    root@localhost:/etc/systemd/system# systemctl status tdk-api.service
    Failed to get properties: No such interface ''
    root@localhost:/etc/systemd/system# 
    

    I also tried to reload systemd daemon, as suggested

    systemctl daemon-reload
    

    I also tried:

    root@localhost:/etc/systemd/system# systemctl enable tdk-api.service
    Configuration file /etc/systemd/system/tdk-api.service is marked executable. Please remove executable permission bits. Proceeding anyway.
    Created symlink /etc/systemd/system/multi-user.target.wants/tdk-api.service, pointing to /etc/systemd/system/tdk-api.service.
    root@localhost:/etc/systemd/system# sudo systemctl start tdk-api
    Failed to start tdk-api.service: Unknown unit: tdk-api.service
    See system logs and 'systemctl status tdk-api.service' for details.
    root@localhost:/etc/systemd/system# systemctl status tdk-api.service
    Failed to get properties: No such interface ''
    
    • AtomiX84
      AtomiX84 over 5 years
      the systemctl file works, the error is in to the sh scripts. I try out the same systemctl file with some script just perform an echo and it works.
    • Panoptik
      Panoptik over 4 years
      Faced with the same problem on Ubuntu 16.04.6 LTS. After doing numerous attempts with restarting systemd, the problem was fixed just after restart the system at all sudo reboot After complete reboot broken service started work as expected. P.S. Uptime of system was more than 1 year and during that period were done upgrade of packages and probably systemd. That's could be a reason