Results 1 to 3 of 3

Thread: Systemd complaints of missing file “No such file or directory” inspite of file being present

  1. #1

    Default Systemd complaints of missing file “No such file or directory” inspite of file being present

    The contents of my service file srvtemplate-data-i4-s1.conf is

    Code:
    [Unit]Description=test service for usersAfter=network.target local-fs.target[Service]Type=forkingRemainAfterExit=noPIDFile=/data/i4/srvt.pidLimitCORE=infinityEnvironmentFile=%I...[Install]WantedBy=multi-user.target
    


    I am starting my service as follows passing it an environment file but it fails with error as below.

    Code:
    # systemctl  start srvtemplate-data-i4-s1.conf@-data-i4-env.service
    Failed to start srvtemplate-data-i4-s1.conf@-data-i4-s1-env.service: Unit srvtemplate-data-i4-s1.conf@-data-i4-env.service failed to load: No such file or directory.
    The files are actually present
    Code:
    # ls -lrt /usr/lib/systemd/system/srvt*
    -rw-r--r-- 1 root root 815 Dec 13 07:31 /usr/lib/systemd/system/srvtemplate-data-i4-s1.conf@.service
    
    # ls /data/i4/env 
    /data/i4/env
    
    # cat /data/i4/env 
    SRV_CONF="/data/i4/s1.conf"
    
    But systemd not able to find the files.

    When I do systemd reload and then fire the ablove start command it works fine.

    Code:
    systemctl daemon-reload
    

    But still why is systemd not able to find the files and what can I do so that start command succeeds without firing the reload command?

    Last edited by prupesh; 14-Dec-2016 at 06:57. Reason: code tags

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,245

    Default Re: Systemd complaints of missing file “No such file or directory” inspite of file being present

    It seems you added the CODE tags afterwards. That is not really working. As you can see the layout (particularly of the first item above) is already broken then.

    Copy/paste directly from the terminal window in between the CODE tags. Do not forget to make your copy sweep big enough to let it contain also both prompts and the command. Now we have to assume you did a cat for the first item, but we can not be sure. And adding colouring is also not needed. Every sign that you altered things, makes all other info we see there suspicious.

    So, next time better
    Henk van Velden

  3. #3
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    19,979
    Blog Entries
    14

    Default Re: Systemd complaints of missing file “No such file or directory” inspite of file being present

    You may have to 'systemctl enable your_service_here' first.
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    https://en.opensuse.org/openSUSE:Board#Members
    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •