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

Francesco Petralia <[email protected]> Tue, 28 Oct 2014 10:32:33 +0100
Newsgroups gmane.comp.python.pyro
Message-ID <CAL-shCwZyy_XJnYou_+yuK8_WjFVLBKYupTXT-we9d79nKtHwQ@mail.gmail.com>
2014-10-27 21:58 GMT+01:00 Irmen de Jong <[email protected]>
>
>
> >Well clearly something in your setup is preventing a connection on that
> interface
> >address for the given port. You'll have to fix this first, which is not a
> Pyro issue at
> >all...
>

Exactly, this probably is the real and only problem.

>
> >.... unless this get_ip_adress returns the wrong ip address. Make sure
> you're using an
> >ip address of an externally reachable network interface.
>

This method is pretty simple:

def get_ip_address(self):
        s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
        s.connect(("www.google.com", 80))
        ip = str(s.getsockname()[0])
        s.close()
        return ip

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.


> >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.

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

_______________________________________________
Pyro-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyro-core