Linking two Pids of nodes that are in the same machine - noconnection signal!

Inswitch Solutions - Erlang Evaluation erlang@REDACTED
Fri Oct 1 21:21:50 CEST 2004


Hi Sean,

But in that case the node can't be seen from another machine.

I have node1 in machine1 and node2 and node3 in machine2
                --node1 in Mach1--
                |                             |
  node2  in Mach2----- node3 in Mach2

Node1 in Machine1 links to resources asked  to node2,  Node2 in Machine2
links to resources asked to node3 in Machine2.
If disconnecting the LAN on Machine2 node2 will lost connection with node1
but should not lost connection with node3.

Setting localhost on node2 will not allow node1 to see it.

Does this happen in other OS? Any ideas to solve this?
One of my last email questions should have been: Can I force Erlang to use
192.168.0.30 as the IP for a machine (desgn in my case)?


thanks,
Eduardo Figoli
INSwitch Solutions




----- Original Message -----
From: "Sean Hinde" <sean.hinde@REDACTED>
To: "Inswitch Solutions - Erlang Evaluation" <erlang@REDACTED>
Cc: <erlang-questions@REDACTED>
Sent: Friday, October 01, 2004 4:58 PM
Subject: Re: Linking two Pids of nodes that are in the same machine -
noconnection signal!


You could use erl -sname node@REDACTED - this at least works on non
windows OSs.

Windows 2000 doesn't sound like a very good option for delivering telco
solutions..

Sean

On 1 Oct 2004, at 13:36, Inswitch Solutions - Erlang Evaluation wrote:

>
> I'll try to explain the problem from another point of view.
> The machine I'm using is named design (IP=192.168.0.30).
>
> In Windows 2000:
> With LAN cable disconnected:
> ping design
> Response from 127.0.0.1: bytes=32 tieme<10ms TTL=128
> With LAN cable connected:
>
> ping design
> Response from 192.168.0.30: bytes=32 tieme<10ms TTL=128
>
>
> Having two Erlang nodes in the same machine the TCP socket connections
> are different:
> 1- if LAN cable disconnected the connection between nodes is
> established using 127.0.0.1:PORT
>  2- if LAN cable connected the connection between nodes is established
> using 192.168.0.30:PORT
>
> The problem is that in situation 2) and then if the LAN cable is
> disconnected the connections established with 192.168.0.30:PORT are
> lost. This can be also verified when "ping design" in W2000 command
> prompt.
>
> - Can I force Erlang to use 127.0.0.1 for local nodes connection
> instead of 192.168.0.30 ?
> - How can I solve this problem so not to lose local connections in any
> case?
> - Does the same behaviour happen in other OS?
>
>
> thanks in advance,
> Eduardo Figoli
> INSwitch Solutions
>
> ----- Original Message -----
>  From: Inswitch Solutions - Erlang Evaluation
> To: erlang-questions@REDACTED
> Sent: Thursday, September 30, 2004 10:46 AM
> Subject: Linking two Pids of nodes that are in the same machine -
> noconnection signal!
>
>
> The attached code links to pids of nodes that are in the same machine
> and I don't know why I receive a noconnection signal when the LAN
> cable is disconnected. This does no happen when running the code with
> the LAN cable disconnected and connecting/disconnecting it later.
>
> If someone wants to give a try, I send a code to test this situation
> and you should modify on node1.erl the blue text line below:
> {node2Pid, node2@REDACTED} ! {self()},
> with the corresponding machine name where you will run it.
>
>
> On the same machine do the following:
>
>
> 1 - "erl -sname node2"
> 2 - "node2:start()."
>
>
> 2 - "erl -sname node1"
> 3 - "node1:start()."
>
> 4 - The pid is linked and a message is shown on node1.
> 5 - node2Pid shows a message every 1 sec while checking the queue
> message
> 6 - node1 process loops checking the queue message
>
> 7 - Disconnect LAN cable
> 8 - node2Pid receives a noconnection signal
> 9 - node1 process receives an {'EXIT',Pid,noconnection}
>
>
> - When linking Pids of different nodes that are in the same machine
> why do I receive a "noconnection" signal?
> - Having the LAN cable disconnected and doing steps 1..6 8..9, if I
> connect/disconnect the LAN cable the "noconnection" signal is never
> received (correct behaviour).
>  - If in the source code I do not use "process_flag(trap_exit,
> true)," the processes terminate, why is this happenning as no kill
> signal is sent?
>
>
> thanks in advance,
> Eduardo Figoli
> INSwitch Solutions
>
>
>
>






More information about the erlang-questions mailing list