ejabberd - Comments for "why gen_tcp:controlling_process() can failed with badarg?" https://www.ejabberd.im/node/3854 en Quote: I have a problem with https://www.ejabberd.im/node/3854#comment-55264 <div class="quote-msg"> <div class="quote-author">Quote:</div> <p>I have a problem with one module of ejabberd. It is http_bind.</p></div> <p>Do you mean the file src/web/ejabberd_http_bind.erl included in ejabberd? I didn't find anywhere in ejabberd source code the lines you mention.</p> <div class="quote-msg"> <div class="quote-author">Quote:</div> <p> {badarg, [<br /> {erlang, port_connect, [#Port&lt;0.140743856&gt;, &lt;0.5939.4350&gt;]},<br /> {inet, tcp_controlling_process, 2},<br /> {ejabberd_socket,start,4},<br /> {ejabberd_listener,accept,3},<br /> {proc_lib,init_p,5}<br /> ]} </p></div> <p>The error message indicates that the call to erlang:port_connect failed due to badarg.</p> <p>The erlang documentation about that function <noindex><a href="http://www.erlang.org/doc/man/erlang.html" title="http://www.erlang.org/doc/man/erlang.html" rel="nofollow" >http://www.erlang.org/doc/man/erlang.html</a></noindex> says:</p> <div class="quote-msg"> <div class="quote-author">Quote:</div> <p>port_connect(Port, Pid) -&gt; true</p> <p>...</p> <p>Failure: badarg if Port is not an open port or the registered name of an open port, or if Pid is not an existing local pid.</p></div> Fri, 05 Feb 2010 18:41:03 +0000 mfoss comment 55264 at https://www.ejabberd.im