<div dir="ltr">Hi!<div><br></div><div>Looks like you observe very strange behaviour, we run our erlang release in OpenStack ubuntu instance, with follow systemd config and everything works fine:</div><div><br></div><div><div>[Unit]</div><div>After=network.target remote-fs.target<br></div><div>Requires=network.target remote-fs.target</div><div><br></div><div>[Service]</div><div>Type=forking</div><div>TimeoutStartSec=0</div><div>Restart=always</div><div>RestartSec=5</div><div>Environment=HOME=/root</div><div>ExecStart={SCRIPT} start</div><div>ExecStop={SCRIPT} stop</div><div><br></div><div>[Install]</div><div>WantedBy=multi-user.target</div></div><div><br></div><div>Note that <span style="font-size:12.8px">run_erl complain when HOME var is not defined. Also, I suggest try to get rid of User and Group.</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-10-31 12:52 GMT+03:00 Ali Sabil <span dir="ltr"><<a href="mailto:ali.sabil@gmail.com" target="_blank">ali.sabil@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">I tend to use `<span style="font-size:12.800000190734863px">/proj/myapp/bin/</span><span style="font-size:12.800000190734863px">myapp foreground` and avoid run_erl altogether.</span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 31, 2017 at 12:27 PM, Rynö Jouni (FMI) <span dir="ltr"><<a href="mailto:Jouni.Ryno@fmi.fi" target="_blank">Jouni.Ryno@fmi.fi</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi list<br>
<br>
I have an odd systemd and run_erl issue. This service definition more<br>
or less "works" on a "physical" machine, but not on a KVM-virtual<br>
machine.<br>
<br>
[Unit]<br>
Description=My node<br>
After=network.target<br>
<br>
[Service]<br>
Environment=RUNNER_LOG_DIR=/va<wbr>r/log/myapp<br>
Type=forking<br>
ExecStartPre=/bin/sleep 60<br>
ExecStart=/proj/myapp/bin/myap<wbr>p start<br>
ExecStop=/proj/myapp/bin/myapp stop<br>
RestartSec=20<br>
Restart=on-failure<br>
User=me<br>
Group=me<br>
<br>
[Install]<br>
WantedBy=multi-user.target<br>
<br>
<br>
epmd is running and I just try to start it via "systemctl start<br>
my.service" from a command line<br>
<br>
Plus I do get some odd inet_gethost and epmd died errors even in the<br>
physical machine, but at least the run_erl starts at some point ...<br>
<br>
<br>
Is there something, that I should do differently or add in the<br>
environment?<br>
Jouni<br>
<br>
PS.somehow the init.d shell scripts were easier to debug ...<br>
<br>
--<br>
Jouni Rynö mailto://<a href="http://Jouni.Ryno@fmi.fi/" rel="noreferrer" target="_blank">Jouni.Ryno@fmi.fi/</a><br>
<a href="http://space.fmi.fi/~ryno/" rel="noreferrer" target="_blank">http://space.fmi.fi/~ryno/</a><br>
Finnish Meteorological Institute <a href="http://www.fmi.fi/" rel="noreferrer" target="_blank">http://www.fmi.fi/</a><br>
Observation services<br>
P.O.BOX 503 Tel <a href="tel:%28%2B358%29-29-5394656" value="+358295394656" target="_blank">(+358)-29-5394656</a><br>
FI-00101 Helsinki FAX <a href="tel:%28%2B358%29-29-5395703" value="+358295395703" target="_blank">(+358)-29-5395703</a><br>
Finland priv-GSM <a href="tel:%28%2B358%29-50-5302903" value="+358505302903" target="_blank">(+358)-50-5302903</a><br>
<br>
md5sum(the Ultimate Question of Life, The Universe, and Everything) =<br>
000000000000000000000000000000<wbr>2A<br>
______________________________<wbr>_________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/list<wbr>info/erlang-questions</a><br>
</blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/<wbr>listinfo/erlang-questions</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Петровский Александр / Alexander Petrovsky,<br><br>Skype: askjuise<br><div>Phone: +7 931 9877991<div><br></div></div></div></div></div></div>
</div>