Trying to setup user systemd service: Loaded: not-found (Reason: No such file or directory)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
0
down vote
favorite
I'm trying to make a user systemd service that runs a python script - however, when I try starting the service with systemctl --user start shadesmath
, and then do systemctl status shadesmath
, I get:
â shadesmath.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
Here is the contents of my shadesmath.service
file, which has been placed in ~/.config/systemd/user/shadesmath.service
with permissions 744
:
[Unit]
Description=ShadesMath
AssertPathExists=/home/mikel/bots/mathbot/mathbot
[Service]
WorkingDirectory=/home/mikel/bots/mathbot/mathbot
ExecStart=/home/mikel/anaconda3/bin/python bot.py parameters.json
Restart=always
[Install]
WantedBy=default.target
I tried running systemctl --user enable shadesmath
, which created a symlink to the service in ~/.config/user/systemd/default.target.wants
, but this hasn't seemed to change anything when I try starting the service.
This is my first time trying to use systemd, so chances are I'm doing something stupid, but I can't figure out what the issue is. Any pointers on how to set this up would be much appreciated. My goal is to have a service that runs this python script, and to re-run it on startup/if the script finishes or crashes - ideally I want this to be a user service as I don't want this running as root.
16.04 services systemd
add a comment |Â
up vote
0
down vote
favorite
I'm trying to make a user systemd service that runs a python script - however, when I try starting the service with systemctl --user start shadesmath
, and then do systemctl status shadesmath
, I get:
â shadesmath.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
Here is the contents of my shadesmath.service
file, which has been placed in ~/.config/systemd/user/shadesmath.service
with permissions 744
:
[Unit]
Description=ShadesMath
AssertPathExists=/home/mikel/bots/mathbot/mathbot
[Service]
WorkingDirectory=/home/mikel/bots/mathbot/mathbot
ExecStart=/home/mikel/anaconda3/bin/python bot.py parameters.json
Restart=always
[Install]
WantedBy=default.target
I tried running systemctl --user enable shadesmath
, which created a symlink to the service in ~/.config/user/systemd/default.target.wants
, but this hasn't seemed to change anything when I try starting the service.
This is my first time trying to use systemd, so chances are I'm doing something stupid, but I can't figure out what the issue is. Any pointers on how to set this up would be much appreciated. My goal is to have a service that runs this python script, and to re-run it on startup/if the script finishes or crashes - ideally I want this to be a user service as I don't want this running as root.
16.04 services systemd
The issue seems to have fixed itself with some more fiddling (redoing the steps in the question) but unfortunately I don't know what actually ended up fixing it.
â mxbi
Apr 1 at 16:12
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm trying to make a user systemd service that runs a python script - however, when I try starting the service with systemctl --user start shadesmath
, and then do systemctl status shadesmath
, I get:
â shadesmath.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
Here is the contents of my shadesmath.service
file, which has been placed in ~/.config/systemd/user/shadesmath.service
with permissions 744
:
[Unit]
Description=ShadesMath
AssertPathExists=/home/mikel/bots/mathbot/mathbot
[Service]
WorkingDirectory=/home/mikel/bots/mathbot/mathbot
ExecStart=/home/mikel/anaconda3/bin/python bot.py parameters.json
Restart=always
[Install]
WantedBy=default.target
I tried running systemctl --user enable shadesmath
, which created a symlink to the service in ~/.config/user/systemd/default.target.wants
, but this hasn't seemed to change anything when I try starting the service.
This is my first time trying to use systemd, so chances are I'm doing something stupid, but I can't figure out what the issue is. Any pointers on how to set this up would be much appreciated. My goal is to have a service that runs this python script, and to re-run it on startup/if the script finishes or crashes - ideally I want this to be a user service as I don't want this running as root.
16.04 services systemd
I'm trying to make a user systemd service that runs a python script - however, when I try starting the service with systemctl --user start shadesmath
, and then do systemctl status shadesmath
, I get:
â shadesmath.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
Here is the contents of my shadesmath.service
file, which has been placed in ~/.config/systemd/user/shadesmath.service
with permissions 744
:
[Unit]
Description=ShadesMath
AssertPathExists=/home/mikel/bots/mathbot/mathbot
[Service]
WorkingDirectory=/home/mikel/bots/mathbot/mathbot
ExecStart=/home/mikel/anaconda3/bin/python bot.py parameters.json
Restart=always
[Install]
WantedBy=default.target
I tried running systemctl --user enable shadesmath
, which created a symlink to the service in ~/.config/user/systemd/default.target.wants
, but this hasn't seemed to change anything when I try starting the service.
This is my first time trying to use systemd, so chances are I'm doing something stupid, but I can't figure out what the issue is. Any pointers on how to set this up would be much appreciated. My goal is to have a service that runs this python script, and to re-run it on startup/if the script finishes or crashes - ideally I want this to be a user service as I don't want this running as root.
16.04 services systemd
16.04 services systemd
asked Apr 1 at 12:26
mxbi
1434
1434
The issue seems to have fixed itself with some more fiddling (redoing the steps in the question) but unfortunately I don't know what actually ended up fixing it.
â mxbi
Apr 1 at 16:12
add a comment |Â
The issue seems to have fixed itself with some more fiddling (redoing the steps in the question) but unfortunately I don't know what actually ended up fixing it.
â mxbi
Apr 1 at 16:12
The issue seems to have fixed itself with some more fiddling (redoing the steps in the question) but unfortunately I don't know what actually ended up fixing it.
â mxbi
Apr 1 at 16:12
The issue seems to have fixed itself with some more fiddling (redoing the steps in the question) but unfortunately I don't know what actually ended up fixing it.
â mxbi
Apr 1 at 16:12
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
I had the same problem; logging out and back in did not work but the answer was very simple: just reboot.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
I had the same problem; logging out and back in did not work but the answer was very simple: just reboot.
add a comment |Â
up vote
1
down vote
I had the same problem; logging out and back in did not work but the answer was very simple: just reboot.
add a comment |Â
up vote
1
down vote
up vote
1
down vote
I had the same problem; logging out and back in did not work but the answer was very simple: just reboot.
I had the same problem; logging out and back in did not work but the answer was very simple: just reboot.
edited May 26 at 17:50
![](https://i.stack.imgur.com/8CW8e.png?s=32&g=1)
![](https://i.stack.imgur.com/8CW8e.png?s=32&g=1)
Zanna
48k13119228
48k13119228
answered May 26 at 17:45
![](https://i.stack.imgur.com/UBuFb.png?s=32&g=1)
![](https://i.stack.imgur.com/UBuFb.png?s=32&g=1)
noraj
19116
19116
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1021043%2ftrying-to-setup-user-systemd-service-loaded-not-found-reason-no-such-file-or%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
The issue seems to have fixed itself with some more fiddling (redoing the steps in the question) but unfortunately I don't know what actually ended up fixing it.
â mxbi
Apr 1 at 16:12