I was trying to use/test the latest CentOS Atomic images [1] [2] and got in to this issue i.e. "systemctl start etcd " is failing.
=============================== -bash-4.2# systemctl start etcd -bash-4.2# systemctl status etcd etcd.service - Etcd Server Loaded: loaded (/usr/lib/systemd/system/etcd.service; disabled) Active: failed (Result: exit-code) since Fri 2015-04-10 05:26:54 UTC; 6s ago Process: 1724 ExecStart=/usr/bin/etcd (code=exited, status=200/CHDIR) Main PID: 1724 (code=exited, status=200/CHDIR)
Apr 10 05:26:54 myhost.localdomain systemd[1]: Started Etcd Server. Apr 10 05:26:54 myhost.localdomain systemd[1724]: Failed at step CHDIR spawning /usr/bin/etcd: No such file or directory Apr 10 05:26:54 myhost.localdomain systemd[1]: etcd.service: main process exited, code=exited, status=200/CHDIR Apr 10 05:26:54 myhost.localdomain systemd[1]: Unit etcd.service entered failed state. ================================
I suspect there is something wrong with systemd unit file of etcd. The service file looks like below as of now. I think "WorkingDirectory=/var/lib/etcd/`$hostname`.etcd" should have only 'hostname' not '$hostname'.
-bash-4.2# cat /usr/lib/systemd/system/etcd.service [Unit] Description=Etcd Server After=network.target
[Service] Type=simple # etc logs to the journal directly, suppress double logging StandardOutput=null WorkingDirectory=/var/lib/etcd/`$hostname`.etcd User=etcd ExecStart=/usr/bin/etcd
[Install] WantedBy=multi-user.target
[1] CentOS-7-x86_64-AtomicHost-20150228_01.qcow2 [2] http://wiki.centos.org/SpecialInterestGroup/Atomic/Download
Thanks, Lala #lalatenduM on Freenode