<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">If I start Janus with SOCK_DGRAM and use the following from Erlang<div class=""><br class=""></div><div class=""><pre style="font-variant-ligatures: normal; orphans: 2; widows: 2; background-color: rgb(255, 255, 255); background-position: initial initial; background-repeat: initial initial;" class="">1<span style="color: rgb(128, 128, 48);" class="">></span> {ok<span style="color: rgb(128, 128, 48);" class="">,</span> <span style="color: rgb(121, 121, 151);" class="">Sock</span>} <span style="color: rgb(128, 128, 48);" class="">=</span> gen<span style="color: rgb(121, 121, 151);" class="">_</span>udp:open<span style="color: rgb(128, 128, 48);" class="">(</span>0<span style="color: rgb(128, 128, 48);" class="">,</span> <span style="color: rgb(128, 128, 48);" class="">[</span>local<span style="color: rgb(128, 128, 48);" class="">]</span><span style="color: rgb(128, 128, 48);" class="">)</span><span style="color: rgb(128, 128, 48);" class="">.</span>
{ok<span style="color: rgb(128, 128, 48);" class="">,</span>#<span style="color: rgb(121, 121, 151);" class="">Port</span><span style="color: rgb(128, 128, 48);" class=""><</span><span style="color: rgb(0, 128, 0);" class="">0.6</span><span style="color: rgb(128, 128, 48);" class="">></span>}
2<span style="color: rgb(128, 128, 48);" class="">></span> gen<span style="color: rgb(121, 121, 151);" class="">_</span>udp:send<span style="color: rgb(128, 128, 48);" class="">(</span><span style="color: rgb(121, 121, 151);" class="">Sock</span><span style="color: rgb(128, 128, 48);" class="">,</span> {local<span style="color: rgb(128, 128, 48);" class="">,</span> <span style="color: rgb(128, 128, 48);" class=""><</span><span style="color: rgb(128, 128, 48);" class=""><</span><span style="color: rgb(0, 0, 230);" class="">"/home/vagrant/janus.sock"</span><span style="color: rgb(128, 128, 48);" class="">></span><span style="color: rgb(128, 128, 48);" class="">></span>}<span style="color: rgb(128, 128, 48);" class="">,</span> 0<span style="color: rgb(128, 128, 48);" class="">,</span> <span style="color: rgb(0, 0, 230);" class="">"{}"</span><span style="color: rgb(128, 128, 48);" class="">)</span><span style="color: rgb(128, 128, 48);" class="">.</span>
ok</pre><div class="">then I see </div><div class=""><br class=""></div><div class=""><pre style="font-variant-ligatures: normal; orphans: 2; widows: 2; background-color: rgb(255, 255, 255); background-position: initial initial; background-repeat: initial initial;" class="">Unix Sockets thread started
<span style="color: rgb(128, 128, 48);" class="">[</span>WARN<span style="color: rgb(128, 128, 48);" class="">]</span> Dropping packet from unknown source <span style="color: rgb(128, 128, 48);" class="">(</span>no path provided<span style="color: rgb(128, 128, 48);" class="">)</span></pre><div class="">in Janus logs.</div></div><div><br class=""><blockquote type="cite" class=""><div class="">On Nov 11, 2018, at 4:43 PM, Joe K <<a href="mailto:goodjoe2049@gmail.com" class="">goodjoe2049@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">tl;dr<br class=""><br class="">How can I avoid:<br class=""><br class="">```<br class="">1> gen_udp:open(0, [binary, {ip, {local, <<"/home/vagrant/janus.sock">>}}]).<br class="">{error,eaddrinuse}<br class="">```<br class=""><br class="">---<br class=""><br class="">I have a janus gateway (<a href="https://github.com/meetecho/janus-gateway" class="">https://github.com/meetecho/janus-gateway</a>) running on the same host as my Erlang app and I want to be able to make them talk via a unix socket. Janus creates a SOCK_SEQPACKET or SOCK_DGRAM unix socket on startup and I want to be able to connect to it from Erlang. The problem is, when I set Janus to use SOCK_DGRAM, I can't then open it from Erlang:<br class=""><br class="">```<br class="">1> gen_udp:open(0, [binary, {ip, {local, <<"/home/vagrant/janus.sock">>}}]).<br class="">{error,eaddrinuse}<br class="">```<br class=""><br class="">and if I set Janus to use SOCK_SEQPACKET, gen_tcp fails for me as well:<br class=""><br class="">```<br class="">2> gen_tcp:connect({local, <<"/home/vagrant/janus.sock">>}, 0, [local]).<br class="">{error,eprototype}<br class="">```<br class=""><br class="">What am I doing wrong?</div></div></blockquote></div><br class=""></div></body></html>