I'm having a problem with Pyro4 where when I try to connect to my python server it never connects. However as far as I can tell the server is running fine. I always get the 'not connected' problem. and when its not connected, I cannot make any python function calls on my object.
Here is what it looks like when I list out what is running in the environment
MELO@fence-with-pyro log]pyro4-nsc list
--------START LIST
Pyro.NameServer --> PYRO:Pyro.NameServer@29.21.14.125:9090
CASA --> PYRO:obj_c74c1737b5894d90b10d64326e70355a@29.21.14.125:36582
--------END LIST
MELO@fence-with-pyro log]
As far as I can tell everything looks good. I started CASA like this:
This is the CASA (name server) console output -- (its running)
Pyro4 config Pyro version: 4.38
Loaded from: /usr/lib/python2.6/site-packages/Pyro4-4.38-py2.6.egg/Pyro4
Python version: CPython 2.6.6 (Linux, posix)
Protocol version: 48
Currently active configuration settings:
AUTOPROXY = True
BROADCAST_ADDRS = <broadcast>, 0.0.0.0
COMMTIMEOUT = 0.0
COMPRESSION = False
DETAILED_TRACEBACK = True
FLAME_ENABLED = False
HOST = 29.21.14.125
JSON_MODULE = json
LOGFILE = /castle/pyro_.log
LOGLEVEL = DEBUG
LOGWIRE = True
MAX_MESSAGE_SIZE = 0
METADATA = True
NATHOST = None
NATPORT = 0
NS_BCHOST = None
NS_BCPORT = 9091
NS_HOST = localhost
NS_PORT = 9090
ONEWAY_THREADED = True
PICKLE_PROTOCOL_VERSION = 2
POLLTIMEOUT = 2.0
PREFER_IP_VERSION = 4
REQUIRE_EXPOSE = False
SERIALIZER = json
SERIALIZERS_ACCEPTED = set(['json', 'marshal', 'serpent'])
SERVERTYPE = thread
SOCK_NODELAY = False
SOCK_REUSE = False
THREADING2 = False
THREADPOOL_SIZE = 16
USE_MSG_WAITALL = True
!(casaNameServer) Starting CASA Pyro4 NameServer
Object <__main__.CasaNameServer object at 0x29bfc90>:
uri = PYRO:obj_c74c1737b5894d90b10d64326e70355a@29.21.14.125:36582
name = CASA
Pyro daemon running.
Note: I have tried also setting NS_HOST to the ip address instead of localhost but it had no effect on the problem.
Here is a sample of what happens when I Perform the steps manually
MELO@fence-with-pyro log]python
Python 2.6.6 (r266:84292, Jan 22 2014, 09:42:36)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import Pyro4
>>> x = Pyro4.locateNS(host='29.21.14.125',port=9090)
>>> x
<Pyro4.core.Proxy at 0x25ac510, connected, for PYRO:Pyro.NameServer@29.21.14.125:9090>
>>> uri = x.lookup('CASA')
>>> uri
<Pyro4.core.URI at 0x257d470, PYRO:obj_c74c1737b5894d90b10d64326e70355a@29.21.14.125:36582>
>>> from Pyro4.util import getPyroTraceback
>>> getPyroTraceback()
['None\n']
>>> Pyro4.Proxy(uri)
<Pyro4.core.Proxy at 0x25ac5d0, not connected, for PYRO:obj_c74c1737b5894d90b10d64326e70355a@29.21.14.125:36582>
>>> getPyroTraceback()
['None\n']
What is causing this to happen? Is there way to track down this sort of error? Like a deeper level of debugging to route out the problem?