Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [geomesa-users] Connection error: Failed to find an available server in the list of servers

Nico,

 

Docker runs on the HOST with the host IP.  Each running container will generally be granted an internal IP from the docker host based on DHCP.  Docker maintains, in a default run, its own network stack.

 

To communicate with the services running inside the container, for example, zookeeper on port 2181, you need to expose the internal port to the “outside”.  This is done with the -p outsideport:insideport, lowercase p, or with a -P, uppercase p, which will automount each port listed in the EXPOSE command in the docker file.  You can also retrieve the ports that are “expected” to be exposed via docker inspect:

 

docker inspect --format='{{ .Config.ExposedPorts}}' myImageName

 

So,  to reach the Accumulo server listening at 172.17.0.5:9997 from outside the container, you have to expose the port 9997.

docker run -d -p 19997:9997 other settings here NameOfImage

This will create a mapping from the external port 19997 into the container to 9997.  This only exposes the single port.  To communicate with all the other ports, you have to add additional -p <port>:<port> options.  You also must use the docker HOST name or IP address and not the internal container IP

 

or

 

docker run -d -P  other settings here NameOfImage

This will expose every port listed in the docker file as EXPOSE, cumulative with parent image EXPOSE commands, and map them starting at a high port.  This also requires the use of the HOST name or IP address and the exposed port.  Use docker ps to find the running container and the ports exposed.  An example output:

0.0.0.0:25111->8080/tcp

 

This indicates that the host machine will listen on all external IP address against port 25111 and will route the network traffic to the specific container through port 8080.  In this case, it is a web service running in tomcat on port 8080.

 

See https://docs.docker.com/engine/reference/run/#expose-incoming-ports for explanation.

 

 

Chris Snider

Senior Software Engineer

Intelligent Software Solutions, Inc.

Description: Description: Description: cid:image001.png@01CA1F1F.CBC93990

 

From: geomesa-users-bounces@xxxxxxxxxxxxxxxx [mailto:geomesa-users-bounces@xxxxxxxxxxxxxxxx] On Behalf Of Nico Kreiling
Sent: Tuesday, February 09, 2016 12:21 PM
To: Geomesa User discussions <geomesa-users@xxxxxxxxxxxxxxxx>
Subject: Re: [geomesa-users] Connection error: Failed to find an available server in the list of servers

 

Hello Jim 

 

thanks a lot for the answer. The geo-env project is really awesome and after some small trouble it works great. I can see the accumulo monitor, tablet- and master are up. I can also run the test which is provided in the installation directory. 

 

However I still run into the same problem, now just with another instance name: Failed to find an available server in the list of servers: [master1.gt:9997 (120000)]

 

I also can connect via zookeeper Cli and see the geomesa instance listed. Any ideas?

 

Nico

 

On 09 Feb 2016, at 00:16, Jim Hughes <jnh5y@xxxxxxxx> wrote:

 

Hi Nico,

Good question.  That project is actually an older copy of an internal GeoMesa Docker project here at CCRi.  We haven't been actively working on it for awhile.  Today I learned about a more active project here: https://github.com/pomadchin/geo-env; it may be worth a look.  I'm in the GeoTrellis gitter (https://gitter.im/geotrellis/geotrellis) and you could likely get support from 'pomadchin' with the general use of the project.

That aside, to answer your final question, from what I know about Docker, each running Docker image has some amount of network virtualization.  If you have a shell in the Docker image, you can probably ping 172.17.0.5 and the server-domain name may resolve to that. 

Said differently, it is quite easy to have a one-node VM/Docker image where the masters/slaves/monitor/traces files point to a reference which has different resolution from 'inside' and 'outside' the environment.  For example, if those files contain 'localhost', then things will likely work from 'inside', but not 'outside'.  In a Docker example, there may need to be some fiddling to get the same code to work in both scopes.

I hope that helped.  If not, lemme know and let's iterate!

Cheers,

Jim

On 02/08/2016 06:00 PM, Nico Kreiling wrote:

Hello,

 

I used a GeoMesa Docker installation (https://github.com/rheilgm/testgeo) and updated the links for it to work (Hadoop 2.2, Accumulo 1.5.2, Geomesa 1.1.0-rc.7, zk 3.4.6. It all works great and i can insert data from geomesa tools locally, but when I try to connect to it via Java `DataStoreFinder.getDataStore(dsConf);` I get the message: Failed to find an available server in the list of servers: [172.17.0.5:9997 (120000)]

 

The Java Code itself should be fine since I can connect to another, native installed geomesa instance. Also the connection parameters should be correct, I tested them with Geomesa tools and was able to create a catalog via remote access. I guess my installation configuration is somehow wrong. 

 

I inserted the server-domain name in the masters, slaves, monitor and tracers conf file. The other configurations should be the same as in the repo. 

 

Any ideas what I can do? I also don’t really understand why the tablet server gets the ip 172.17.0.5.

 

 




_______________________________________________
geomesa-users mailing list
geomesa-users@xxxxxxxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
http://www.locationtech.org/mailman/listinfo/geomesa-users

 

_______________________________________________
geomesa-users mailing list
geomesa-users@xxxxxxxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
http://www.locationtech.org/mailman/listinfo/geomesa-users

 


Back to the top