V
V
Vadim kyklaed2017-05-03 17:02:02
linux
Vadim kyklaed, 2017-05-03 17:02:02

Why is the service I created (systemd) not working?

Good day!
help to understand why the unit is not launched?

[Unit]
Description=vkbot
After=network.target
Requires=mysql.service

[Service]
Type=simple
Restart=always
WorkingDirectory=/home/vadim/vkbot
ExecStart=/usr/bin/python3.5 /home/vadim/vkbot/variator.py

[Install]
WantedBy=multi-user.target

the report is:
● vkbot.service - vkbot
Loaded: loaded (/etc/systemd/system/vkbot.service; disabled; vendor preset: enabled)
Active: inactive (dead)
May 03 16:53:29 kyklaed-Virtual systemd[1 ]: Stopped vkbot.
May 03 16:53:29 kyklaed-Virtual systemd[1]: Started vkbot.
May 03 16:53:29 kyklaed-Virtual systemd[1685]: vkbot.service: Failed at step CHDIR spawning /usr/bin/python3.5: No such file or directory
May 03 16:53:29 kyklaed-Virtual systemd[ 1]: vkbot.service: Main process exited, code=exited, status=200/CHDIR
May 03 16:53:29 kyklaed-Virtual systemd[1]: vkbot.service: Unit entered failed state.
May 03 16:53:29 kyklaed-Virtual systemd[1]: vkbot.service: Failed with result 'exit-code'.
May 03 16:53:29 kyklaed-Virtual systemd[1]: vkbot.service: Service hold-off time over, scheduling restart.
May 03 16:53:29 kyklaed-Virtual systemd[1]: Stopped vkbot.
May 03 16:53:29 kyklaed-Virtual systemd[1]: vkbot.service: Start request repeated too quickly.
May 03 16:53:29 kyklaed-Virtual systemd[1]: Failed to start vkbot.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Erelecano Oioraen, 2017-05-03
@kyklaed

Failed at step CHDIR spawning /usr/bin/python3.5: No such file or directory
tells you nothing?
Well, you don't have to. It is not necessary to run the files lying at the user through system units. Pottering gave you systemd --user

A
Alexander Lubyagin, 2020-03-27
@lubyagin

Probably the line

ExecStart=/usr/bin/python3.5 /home/vadim/vkbot/variator.py

cannot be performed. The "Failed at step CHDIR spawning ..." error in your case may be thrown when a service running under the given UID:GID does not have access to the /home/vadim/vkbot/variator.py file. Or, this file is renamed (missing).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question