<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Hi Michael,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">How did you get this /home/hello-phoenix/app/bin/hello_phoenix script anyway? If it is generated by exrm, I'd suggest to try "hello_phoenix foreground" in ExecStart directive — it'd prevent forking and detaching from console (it is unnecessary if being supervised by systemd).</div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-07-07 17:29 GMT+03:00 Michael Chavez <span dir="ltr"><<a href="mailto:bigbassroller@gmail.com" target="_blank">bigbassroller@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div>Hello,<br><br></div>I am a newbie trying to get systemd to load my phoenix/elixir app.<br><br></div>I have tried many variations of my hello-phoenix service file, the version that I feel is closest to being correct looks like this:<br>[Unit]<br>Description=hello-phoenix service<br><br>[Service]<br>WorkingDirectory=/home/hello-phoenix/app/bin<br>ExecStart=/home/hello-phoenix/app/bin/hello_phoenix start<br>Environment=MIX_ENV=prod PORT=8888<br>Restart=always<br>StandardOutput=syslog<br>StandardError=syslog<br>SyslogIdentifier=hello-phoenix<br>User=hello-phoenix<br><br>[Install]<br>WantedBy=multi-user.target<br><br></div>after reloading daemon, enabling and starting the hello-phoenix.service, systemctl status hello-phoenix.service outputs:<br><br>● hello-phoenix.service - hello-phoenix service<br>   Loaded: loaded (/etc/systemd/system/hello-phoenix.service; enabled)<br>   Active: failed (Result: start-limit) since Thu 2016-07-07 10:14:30 EDT; 9min ago<br>  Process: 4281 ExecStart=/home/hello-phoenix/app/bin/hello_phoenix start (code=exited, status=0/SUCCESS)<br> Main PID: 4281 (code=exited, status=0/SUCCESS)<br><br>Jul 07 10:14:30 Phoenix1 systemd[1]: hello-phoenix.service start request repeated too quickly, refusing to start.<br>Jul 07 10:14:30 Phoenix1 systemd[1]: Failed to start hello-phoenix service.<br>Jul 07 10:14:30 Phoenix1 systemd[1]: Unit hello-phoenix.service entered failed state.<br>Jul 07 10:14:33 Phoenix1 systemd[1]: hello-phoenix.service start request repeated too quickly, refusing to start.<br>Jul 07 10:14:33 Phoenix1 systemd[1]: Failed to start hello-phoenix service.<br><br></div>and journalctl -xn outputs:<br>-- Logs begin at Wed 2016-07-06 16:21:33 EDT, end at Thu 2016-07-07 10:17:01 EDT. --<br>Jul 07 10:14:30 Phoenix1 systemd[1]: Failed to start hello-phoenix service.<br>-- Subject: Unit hello-phoenix.service has failed<br>-- Defined-By: systemd<br>-- Support: <a href="http://lists.freedesktop.org/mailman/listinfo/systemd-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/systemd-devel</a><br>-- <br>-- Unit hello-phoenix.service has failed.<br>-- <br>-- The result is failed.<br>Jul 07 10:14:30 Phoenix1 systemd[1]: Unit hello-phoenix.service entered failed state.<br>Jul 07 10:14:33 Phoenix1 sudo[4319]: root : TTY=pts/2 ; PWD=/root ; USER=root ; COMMAND=/bin/systemctl start hello-phoenix.service<br>Jul 07 10:14:33 Phoenix1 sudo[4319]: pam_unix(sudo:session): session opened for user root by root(uid=0)<br>Jul 07 10:14:33 Phoenix1 systemd[1]: hello-phoenix.service start request repeated too quickly, refusing to start.<br>Jul 07 10:14:33 Phoenix1 systemd[1]: Failed to start hello-phoenix service.<br>-- Subject: Unit hello-phoenix.service has failed<br>-- Defined-By: systemd<br>-- Support: <a href="http://lists.freedesktop.org/mailman/listinfo/systemd-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/systemd-devel</a><br>-- <br>-- Unit hello-phoenix.service has failed.<br>-- <br>-- The result is failed.<br>Jul 07 10:14:33 Phoenix1 sudo[4319]: pam_unix(sudo:session): session closed for user root<br>Jul 07 10:17:01 Phoenix1 CRON[4342]: pam_unix(cron:session): session opened for user root by (uid=0)<br>Jul 07 10:17:01 Phoenix1 CRON[4343]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)<br>Jul 07 10:17:01 Phoenix1 CRON[4342]: pam_unix(cron:session): session closed for user root<br><br></div>Anybody have any ideas on what I am doing wrong? I am on day two of ramming my head against the wall trying to figure out. Any help would greatly appreciated. <br><br></div>Thanks and Cheers,<br></div>Michael<br clear="all"><div><div><div><div><div><div><div><div><div><div><div><div data-smartmail="gmail_signature"><div dir="ltr"><br><font color="#888888"><div dir="ltr"><div><span>Sincerely</span>,<br><span>Michael</span> <span>Chavez</span>, Web Developer<br>Space-Rocket | web and graphic design<br><br>M: <a value="+14157247935">415-724-7935</a><br><br>
W: <a href="http://www.space-rocket.com/" target="_blank">http://www.space-rocket.com/</a></div></div></font></div></div></div>
</div></div></div></div></div></div></div></div></div></div></div>
<br>_______________________________________________<br>
systemd-devel mailing list<br>
<a href="mailto:systemd-devel@lists.freedesktop.org">systemd-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/systemd-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/systemd-devel</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Regards,<div>Andrei Dziahel</div></div>
</div>