Well, I have the same problem when subprocessing &quot;/etc/init.d/rabbitmq-server start&quot;.<div><br></div><div>Note that I have no problem subprocessing &quot;service rabbitmq-server status&quot; or�&quot;service rabbitmq-server stop&quot; (or any other service).�</div>
<div><br></div><div>My only issue is with the start method of /etc/init.d/rabbitmq-server init script.<br><div><br></div><div><br><br><div class="gmail_quote">On Tue, Oct 16, 2012 at 1:34 PM, Tim Watson <span dir="ltr">&lt;<a href="mailto:tim@rabbitmq.com" target="_blank">tim@rabbitmq.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">When you run RabbitMQ on an rpm based distro using /sbin/service then the init script is going to redirect stdio, as you would expect for a service/daemon. You&#39;ll need to start RabbitMQ directly from the ./scripts/rabbitmq-server shell script I guess, if you want to grab stdio - or tail the logs?<br>

<div><div class="h5"><br>
On 16 Oct 2012, at 11:47, Rapha�l De GIUSTI wrote:<br>
<br>
&gt; Hi everyone,<br>
&gt;<br>
&gt; Starting the rabbitmq-server service with python&#39;s Popen from subprocess makes it hang.<br>
&gt;<br>
&gt; Here&#39;s the little snippet to reproduce it (tested on Fedora 16 + Python2.7 and Centos 6.3 + Python2.6)<br>
&gt;<br>
&gt; from subprocess import PIPE, Popen<br>
&gt; proc = Popen(&#39;service rabbitmq-server start&#39;, shell=True, stderr=PIPE, stdout=PIPE)<br>
&gt; print proc.communicate()<br>
&gt;<br>
&gt; Problem is with &quot;stdout=PIPE&quot;, I think.<br>
&gt;<br>
&gt; The following snippet works, using proc.wait()<br>
&gt;<br>
&gt; from subprocess import PIPE, Popen<br>
&gt; proc = Popen(&#39;service rabbitmq-server start&#39;, shell=True, stderr=PIPE, stdout=PIPE)<br>
&gt; print proc.wait()<br>
&gt;<br>
&gt; Any idea on how to fix it using proc.communicate() because I need feedback from the &quot;subprocess.PIPE&quot; ?<br>
&gt;<br>
&gt; Thank you.<br>
&gt;<br>
&gt; Raphael<br>
</div></div>&gt; _______________________________________________<br>
&gt; rabbitmq-discuss mailing list<br>
&gt; <a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br>
&gt; <a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
<br>
_______________________________________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br>
<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
</blockquote></div><br></div></div>