The consul-template service fails to start because of the attempt to redirect stdout to a log file. Systemd does not execute the ExecStart command as a shell, so these are passed as additional arguments to the consul-template command, which causes it to fail. See the output below:
# journalctl -u consul-template
-- Logs begin at Sat 2016-01-09 17:34:28 UTC, end at Sat 2016-01-09 18:39:27 UTC. --
Jan 09 18:32:29 mesos-slave-02 systemd[1]: Started consul-template.
Jan 09 18:32:29 mesos-slave-02 systemd[1]: Starting consul-template...
Jan 09 18:32:29 mesos-slave-02 consul-template[24970]: Consul Template returned errors:
Jan 09 18:32:29 mesos-slave-02 consul-template[24970]: cli: extra argument(s): [">>" "/var/log/consul-te
Jan 09 18:32:29 mesos-slave-02 systemd[1]: consul-template.service: main process exited, code=exited, st
Jan 09 18:32:29 mesos-slave-02 systemd[1]: Unit consul-template.service entered failed state.
Jan 09 18:32:29 mesos-slave-02 systemd[1]: consul-template.service failed.
I would suggest relying on journalctl for logging and ditching the log file when systemd is being used. I'd be happy to submit a PR for this, just thought I'd open an issue first to get your blessing.
The
consul-template
service fails to start because of the attempt to redirect stdout to a log file. Systemd does not execute the ExecStart command as a shell, so these are passed as additional arguments to theconsul-template
command, which causes it to fail. See the output below:I would suggest relying on
journalctl
for logging and ditching the log file when systemd is being used. I'd be happy to submit a PR for this, just thought I'd open an issue first to get your blessing.