服务作业失败,因为控制进程因错误退出

服务作业失败,因为控制进程因错误退出

我正在尝试手动运行一项服务,但每次我都会收到以下消息:

user1@machine:~/Tools/systemd_tools$ sudo systemctl status tool_fd.service
● tool_fd.service - automatic tool service
   Loaded: loaded (/run/systemd/system/tool_fd.service; static; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2022-06-20 14:30:00 CEST; 8min ago
  Process: 17796 ExecStart=/usr/bin/python2.7 /home/user/Bureau/test_tool/Tool.py (code=exited, status=1/FAILURE)
 Main PID: 17796 (code=exited, status=1/FAILURE)
   Status: "Request for data 72h"

juin 20 14:30:00 machine python2.7[17796]:     '_open', req)
juin 20 14:30:00 machine python2.7[17796]:   File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
juin 20 14:30:00 machine python2.7[17796]:     result = func(*args)
juin 20 14:30:00 machine python2.7[17796]:   File "/usr/lib/python2.7/urllib2.py", line 1235, in http_open
juin 20 14:30:00 machine python2.7[17796]:     return self.do_open(httplib.HTTPConnection, req)
juin 20 14:30:00 machine python2.7[17796]:   File "/usr/lib/python2.7/urllib2.py", line 1205, in do_open
juin 20 14:30:00 machine python2.7[17796]:     raise URLError(err)
juin 20 14:30:00 machine python2.7[17796]: urllib2.URLError: <urlopen error [Errno -2] Name or service not known>
juin 20 14:30:00 machine systemd[1]: tool_fd.service: Main process exited, code=exited, status=1/FAILURE
juin 20 14:30:00 machine systemd[1]: tool_fd.service: Failed with result 'exit-code'.

user1@machine:~/Tools/systemd_tools$ sudo systemctl start tool_fd.servic                                                                                                                                                            e
Job for tool_fd.service failed because the control process exited with error                                                                                                                                                           code.


user1@machine:~/Tools/systemd_tools$ systemctl --failed
  UNIT                LOAD   ACTIVE SUB    DESCRIPTION
● tool_fd.service loaded failed failed automatic tool service

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.

相关内容