<div dir="ltr">Hello. <div><br></div><div>As you recommend me to use "Accept=", I set this as "true".</div><div><br></div><div>But Client process waited for a few minute, it showed error message "connection was refused".</div>
<div>In this case, The best case to execute the service unit is to set "Accept= false".</div><div>But It will definitely present error message and be hanged.</div><div><div style="font-family:arial,sans-serif;font-size:14px">
<font color="#ff0000"><br></font></div><div style="font-family:arial,sans-serif;font-size:14px"><font color="#ff0000">systemd[1]: test_server.service start request repeated too quickly, refusing to start.</font></div><div style="font-family:arial,sans-serif;font-size:14px">
<font color="#ff0000">systemd[1]: Failed to start test_server.service.</font><span style="color:rgb(255,0,0)">systemd[1]: test_server.service start request repeated too quickly, refusing to start.</span></div></div><div style="font-family:arial,sans-serif;font-size:14px">
<span style="color:rgb(255,0,0)"><br></span></div><div style="font-family:arial,sans-serif;font-size:14px">Frankly speaking, I don't understand why service daemon is infinitely spawned when I set the option <span style="font-family:arial;font-size:small">"Accept= false".</span></div>
<div style="font-family:arial,sans-serif;font-size:14px">And Why couldn't the client process connect to socket unit that I made by setting <span style="font-family:arial;font-size:small">"Accept= true".</span></div>
<div style="font-family:arial,sans-serif;font-size:14px"><span style="font-family:arial;font-size:small"><br></span></div><div style="font-family:arial,sans-serif;font-size:14px"><span style="font-family:arial;font-size:small"><br>
</span></div><div style="font-family:arial,sans-serif;font-size:14px"><span style="font-family:arial;font-size:small">Thanks.</span></div><div style="font-family:arial,sans-serif;font-size:14px"><span style="font-family:arial;font-size:small"><br>
</span></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/12/19 Tony Seo <span dir="ltr"><<a href="mailto:tonyseo7@gmail.com" target="_blank">tonyseo7@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"><span style="font-family:arial,sans-serif;font-size:14px">Hello.</span><div style="font-family:arial,sans-serif;font-size:14px">I tried to execute a process by using socket activation.</div><div style="font-family:arial,sans-serif;font-size:14px">

As it is referred at systemd manual, I made  "server" and "client" process by using "sd-daemon.h" and "sd-daemon.c".</div><div style="font-family:arial,sans-serif;font-size:14px">when I made those processes, I used UDS(Unix Domain Socket) to make communication between server and client.</div>

<div style="font-family:arial,sans-serif;font-size:14px">(I also made <span style="background-color:rgb(224,224,224)">"/run/test_server" which executes like </span><span style="background-color:rgb(224,224,224)">"/run/<a href="http://foobar.sk/" target="_blank">foobar.sk</a>" in example of systemd manual for socket activation)</span></div>

<div style="font-family:arial,sans-serif;font-size:14px"><a href="http://0pointer.de/blog/projects/socket-activation.html" target="_blank">http://0pointer.de/blog/projects/socket-activation.html</a><span style="background-color:rgb(224,224,224)"><br>

</span></div><div style="font-family:arial,sans-serif;font-size:14px"><br></div><div style="font-family:arial,sans-serif;font-size:14px">And then, In order to make the process started, I made test_server.socket and test_server.service. </div>

<div style="font-family:arial,sans-serif;font-size:14px">those thing have contents like below:</div><div style="font-family:arial,sans-serif;font-size:14px"><br></div><div style="font-family:arial,sans-serif;font-size:14px">

--------------------test_server.socket---------------------------</div><div style="font-family:arial,sans-serif;font-size:14px"><div>[Socket]</div><div>ListenStream=/run/test_server</div><div><br></div><div>[Install]</div>

<div>WantedBy=sockets.target</div></div><div style="font-family:arial,sans-serif;font-size:14px">----------------------------------------------------------------------------</div><div style="font-family:arial,sans-serif;font-size:14px">

<br></div><div style="font-family:arial,sans-serif;font-size:14px"><div>--------------------test_server.service---------------------------</div><div><div>[Service]</div><div>Type=oneshot</div><div>ExecStart=/bin/sh /usr/bin/kill-avn-process.sh</div>

<div>StandardOutput=journal+console</div><div>TTYPath=/dev/ttyTCC0</div><div><br></div><div><br></div><div>[Install]</div><div>WantedBy=multi-user.target</div><div><br></div></div><div>----------------------------------------------------------------------------</div>

</div><div style="font-family:arial,sans-serif;font-size:14px"><br></div><div style="font-family:arial,sans-serif;font-size:14px">As soon as I executed the client process, test_server.service worked rapidly but it seemed to run in infinite loop with changing it's PID and then, it showed  that error messages like:</div>

<div style="font-family:arial,sans-serif;font-size:14px"><div><font color="#ff0000">systemd[1]: test_server.service start request repeated too quickly, refusing to start.</font></div><div><font color="#ff0000">systemd[1]: Failed to start test_server.service.</font></div>

<div><br></div></div><div style="font-family:arial,sans-serif;font-size:14px">I already knew that a process executed by socket activation would be respawn. </div><div style="font-family:arial,sans-serif;font-size:14px">But, what the important thing is that I don't know how to control the number of respawn.</div>

<div style="font-family:arial,sans-serif;font-size:14px">And, why does systemd make the error about request timing.</div><div style="font-family:arial,sans-serif;font-size:14px"><br></div><div style="font-family:arial,sans-serif;font-size:14px">

Thanks.</div></div>
</blockquote></div><br></div>