Closed pmagwene closed 3 years ago
Sounds like the Pyro daemon is binding on a local network interface, one that isn't visible from other machines in the network. It will happily publish that IP in the name server though.
Have you checked this https://pyro5.readthedocs.io/en/latest/tipstricks.html#failed-to-locate-the-nameserver-or-connection-refused-error-what-now
An easy solution may be to not bind the daemon on the default host, but instead use "" or perhaps even the actual machine's hostname. As long as the resulting IP address is from a non-local network adapter so that it is reachable from other machines.
Any luck trying the above?
My apologies for the slow response.
I did eventually solve my issue though it was now far enough back that I don't recall that exact details. If I call correctly the key problem was a confusion on my part between the daemon port and the nameserver port.
Thanks @pmagwene for reporting back. Glad you managed to solve the issue!
I'm having a hard time getting Pyro5 working between machines in a LAN.
On the machine running the nameserver, I'm starting the nameserver with a command like:
I then run the
greeting-server.py
example from the docs.On the local machine (the one running the nameserver), I can connect to the nameserver, use
ns.list()
andns.lookup()
to findexample.greeting
and get a URI, and then use the URI withProxy
to get a proxy object with which I can accessGreetingMaker.get_fortune()
.From the remote machine I can also connect to the nameserver, and use
ns.list()
andns.lookup()
to findexample.greeting
and it's URI. But when I get the URI vians.lookup()
the nameserver always returns the a URI ending in localhost. Unsurprisingly, I can't access the remote object because it's not on localhost.I've played around with the nathost/natport settings in the Daemon but that doesn't seem to help, and in fact seems to prevent access on the local machine.
I've done some basic troubleshooting to try and insure that my problems are not firewall related. I've tried with firewalls off on both machines, without any difference in behavior. To further eliminate network misconfiguration as the source of the problems, I've tried the basic ZeroMQ (via pyzmq) examples between my local and remote machine and those work fine.
In any case, I'm looking for the simplest possible example illustrating how to use the Pyro5 nameserver to get Pyro5 working across to machines in a LAN. Any guidance would be greatly appreciated.