Re: Running Pyro (nameserver for now) in a Docker container
Irmen de Jong <[email protected]> Wed, 16 Jul 2014 21:43:50 +0200
| Newsgroups | gmane.comp.python.pyro |
|---|---|
| Message-ID | <[email protected]> |
On 16-7-2014 19:50, Steven Pav wrote: > Hello; > > I am excited to start using Pyro4. To ease deployment in our organization, I > plan on running services in Docker containers (see http://docker.io/ or > http://continuousdelivery.uglyduckling.nl/uncategorized/using-docker-as-a- > python-development-environment/ ). To start, I tried to deploy the nameserver > in a docker container. However, I am unable to locate the nameserver once it > is running. I believe this might be related to some of the issues noted in > this post: http://comments.gmane.org/gmane.comp.python.pyro/2490 , namely > that the nameserver running within the docker container has funny ideas about > the name of the localhost, or what port it should be listening on, etc. > > 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) Irmen ------------------------------------------------------------------------------ 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