1

I have a C code which I kept in systemd service for boot time start. After restart it started successfully, but after a while it got killed and again started successfully as the type set is forking. The error log

● mqtt_to_REST.service - TCUP MQTT to RESTful connector
   Loaded: loaded (/lib/systemd/system/mqtt_to_REST.service; enabled)
   Active: activating (auto-restart) (Result: timeout) since Wed 2015-04-08 12:19:18 UTC; 648ms ago
  Process: 289 ExecStart=/usr/bin/sim (code=killed, signal=TERM)

Apr 08 12:19:18 edison systemd[1]: Failed to start TCUP MQTT to RESTful connector.
Apr 08 12:19:18 edison systemd[1]: Unit mqtt_to_REST.service entered failed state.

The startup script :

[Unit]
Description=TCUP MQTT to RESTful connector
#Documentation=NA
#DefaultDependencies=no
#Before=xdk-daemon.service
#After=mqtt.service

[Service]
Type=forking
ExecStart=/usr/bin/sim
#ExecStart=/home/root/jsmn/example/sim /dev/null 2>&1
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
RestartSec=10
#WatchdogSec=1min

[Install]
WantedBy=multi-user.target

So where is the problem actually happening?

0 Answers0