Re: [Errno 61] Connection refused when trying to call a remote object method

Irmen de Jong <[email protected]> Tue, 28 Oct 2014 21:02:18 +0100
Newsgroups gmane.comp.python.pyro
Message-ID <[email protected]>
On 28-10-2014 10:32, Francesco Petralia wrote:
> 
> 
> I simply obtain my actual ip address that the net has assigned to me. I'm sure that this
> works, because I printed the return value, and all is ok.

Well this is only true if you're not behind a NAT router/firewall and the IP address
given by the above method is the actual external IP address of your network adapter.
Given the inability of your code to connect to a port via this address I suspect it is
not the correct address.
What happens when you replace the call to your get_ip_address function with the hostname
of your machine?


> 
>     >Also does your setup work when you run it all on the same machine? (i.e. start
>     >eliminating variables, such as running stuff over the network, to zoom in on what is
>     >causing the issue)
> 
> Yeah, unfortunately, even running it in local, gives the exact same error.
> It's pretty odd. I've also checked with lsof -i :port_number if the ports assigned to
> the connected pyro object(s) were already taken, but obviously they were not, because
> the kernel assigns port numbers from a pool of unused ports.
> 
> Could be a problem of port forwarding on MAC?
> Anyway, it doesn't work even if I manually shut down the firewall. 

Sorry I have no idea what is wrong with your networking setup.

Try diagnosing and fixing it first without using Pyro at all. Use netcat or whatever to
bind a listening socket and try to connect to it (with telnet).

In its bowels Pyro is doing the same thing and if you can't connect to a socket on the
expected adapter/port/machine, a Pyro program will never work either.



Irmen



------------------------------------------------------------------------------