<div dir="ltr">Thanks Daniel, I just tried that, I see different issue now<div><br></div><div><b>Server</b></div><div><p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)">root@387bc0fe92dd:/code# ifconfig</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)">eth0 Link encap:Ethernet HWaddr 02:42:ac:11:00:3e </p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)"> inet addr:172.17.0.62 Bcast:0.0.0.0 Mask:255.255.0.0</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)"> inet6 addr: fe80::42:acff:fe11:3e/64 Scope:Link</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)"> UP BROADCAST RUNNING MTU:1500 Metric:1</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)"> RX packets:15 errors:0 dropped:0 overruns:0 frame:0</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)"> TX packets:14 errors:0 dropped:0 overruns:0 carrier:0</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)"> collisions:0 txqueuelen:0 </p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)"> RX bytes:1260 (1.2 KB) TX bytes:1088 (1.0 KB)</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54);min-height:15px"><br></p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)">lo Link encap:Local Loopback </p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)"> inet addr:127.0.0.1 Mask:255.0.0.0</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)"> inet6 addr: ::1/128 Scope:Host</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)"> UP LOOPBACK RUNNING MTU:65536 Metric:1</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)"> RX packets:30 errors:0 dropped:0 overruns:0 frame:0</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)"> TX packets:30 errors:0 dropped:0 overruns:0 carrier:0</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)"> collisions:0 txqueuelen:0 </p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)"> RX bytes:1674 (1.6 KB) TX bytes:1674 (1.6 KB)</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54);min-height:15px"><br></p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)">root@387bc0fe92dd:/code# erl -name <a href="mailto:gru@172.17.0.62">gru@172.17.0.62</a> -setcookie abc</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)">Erlang/OTP 17 [erts-6.0] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54);min-height:15px"><br></p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)">Eshell V6.0 (abort with ^G)</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)">(<a href="mailto:gru@172.17.0.62">gru@172.17.0.62</a>)1> kvs:start()</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)">(<a href="mailto:gru@172.17.0.62">gru@172.17.0.62</a>)1> .</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)">true</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)">(<a href="mailto:gru@172.17.0.62">gru@172.17.0.62</a>)2> </p></div><div><br></div><div><b>Client</b></div><div><p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)">(minion1@035fe95388df)6> rpc:call(<a href="mailto:gru@172.17.0.62">gru@172.17.0.62</a>, kvs, store, [weather, fine]). </p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)">* 1: syntax error before: '.'</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)">(minion1@035fe95388df)6> rpc:call('<a href="mailto:gru@172.17.0.62">gru@172.17.0.62</a>', kvs, store, [weather, fine]).</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)">{badrpc,nodedown}</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)">(minion1@035fe95388df)7> </p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)">=ERROR REPORT==== 19-Jan-2015::16:42:56 ===</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)">** System NOT running to use fully qualified hostnames **</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)">** Hostname 172.17.0.62 is illegal **</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54);min-height:15px"><br></p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54);min-height:15px"><br></p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54);min-height:15px"><br></p></div><div><b><br></b></div><div>I don't understand why Host is illegal, any ideas? </div><div>Thanks</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 19, 2015 at 8:22 AM, Daniel Hallin Widgren <span dir="ltr"><<a href="mailto:daniel.widgren@gmail.com" target="_blank">daniel.widgren@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>Have you tried to use -name mynode@IP instead of -sname mynode? I think you need long name activated to talk to each other.</div><div><br></div><div>regards,</div><div>Daniel</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">2015-01-19 17:05 GMT+01:00 Harit Himanshu <span dir="ltr"><<a href="mailto:harit.subscriptions@gmail.com" target="_blank">harit.subscriptions@gmail.com</a>></span>:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hi<div><br></div><div>I am learning Distributed programming and in order to work through it, I started 2 docker containers using images provided by Mark Nijhof (<a href="https://github.com/MarkNijhof/erlang_docker" target="_blank">https://github.com/MarkNijhof/erlang_docker</a>)</div><div><br></div><div>So now when I start my docker containers (on same Macbook), I observe that they are not able to talk to each other </div><div><br></div><div><b>Server</b></div><div><p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)">root@387bc0fe92dd:/code# erl -sname gru -setcookie abc</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)">Erlang/OTP 17 [erts-6.0] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54);min-height:15px"><br></p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)">Eshell V6.0 (abort with ^G)</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)">(gru@387bc0fe92dd)1> kvs:start().</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)">true</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)">(gru@387bc0fe92dd)2> </p></div><div><br></div><div><b>Minion</b></div><div><p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)"><span style="color:rgb(132,156,163)">➜ </span><span style="color:rgb(177,191,191)">erlang_docker </span><span style="color:rgb(165,182,184)">git:(</span><span style="color:rgb(254,119,63)">master</span><span style="color:rgb(165,182,184)">) </span>docker run -t -i erlang-build-box /bin/bash</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)">root@035fe95388df:/# mkdir code</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)">root@035fe95388df:/# cd code</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)">root@035fe95388df:/code# vi kvs.erl</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)">root@035fe95388df:/code# erl -sname minion1 -setcookie abc</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)">Erlang/OTP 17 [erts-6.0] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54);min-height:15px"><br></p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)">Eshell V6.0 (abort with ^G)</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)">(minion1@035fe95388df)1> rpc:call(gru@387bc0fe92dd, kvs, store, [weather, fine]).</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)">{badrpc,nodedown}</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)">(minion1@035fe95388df)2> rpc:call(gru@387bc0fe92dd, kvs, store, [weather, fine]).</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)">{badrpc,nodedown}</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)">(minion1@035fe95388df)3> c(kvs).</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)">{ok,kvs}</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)">(minion1@035fe95388df)4> rpc:call(gru@387bc0fe92dd, kvs, store, [weather, fine]).</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)">{badrpc,nodedown}</p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54)">(minion1@035fe95388df)5> </p>
<p style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(131,148,150);background-color:rgb(2,43,54);min-height:15px"><br></p></div><div><b><br></b></div><div>My code looks like following and it works correctly when both server and minion are on same node</div><div><br></div><div><div>-module(kvs).<br></div><div>-author("harith").</div><div><br></div><div>%% API</div><div>-export([start/0, store/2, lookup/1]).</div><div><br></div><div>start() -></div><div> register(kvs, spawn(fun() -> loop() end)).</div><div><br></div><div>store(Key, Value) -></div><div> rpc({store, Key, Value}).</div><div><br></div><div>lookup(Key) -></div><div> rpc({lookup, Key}).</div><div><br></div><div>rpc(Q) -></div><div> kvs ! {self(), Q},</div><div> receive</div><div> {kvs, Reply} -></div><div> Reply</div><div> end.</div><div><br></div><div>loop() -></div><div> receive</div><div> {From, {store, Key, Value}} -></div><div> put(Key, {ok, Value}),</div><div> From ! {kvs, true},</div><div> loop();</div><div> {From, {lookup, Key}} -></div><div> From ! {kvs, get(Key)},</div><div> loop()</div><div> end.</div></div><div><br></div><div><br></div><div>What am I missing here?</div><div><br></div><div>Thanks</div><span><font color="#888888"><div>+ Harit</div></font></span></div>
<br></div></div>_______________________________________________<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" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>