Re: Running Pyro (nameserver for now) in a Docker container
Steven Pav <[email protected]> Wed, 16 Jul 2014 21:32:26 +0000 (UTC)
| Newsgroups | gmane.comp.python.pyro |
|---|---|
| Message-ID | <[email protected]> |
Irmen de Jong <irmen@...> writes: > > On 16-7-2014 19:50, Steven Pav wrote: [snip] > > As a MWE, I have posted the Dockerfile and some shell code to run it here: > > https://gist.github.com/shabbychef/72657f769eba7ddeed9d . When I run it, I > > can confirm that the container with the nameserver is running, however, I > > cannot communicate with it, rather I get the error: > > > > Failed to locate the name server: Failed to locate the nameserver > > > > Any help debugging this would be appreciated. > > You can set PYRO_LOGLEVEL=DEBUG and PYRO_LOGFILE=<some file> before starting your name > server and client code/nsc utility. This allows you to see in more detail what Pyro is > doing. > > Also, can you telnet directly to the host/port your nameserver runs on? > > And what does the line -p 0.0.0.0:6432:6432 -p 0.0.0.0:6433:6433/udp from the docker > script do exactly? Is this used to set up port forwarding, and if so, are you sure that > works correctly? (The telnet attempt above should point that out I think) > > (By the way, if it is running on localhost, and you are trying to connect to it from the > same machine, Pyro really should be able to find it even without udp broadcasting > working. It will try to connect to 'localhost' by itself. But again, check in the > logfiles what it is doing and what problems it runs into) Good suggestions. I have set the PYRO_LOGLEVEL and PYRO_LOGFILE as suggested. I try to communicate with the name server, get no response, then I copied the logfile out of the container. It looks like this: [2014-07-16 12:55:08.998,Pyro4,INFO] Pyro log configured using built-in defaults, level=DEBUG [2014-07-16 12:55:09.024,Pyro4.threadpoolserver,INFO] starting thread pool socketserver [2014-07-16 12:55:09.026,Pyro4.threadpool,DEBUG] worker pool of size 16 created [2014-07-16 12:55:09.026,Pyro4.core,DEBUG] created daemon on localhost:6432 [2014-07-16 12:55:09.026,Pyro4.core,DEBUG] accepted serializers: set(['json', 'marshal', 'serpent']) [2014-07-16 12:55:09.027,Pyro4.naming,INFO] nameserver daemon created [2014-07-16 12:55:09.027,Pyro4.naming,INFO] Not starting NS broadcast server because NS is bound to localhost [2014-07-16 12:55:09.027,Pyro4.core,INFO] daemon localhost:6432 entering requestloop [2014-07-16 12:55:09.027,Pyro4.threadpoolserver,DEBUG] threadpool server requestloop Of note: 1. there is no logging of any attempt to connect. 2. the part about 'Not starting NS broadcast server because NS is bound to localhost' is probably highly relevant. I am using "-n localhost" when I start the nameserver, so perhaps some other configuration is warranted here? As noted by another poster, the -p 0.0.0.0:6432:6432 tells docker to bind port 6432 in the container to 6432 on the host. ------------------------------------------------------------------------------ Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds