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


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Systemd errors of missing file “No such file or directory” inspite of file being present
# 1  
Old 12-14-2016
Systemd errors 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 users
After=network.target local-fs.target

[Service]
Type=forking
RemainAfterExit=no
PIDFile=/data/i4/srvt.pid
LimitCORE=infinity
EnvironmentFile=%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?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash to check directory and create missing folder from file

In the below bash I am trying to ensure that all folders (represented by $folders) in a given directory are created. In the file f1 the trimmed folder will be there somewhere (will be multiple trimmed folders). When that trimmed folder is found (represented by $S5) the the contents of $2 printed... (19 Replies)
Discussion started by: cmccabe
19 Replies

2. Shell Programming and Scripting

Total record count of all the file present in a directory

Hi All , We need one help on the below requirement.We have multiple pipe delimited .txt file(around 100 .txt files) present on one directory.We need the total record count of all the files present in that directory without header.File format as below : ... (8 Replies)
Discussion started by: STCET22
8 Replies

3. Shell Programming and Scripting

Alert for missing file in directory

Deleting code (6 Replies)
Discussion started by: Adfire
6 Replies

4. Shell Programming and Scripting

Speed : awk command to count the occurrences of fields from one file present in the other file

Hi, file1.txt AAA BBB CCC DDD file2.txt abc|AAA|AAAabcbcs|fnwufnq bca|nwruqf|AAA|fwfwwefwef fmimwe|BBB|fnqwufw|wufbqw wcdbi|CCC|wefnwin|wfwwf DDD|wabvfav|wqef|fwbwqfwfe i need the count of rows of file1.txt present in the file2.txt required output: AAA 2 (10 Replies)
Discussion started by: mdkm
10 Replies

5. Shell Programming and Scripting

List file NOT present in other directory

Dear community, I have one LOG directory with some files. What I need to do is list ONLY the files that are not present in other directory. Using Bash programming! LOG DIR | SYNC DIR FILE1 | FILE1 FILE2 | FILE3 FILE3 | OTHER FILENAME FILE4 ... (9 Replies)
Discussion started by: Lord Spectre
9 Replies

6. Shell Programming and Scripting

Delete a pattern present in file 2 from file 1 if found in file 1.

I have two files File1 ==== 1|2000-00-00|2010-02-02|| 2| 00:00:00|2012-02-24|| 3|2000-00-00|2011-02-02|| File2 ==== 2000-00-00 00:00:00 I want the delete the patterns which are found in file 2 from file 1, Expected output: File1 ==== (5 Replies)
Discussion started by: machomaddy
5 Replies

7. UNIX for Advanced & Expert Users

Solved: Missing whatis file from my /usr/shar/lib directory...

My whatis file is missing from my /usr/share/lib directory. I know I can recreate it by using catman -w command. My question is, why do all of my other servers have it and this one doesn't. Maybe due to a recent move of old to new servers and it just wasn't copied over. Unlikely, 'cause all... (0 Replies)
Discussion started by: zixzix01
0 Replies

8. UNIX for Dummies Questions & Answers

Extracting lines present in one file but missing in another using Perl

Hey I have an input file containing a list of numbers like: U01120.CDS.1 D25328.CDS.1 X15573.CDS.1 K03515.CDS.1 L44140.CDS.10 U24183.CDS.1 M97347.CDS.1 U05259.CDS.1 And another input file containing results created on the basis of the above input: G6PT_HUMAN U01120.CDS.1 -1.9450 3.1706... (1 Reply)
Discussion started by: Banni
1 Replies

9. Shell Programming and Scripting

Script to send an alert if a file is present in a directory for 10 min

hi, A script which look into a directory and send an alert via a mail. If there is any file exisiting in a directory for more then 10 min. (5 Replies)
Discussion started by: madfox
5 Replies

10. Shell Programming and Scripting

ls > file - Creating file containing the list of all files present in a directory

Hi All, I need to create a file which contains the list of all the files present in that directory. e.g., ls /export/home/user/*.dat > list_file.dat but what i am getting is: $ ls /export/home/user/*.dat > list_file.dat /export/home/user/*.dat: No such file or directory But I have... (1 Reply)
Discussion started by: pranavagarwal
1 Replies
Login or Register to Ask a Question