You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geode.apache.org by James Dodson <ji...@gmail.com> on 2019/10/12 03:35:55 UTC

docker help

Hi-

I am trying to run the Hello World app from "Geode in 5 minutes":
 https://github.com/apache/geode

If I install and run Geode 1.10 locally, the app works.

When I try to use the docker image, I get:
Exception in thread "main"
org.apache.geode.cache.client.NoAvailableServersException

I feel like I've followed the directions pretty carefully. I've also tried
passing a bunch of possible ports to docker:
docker run -it -p 10334:10334 -p 7575:7575 -p 1099:1099 -p 7070:7070 -p
8080:8080 -p 40404:40404 apachegeode/geode

I feel like I'm missing something, but it's not obvious to me - is it
obvious to you?

Thanks for any help you can provide!
-Jim

--

➜  ~ docker run -it -p 10334:10334 -p 7575:7575 -p 1099:1099 -p 7070:7070
-p 8080:8080 -p 40404:40404 apachegeode/geode
    _________________________     __
   / _____/ ______/ ______/ /____/ /
  / /  __/ /___  /_____  / _____  /
 / /__/ / ____/  _____/ / /    / /
/______/_/      /______/_/    /_/    1.10.0

Monitor and Manage Apache Geode
gfsh>start locator
Starting a Geode Locator in /turn-witty-zeta...
.......
Locator in /turn-witty-zeta on 528e805016b7[10334] as turn-witty-zeta is
currently online.
Process ID: 40
Uptime: 9 seconds
Geode Version: 1.10.0
Java Version: 1.8.0_212
Log File: /turn-witty-zeta/turn-witty-zeta.log
JVM Arguments: -Dgemfire.enable-cluster-configuration=true
-Dgemfire.load-cluster-configuration-from-dir=false
-Dgemfire.launcher.registerSignalHandlers=true -Djava.awt.headless=true
-Dsun.rmi.dgc.server.gcInterval=9223372036854775806
Class-Path:
/geode/lib/geode-core-1.10.0.jar:/geode/lib/geode-dependencies.jar

Successfully connected to: JMX Manager [host=528e805016b7, port=1099]

Cluster configuration service is up and running.

gfsh>start server
Starting a Geode Server in /zoom-agreeable-uniform...
...
Server in /zoom-agreeable-uniform on 528e805016b7[40404] as
zoom-agreeable-uniform is currently online.
Process ID: 128
Uptime: 4 seconds
Geode Version: 1.10.0
Java Version: 1.8.0_212
Log File: /zoom-agreeable-uniform/zoom-agreeable-uniform.log
JVM Arguments: -Dgemfire.default.locators=172.17.0.2[10334]
-Dgemfire.start-dev-rest-api=false -Dgemfire.use-cluster-configuration=true
-Dgemfire.launcher.registerSignalHandlers=true -Djava.awt.headless=true
-Dsun.rmi.dgc.server.gcInterval=9223372036854775806
Class-Path:
/geode/lib/geode-core-1.10.0.jar:/geode/lib/geode-dependencies.jar

gfsh>create region --name=hello --type=REPLICATE
        Member         | Status | Message
---------------------- | ------ |
----------------------------------------------
zoom-agreeable-uniform | OK     | Region "/hello" created on
"zoom-agreeable-u..

Cluster configuration for group 'cluster' is updated.

Re: docker help

Posted by Jens Deppe <je...@apache.org>.
Thanks - I've created this Jira to fix the docs:
https://issues.apache.org/jira/browse/GEODE-7295

--Jens

On Mon, Oct 14, 2019 at 6:26 PM James Dodson <ji...@gmail.com> wrote:

> I started docker with:
> docker run -it -p 10334:10334 -p 1099:1099 -p 7070:7070 -p 8080:8080 -p
> 40404:40404 apachegeode/geode
>
> then in docker I started geode with:
> start locator --hostname-for-clients=localhost
> --jmx-manager-hostname-for-clients=localhost
> --J=-Djava.rmi.server.hostname=localhost
> start server --hostname-for-clients=localhost
>
> then I created a region.
>
> From that point, I was able to successfully run the Hello World app on the
> host.
>
> I believe the key was passing the correct flags to the start locator and
> start server commands.
>
> I was able to also achieve the same success using a docker-compose.yml by
> starting the locator and server with the correct flags.
>
> Thanks again for your help!
>
>
> On Mon, Oct 14, 2019 at 2:45 PM Jens Deppe <je...@apache.org> wrote:
>
>> Good to know. For the benefit of others treading the same path, can you
>> share how the problem was resolved?
>>
>> Thanks
>> --Jens
>>
>> On Mon, Oct 14, 2019 at 12:19 PM James Dodson <ji...@gmail.com>
>> wrote:
>>
>>> Thank you, Jens and Ajay - I have it working now
>>>
>>> On Sun, Oct 13, 2019 at 10:43 AM ajay vasudevan <
>>> vasudevan.ajay@gmail.com> wrote:
>>>
>>>> Hi Jim,
>>>>
>>>> The following commands would work for you to connect to a local geode
>>>> cluster :
>>>>
>>>> docker run --rm -it --name localhost --hostname localhost -p 8080:8080
>>>> -p 10334:10334  -p 40404:40404 -p 1099:1099 -p 7070:7070
>>>> apachegeode/geode:1.10.0
>>>>
>>>> Start locator
>>>> ==========
>>>> start locator --name=myLocator --hostname-for-clients=localhost
>>>> --log-level=config
>>>> --J='-Dgemfire.jmx-manager-hostname-for-clients=localhost'
>>>>
>>>> Start server
>>>> =========
>>>> start server --name=myServerOne --locators=localhost[10334]
>>>> --server-port=40404
>>>>
>>>> Regards,
>>>> aj-vas
>>>>
>>>> On Sat, Oct 12, 2019 at 8:07 PM Jens Deppe <je...@apache.org>
>>>> wrote:
>>>>
>>>>> Hi James,
>>>>>
>>>>> Could you clarify this:
>>>>>
>>>>>>
>>>>>> When I try to use the docker image, I get:
>>>>>> Exception in thread "main"
>>>>>> org.apache.geode.cache.client.NoAvailableServersException
>>>>>>
>>>>>>
>>>>> What are you doing when this happens? Perhaps obvious, but just to be
>>>>> clear you do need to keep the docker session running otherwise the started
>>>>> geode members will just go away when the gfsh shell exits.
>>>>>
>>>>> I think the instructions do need to be updated a bit. If you're trying
>>>>> to connect to the cluster from your host you should use the following to
>>>>> start the locator and server:
>>>>>
>>>>> start locator --hostname-for-clients=localhost
>>>>> --jmx-manager-hostname-for-clients=localhost
>>>>> --J=-Djava.rmi.server.hostname=localhost
>>>>> start server --hostname-for-clients=localhost
>>>>>
>>>>>
>>>>> Since the started cluster will be using docker non-public IPs
>>>>> (probably on a 172.17.0.0/16 subnet) any externally connecting client
>>>>> will not be able to connect directly to these addresses, but will need to
>>>>> use the localhost proxy ports as exposed by docker.
>>>>>
>>>>> --Jens
>>>>>
>>>>

Re: docker help

Posted by James Dodson <ji...@gmail.com>.
I started docker with:
docker run -it -p 10334:10334 -p 1099:1099 -p 7070:7070 -p 8080:8080 -p
40404:40404 apachegeode/geode

then in docker I started geode with:
start locator --hostname-for-clients=localhost
--jmx-manager-hostname-for-clients=localhost
--J=-Djava.rmi.server.hostname=localhost
start server --hostname-for-clients=localhost

then I created a region.

From that point, I was able to successfully run the Hello World app on the
host.

I believe the key was passing the correct flags to the start locator and
start server commands.

I was able to also achieve the same success using a docker-compose.yml by
starting the locator and server with the correct flags.

Thanks again for your help!


On Mon, Oct 14, 2019 at 2:45 PM Jens Deppe <je...@apache.org> wrote:

> Good to know. For the benefit of others treading the same path, can you
> share how the problem was resolved?
>
> Thanks
> --Jens
>
> On Mon, Oct 14, 2019 at 12:19 PM James Dodson <ji...@gmail.com> wrote:
>
>> Thank you, Jens and Ajay - I have it working now
>>
>> On Sun, Oct 13, 2019 at 10:43 AM ajay vasudevan <va...@gmail.com>
>> wrote:
>>
>>> Hi Jim,
>>>
>>> The following commands would work for you to connect to a local geode
>>> cluster :
>>>
>>> docker run --rm -it --name localhost --hostname localhost -p 8080:8080
>>> -p 10334:10334  -p 40404:40404 -p 1099:1099 -p 7070:7070
>>> apachegeode/geode:1.10.0
>>>
>>> Start locator
>>> ==========
>>> start locator --name=myLocator --hostname-for-clients=localhost
>>> --log-level=config
>>> --J='-Dgemfire.jmx-manager-hostname-for-clients=localhost'
>>>
>>> Start server
>>> =========
>>> start server --name=myServerOne --locators=localhost[10334]
>>> --server-port=40404
>>>
>>> Regards,
>>> aj-vas
>>>
>>> On Sat, Oct 12, 2019 at 8:07 PM Jens Deppe <je...@apache.org> wrote:
>>>
>>>> Hi James,
>>>>
>>>> Could you clarify this:
>>>>
>>>>>
>>>>> When I try to use the docker image, I get:
>>>>> Exception in thread "main"
>>>>> org.apache.geode.cache.client.NoAvailableServersException
>>>>>
>>>>>
>>>> What are you doing when this happens? Perhaps obvious, but just to be
>>>> clear you do need to keep the docker session running otherwise the started
>>>> geode members will just go away when the gfsh shell exits.
>>>>
>>>> I think the instructions do need to be updated a bit. If you're trying
>>>> to connect to the cluster from your host you should use the following to
>>>> start the locator and server:
>>>>
>>>> start locator --hostname-for-clients=localhost
>>>> --jmx-manager-hostname-for-clients=localhost
>>>> --J=-Djava.rmi.server.hostname=localhost
>>>> start server --hostname-for-clients=localhost
>>>>
>>>>
>>>> Since the started cluster will be using docker non-public IPs (probably
>>>> on a 172.17.0.0/16 subnet) any externally connecting client will not
>>>> be able to connect directly to these addresses, but will need to use the
>>>> localhost proxy ports as exposed by docker.
>>>>
>>>> --Jens
>>>>
>>>

Re: docker help

Posted by Jens Deppe <je...@apache.org>.
Good to know. For the benefit of others treading the same path, can you
share how the problem was resolved?

Thanks
--Jens

On Mon, Oct 14, 2019 at 12:19 PM James Dodson <ji...@gmail.com> wrote:

> Thank you, Jens and Ajay - I have it working now
>
> On Sun, Oct 13, 2019 at 10:43 AM ajay vasudevan <va...@gmail.com>
> wrote:
>
>> Hi Jim,
>>
>> The following commands would work for you to connect to a local geode
>> cluster :
>>
>> docker run --rm -it --name localhost --hostname localhost -p 8080:8080 -p
>> 10334:10334  -p 40404:40404 -p 1099:1099 -p 7070:7070
>> apachegeode/geode:1.10.0
>>
>> Start locator
>> ==========
>> start locator --name=myLocator --hostname-for-clients=localhost
>> --log-level=config
>> --J='-Dgemfire.jmx-manager-hostname-for-clients=localhost'
>>
>> Start server
>> =========
>> start server --name=myServerOne --locators=localhost[10334]
>> --server-port=40404
>>
>> Regards,
>> aj-vas
>>
>> On Sat, Oct 12, 2019 at 8:07 PM Jens Deppe <je...@apache.org> wrote:
>>
>>> Hi James,
>>>
>>> Could you clarify this:
>>>
>>>>
>>>> When I try to use the docker image, I get:
>>>> Exception in thread "main"
>>>> org.apache.geode.cache.client.NoAvailableServersException
>>>>
>>>>
>>> What are you doing when this happens? Perhaps obvious, but just to be
>>> clear you do need to keep the docker session running otherwise the started
>>> geode members will just go away when the gfsh shell exits.
>>>
>>> I think the instructions do need to be updated a bit. If you're trying
>>> to connect to the cluster from your host you should use the following to
>>> start the locator and server:
>>>
>>> start locator --hostname-for-clients=localhost
>>> --jmx-manager-hostname-for-clients=localhost
>>> --J=-Djava.rmi.server.hostname=localhost
>>> start server --hostname-for-clients=localhost
>>>
>>>
>>> Since the started cluster will be using docker non-public IPs (probably
>>> on a 172.17.0.0/16 subnet) any externally connecting client will not be
>>> able to connect directly to these addresses, but will need to use the
>>> localhost proxy ports as exposed by docker.
>>>
>>> --Jens
>>>
>>

Re: docker help

Posted by James Dodson <ji...@gmail.com>.
Thank you, Jens and Ajay - I have it working now

On Sun, Oct 13, 2019 at 10:43 AM ajay vasudevan <va...@gmail.com>
wrote:

> Hi Jim,
>
> The following commands would work for you to connect to a local geode
> cluster :
>
> docker run --rm -it --name localhost --hostname localhost -p 8080:8080 -p
> 10334:10334  -p 40404:40404 -p 1099:1099 -p 7070:7070
> apachegeode/geode:1.10.0
>
> Start locator
> ==========
> start locator --name=myLocator --hostname-for-clients=localhost
> --log-level=config
> --J='-Dgemfire.jmx-manager-hostname-for-clients=localhost'
>
> Start server
> =========
> start server --name=myServerOne --locators=localhost[10334]
> --server-port=40404
>
> Regards,
> aj-vas
>
> On Sat, Oct 12, 2019 at 8:07 PM Jens Deppe <je...@apache.org> wrote:
>
>> Hi James,
>>
>> Could you clarify this:
>>
>>>
>>> When I try to use the docker image, I get:
>>> Exception in thread "main"
>>> org.apache.geode.cache.client.NoAvailableServersException
>>>
>>>
>> What are you doing when this happens? Perhaps obvious, but just to be
>> clear you do need to keep the docker session running otherwise the started
>> geode members will just go away when the gfsh shell exits.
>>
>> I think the instructions do need to be updated a bit. If you're trying to
>> connect to the cluster from your host you should use the following to start
>> the locator and server:
>>
>> start locator --hostname-for-clients=localhost
>> --jmx-manager-hostname-for-clients=localhost
>> --J=-Djava.rmi.server.hostname=localhost
>> start server --hostname-for-clients=localhost
>>
>>
>> Since the started cluster will be using docker non-public IPs (probably
>> on a 172.17.0.0/16 subnet) any externally connecting client will not be
>> able to connect directly to these addresses, but will need to use the
>> localhost proxy ports as exposed by docker.
>>
>> --Jens
>>
>

Re: docker help

Posted by ajay vasudevan <va...@gmail.com>.
Hi Jim,

The following commands would work for you to connect to a local geode
cluster :

docker run --rm -it --name localhost --hostname localhost -p 8080:8080 -p
10334:10334  -p 40404:40404 -p 1099:1099 -p 7070:7070
apachegeode/geode:1.10.0

Start locator
==========
start locator --name=myLocator --hostname-for-clients=localhost
--log-level=config
--J='-Dgemfire.jmx-manager-hostname-for-clients=localhost'

Start server
=========
start server --name=myServerOne --locators=localhost[10334]
--server-port=40404

Regards,
aj-vas

On Sat, Oct 12, 2019 at 8:07 PM Jens Deppe <je...@apache.org> wrote:

> Hi James,
>
> Could you clarify this:
>
>>
>> When I try to use the docker image, I get:
>> Exception in thread "main"
>> org.apache.geode.cache.client.NoAvailableServersException
>>
>>
> What are you doing when this happens? Perhaps obvious, but just to be
> clear you do need to keep the docker session running otherwise the started
> geode members will just go away when the gfsh shell exits.
>
> I think the instructions do need to be updated a bit. If you're trying to
> connect to the cluster from your host you should use the following to start
> the locator and server:
>
> start locator --hostname-for-clients=localhost
> --jmx-manager-hostname-for-clients=localhost
> --J=-Djava.rmi.server.hostname=localhost
> start server --hostname-for-clients=localhost
>
>
> Since the started cluster will be using docker non-public IPs (probably on
> a 172.17.0.0/16 subnet) any externally connecting client will not be able
> to connect directly to these addresses, but will need to use the localhost
> proxy ports as exposed by docker.
>
> --Jens
>

Re: docker help

Posted by Jens Deppe <je...@apache.org>.
Hi James,

Could you clarify this:

>
> When I try to use the docker image, I get:
> Exception in thread "main"
> org.apache.geode.cache.client.NoAvailableServersException
>
>
What are you doing when this happens? Perhaps obvious, but just to be clear
you do need to keep the docker session running otherwise the started geode
members will just go away when the gfsh shell exits.

I think the instructions do need to be updated a bit. If you're trying to
connect to the cluster from your host you should use the following to start
the locator and server:

start locator --hostname-for-clients=localhost
--jmx-manager-hostname-for-clients=localhost
--J=-Djava.rmi.server.hostname=localhost
start server --hostname-for-clients=localhost


Since the started cluster will be using docker non-public IPs (probably on
a 172.17.0.0/16 subnet) any externally connecting client will not be able
to connect directly to these addresses, but will need to use the localhost
proxy ports as exposed by docker.

--Jens