Gentoo Archives: gentoo-user

From: Adam Carter <adamcarter3@×××××.com>
To: "gentoo-user@l.g.o" <gentoo-user@l.g.o>
Subject: [gentoo-user] systemd service file for http-replicator
Date: Tue, 24 Dec 2013 08:30:33
Message-Id: CAC=wYCGbzBbAcXNUZVMGgm=ML8bja9=x6w0pbtfZk-_-F=rFyw@mail.gmail.com
1 http-replicator is a python script. My service file is as below, and if i
2 run the command that it generates on the command line it works.
3
4 [Unit]
5 Description=HTTP Replicator
6 After=network.target
7
8 [Service]
9 EnvironmentFile=/etc/conf.d/http-replicator
10 #Type=forking
11 Type=simple
12 PIDFile=/var/run/http-replicator.pid
13 ExecStart=/usr/bin/http-replicator $DAEMON_OPTS
14 KillSignal=SIGINT
15 #User=
16
17 [Install]
18 WantedBy=multi-user.target
19
20 # systemctl status http-replicator
21 http-replicator.service - HTTP Replicator
22 Loaded: loaded (/usr/lib64/systemd/system/http-replicator.service;
23 disabled)
24 Active: inactive (dead)
25
26 Dec 23 16:55:46 proxy systemd[16295]: Executing: /usr/bin/http-replicator
27 --daemon --dir /home/http-replicator --user portage --alias
28 /usr/portage/packages:packages --log /... --port 8081
29 Dec 23 16:55:46 proxy systemd[1]: Child 16295 belongs to
30 http-replicator.service
31 Dec 23 16:55:46 proxy systemd[1]: http-replicator.service: main process
32 exited, code=exited, status=0/SUCCESS
33 Dec 23 16:55:46 proxy systemd[1]: http-replicator.service changed running
34 -> stop-sigterm
35 Dec 23 16:55:46 proxy systemd[1]: http-replicator.service: cgroup is empty
36 Dec 23 16:55:46 proxy systemd[1]: http-replicator.service changed
37 stop-sigterm -> dead
38 Dec 23 16:55:46 proxy systemd[1]: Collecting http-replicator.service
39 Dec 23 16:55:49 proxy systemd[1]: Collecting http-replicator.service
40 Dec 23 16:57:54 proxy systemd[1]: Collecting http-replicator.service
41 Dec 23 16:59:52 proxy systemd[1]: Collecting http-replicator.service
42 Dec 24 18:53:27 proxy systemd[1]: Collecting http-replicator.service
43
44 With Type=forking, systemctl start http-replicator is slow and;
45 # systemctl status http-replicator
46 http-replicator.service - HTTP Replicator
47 Loaded: loaded (/usr/lib64/systemd/system/http-replicator.service;
48 disabled)
49 Active: failed (Result: timeout) since Tue 2013-12-24 19:27:28 EST; 10s
50 ago
51 Process: 20430 ExecStart=/usr/bin/http-replicator $DAEMON_OPTS
52 (code=exited, status=0/SUCCESS)
53
54 Dec 24 19:25:58 proxy systemd[1]: Setting watch for
55 http-replicator.service's PID file /var/run/http-replicator.pid
56 Dec 24 19:25:58 proxy systemd[1]: Trying to read http-replicator.service's
57 PID file /var/run/http-replicator.pid in case it changed
58 Dec 24 19:27:28 proxy systemd[1]: http-replicator.service operation timed
59 out. Terminating.
60 Dec 24 19:27:28 proxy systemd[1]: Stopping watch for
61 http-replicator.service's PID file /var/run/http-replicator.pid
62 Dec 24 19:27:28 proxy systemd[1]: http-replicator.service changed start ->
63 final-sigterm
64 Dec 24 19:27:28 proxy systemd[1]: http-replicator.service: cgroup is empty
65 Dec 24 19:27:28 proxy systemd[1]: http-replicator.service changed
66 final-sigterm -> failed
67 Dec 24 19:27:28 proxy systemd[1]: Job http-replicator.service/start
68 finished, result=failed
69 Dec 24 19:27:28 proxy systemd[1]: Failed to start HTTP Replicator.
70 Dec 24 19:27:28 proxy systemd[1]: Unit http-replicator.service entered
71 failed state.
72
73 Any ideas on what's wrong?

Replies

Subject Author
Re: [gentoo-user] systemd service file for http-replicator Tom Wijsman <TomWij@g.o>