You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geode.apache.org by Upasana Rangwani <ur...@gmail.com> on 2018/07/22 19:33:24 UTC

Setup Geode cluster in GCP/AWS and connect it from local laptop

Hello,

I am new to Geode and exploring K-V NoSQL to use it for a caching layer for
out product.

I have setup 2 nodes Geode cluster in GCP and trying to connect it
programatically (Java client) from my local laptop but having a following
error,


Exception in thread "main"
org.apache.geode.cache.client.NoAvailableLocatorsException: Unable to
connect to any locators in the list [LocatorAddress
[socketInetAddress=71.251.200.35.bc.googleusercontent.com/35.200.251.71:10334,
hostname=35.200.251.71, isIpString=true]]
    at org.apache.geode.cache.client.internal.AutoConnectionSourceImpl.findServer(AutoConnectionSourceImpl.java:169)
    at org.apache.geode.cache.client.internal.ConnectionFactoryImpl.createClientToServerConnection(ConnectionFactoryImpl.java:235)

Geode cluster is formed using internal IPs and i am trying to connect
locator using public IP of the node (35.200.251.71). I have also tried
--bind-address and --hostname-for-clients options while starting
servers/locator, but not able to connect.

Can anyone guide how can i connect (Java client/ gfsh) to a cluster setup
in cloud platform (GCP, AWS)..?

-Upasana.

Re: Setup Geode cluster in GCP/AWS and connect it from local laptop

Posted by Luke Shannon <ls...@pivotal.io>.
This code does pretty much what John said. I picked Super CSV because it
had a way to map positions in the CSV to attributes in a Pojo.

Mapping the values to attributes:
* nameMapping = new String[]{"stockOnHand","wholeSalePrice","brand","type",
"color", "size", "gender", "id"};*
* processors = new CellProcessor[] { *
*new ParseInt(),//stockOnHand*
*new ParseDouble(),//wholeSalePrice*
*new NotNull(),//brand*
*new NotNull(),//type*
*new NotNull(),//color*
*new ParseDouble(),//size*
*new NotNull(),//gender*
*new NotNull()//productId*
* };*
* loadProducts("products.csv",nameMapping,processors);*

When putting into the Region, I used the Spring Data Repository. To improve
performance I did the puts in batches:



*private void loadProducts(String file, String[] nameMapping,
CellProcessor[] processors) { System.out.println("Started loading the
products"); initalizeBeanReader(file); Product prod; List<Product>
productPuts = new ArrayList<Product>(); int prodCount = 0; try { while
((prod = beanReader.read(Product.class, nameMapping,processors)) != null) {
productPuts.add(prod); prodCount++; if (productPuts.size() % 10 == 0) {
productRepository.save(productPuts); productPuts.clear(); } } } catch
(IOException e) { errorLog.add(e.toString()); } }*

Re: Setup Geode cluster in GCP/AWS and connect it from local laptop

Posted by John Blum <jb...@pivotal.io>.
You can use Apache POI API (https://poi.apache.org/) to read a MS Excel
document, construct an object from the Excel data and then store the object
in Geode.

On Sat, Jul 28, 2018 at 5:45 AM, Luke Shannon <ls...@pivotal.io> wrote:

> This loads several csv into geode:
>
> https://github.com/Pivotal-Open-Source-Hub/geode-demo-
> application/blob/master/FastFootShoesHistoricDataLoader/src/main/java/
> FastFootShoesHistoricDataLoader/CacheLoader.java
>
> On Sat, Jul 28, 2018, 4:11 AM Upasana Rangwani, <ur...@gmail.com>
> wrote:
>
>> Thanks Luke for your reply. I could able to connect the GCP cluster.
>>
>> Next step for me is to load (excel file) CSV data into region. Can anyone
>> let me know if there is any existing utility exist or some reference around
>> this.
>>
>> Thanks in advance.
>>
>> -Upasana.
>>
>> On Mon, Jul 23, 2018 at 8:51 AM, Luke Shannon <ls...@pivotal.io>
>> wrote:
>>
>>> Below are my scripts. Its been a while since I ran this, but I think I
>>> was using Public IP where the variables are in the script.
>>>
>>> gfsh -e "start locator \
>>> --name=$NAME \
>>> --dir=$SERVER_DIR_LOCATION/$LOCATOR_NAME \
>>> --enable-cluster-configuration = false \
>>> --J=-Dgemfire.locators=$2[$LOCATOR_PORT],$3[$LOCATOR_PORT] \
>>> --J=-Dgemfire.hostname-for-clients=$1 \
>>> --J=-Dgemfire.port=$LOCATOR_PORT \
>>> --J=-Dgemfire.jmx-manager=true \
>>> --J=-Dgemfire.jmx-manager-start=true \
>>> --J=-Dgemfire.java.rmi.server.hostname=$1 \
>>> --J=-Dgemfire.jmx-manager-hostname-for-clients=$1 \
>>> --J=-Xms1g --J=-Xmx1g \
>>> --J=-XX:+PrintFlagsFinal \
>>> --J=-Dgemfire.log-level=error"
>>>
>>> Here is my start server:
>>>
>>> gfsh -e "start server \
>>> --name=$NAME \
>>> --classpath=$CLASSPATH \
>>> --cache-xml-file=$CONF_DIR/cache.xml \
>>> --properties-file=$CONF_DIR/geode.properties \
>>> --use-cluster-configuration=false \
>>> --dir=$SERVER_DIR_LOCATION/$SERVER_NAME \
>>> --J=-Dgemfire.locators=$2[$LOCATOR_PORT],$3[$LOCATOR_PORT],$4[
>>> $LOCATOR_PORT] \
>>> --J=-Xms$SERVER_HEAP \
>>> --J=-Xmx$SERVER_HEAP \
>>> --J=-XX:+PrintFlagsFinal"
>>>
>>> On Sun, Jul 22, 2018 at 8:56 PM Upasana Rangwani <ur...@gmail.com>
>>> wrote:
>>>
>>>> Luke, Thanks for your quick reply. I will change /etc/host files and
>>>> give a try.
>>>>
>>>> It would be great help if you share start locator and start server(s)
>>>> commands, I am not sure after changing /etc/host file, do i need to use *--bind-address,
>>>> --hostname-for-clients* options..? and if so what should be its value,
>>>> internal IP or public IP? so external Java client/gfsh can connect to it.
>>>>
>>>> -Upasana.
>>>>
>>>> On Mon, Jul 23, 2018 at 3:16 AM, Luke Shannon <ls...@pivotal.io>
>>>> wrote:
>>>>
>>>>> You need to set the /etc/host files to have the private IP, public IP
>>>>> and Hostname of all the members in the cluster. See the 'remote' section of
>>>>> this ReadMe:
>>>>> https://github.com/lshannon/geode-aws-deployment-scripts/
>>>>> blob/master/README.md
>>>>>
>>>>> On Sun, Jul 22, 2018, 3:33 PM Upasana Rangwani, <
>>>>> urangwani780@gmail.com> wrote:
>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> I am new to Geode and exploring K-V NoSQL to use it for a caching
>>>>>> layer for out product.
>>>>>>
>>>>>> I have setup 2 nodes Geode cluster in GCP and trying to connect it
>>>>>> programatically (Java client) from my local laptop but having a following
>>>>>> error,
>>>>>>
>>>>>>
>>>>>> Exception in thread "main" org.apache.geode.cache.client.NoAvailableLocatorsException: Unable to connect to any locators in the list [LocatorAddress [socketInetAddress=71.251.200.35.bc.googleusercontent.com/35.200.251.71:10334, hostname=35.200.251.71, isIpString=true]]
>>>>>>     at org.apache.geode.cache.client.internal.AutoConnectionSourceImpl.findServer(AutoConnectionSourceImpl.java:169)
>>>>>>     at org.apache.geode.cache.client.internal.ConnectionFactoryImpl.createClientToServerConnection(ConnectionFactoryImpl.java:235)
>>>>>>
>>>>>> Geode cluster is formed using internal IPs and i am trying to connect
>>>>>> locator using public IP of the node (35.200.251.71). I have also
>>>>>> tried --bind-address and --hostname-for-clients options while starting
>>>>>> servers/locator, but not able to connect.
>>>>>>
>>>>>> Can anyone guide how can i connect (Java client/ gfsh) to a cluster
>>>>>> setup in cloud platform (GCP, AWS)..?
>>>>>>
>>>>>> -Upasana.
>>>>>>
>>>>>
>>>>
>>>
>>> --
>>> Luke Shannon | Platform Engineering | Pivotal
>>> ------------------------------------------------------------
>>> -------------
>>>
>>> Mobile:416-571-9495
>>> twitter: @lukewshannon
>>>
>>> Join the Toronto Pivotal Usergroup: http://www.meetup.
>>> com/Toronto-Pivotal-User-Group/
>>>
>>> Join the Ottawa Pivotal Usergroup: https://www.meetup.
>>> com/Ottawa-Pivotal-User-Group/
>>>
>>
>>


-- 
-John
john.blum10101 (skype)

Re: Setup Geode cluster in GCP/AWS and connect it from local laptop

Posted by Luke Shannon <ls...@pivotal.io>.
This loads several csv into geode:

https://github.com/Pivotal-Open-Source-Hub/geode-demo-application/blob/master/FastFootShoesHistoricDataLoader/src/main/java/FastFootShoesHistoricDataLoader/CacheLoader.java

On Sat, Jul 28, 2018, 4:11 AM Upasana Rangwani, <ur...@gmail.com>
wrote:

> Thanks Luke for your reply. I could able to connect the GCP cluster.
>
> Next step for me is to load (excel file) CSV data into region. Can anyone
> let me know if there is any existing utility exist or some reference around
> this.
>
> Thanks in advance.
>
> -Upasana.
>
> On Mon, Jul 23, 2018 at 8:51 AM, Luke Shannon <ls...@pivotal.io> wrote:
>
>> Below are my scripts. Its been a while since I ran this, but I think I
>> was using Public IP where the variables are in the script.
>>
>> gfsh -e "start locator \
>> --name=$NAME \
>> --dir=$SERVER_DIR_LOCATION/$LOCATOR_NAME \
>> --enable-cluster-configuration = false \
>> --J=-Dgemfire.locators=$2[$LOCATOR_PORT],$3[$LOCATOR_PORT] \
>> --J=-Dgemfire.hostname-for-clients=$1 \
>> --J=-Dgemfire.port=$LOCATOR_PORT \
>> --J=-Dgemfire.jmx-manager=true \
>> --J=-Dgemfire.jmx-manager-start=true \
>> --J=-Dgemfire.java.rmi.server.hostname=$1 \
>> --J=-Dgemfire.jmx-manager-hostname-for-clients=$1 \
>> --J=-Xms1g --J=-Xmx1g \
>> --J=-XX:+PrintFlagsFinal \
>> --J=-Dgemfire.log-level=error"
>>
>> Here is my start server:
>>
>> gfsh -e "start server \
>> --name=$NAME \
>> --classpath=$CLASSPATH \
>> --cache-xml-file=$CONF_DIR/cache.xml \
>> --properties-file=$CONF_DIR/geode.properties \
>> --use-cluster-configuration=false \
>> --dir=$SERVER_DIR_LOCATION/$SERVER_NAME \
>> --J=-Dgemfire.locators=$2[$LOCATOR_PORT],$3[$LOCATOR_PORT],$4[
>> $LOCATOR_PORT] \
>> --J=-Xms$SERVER_HEAP \
>> --J=-Xmx$SERVER_HEAP \
>> --J=-XX:+PrintFlagsFinal"
>>
>> On Sun, Jul 22, 2018 at 8:56 PM Upasana Rangwani <ur...@gmail.com>
>> wrote:
>>
>>> Luke, Thanks for your quick reply. I will change /etc/host files and
>>> give a try.
>>>
>>> It would be great help if you share start locator and start server(s)
>>> commands, I am not sure after changing /etc/host file, do i need to use *--bind-address,
>>> --hostname-for-clients* options..? and if so what should be its value,
>>> internal IP or public IP? so external Java client/gfsh can connect to it.
>>>
>>> -Upasana.
>>>
>>> On Mon, Jul 23, 2018 at 3:16 AM, Luke Shannon <ls...@pivotal.io>
>>> wrote:
>>>
>>>> You need to set the /etc/host files to have the private IP, public IP
>>>> and Hostname of all the members in the cluster. See the 'remote' section of
>>>> this ReadMe:
>>>>
>>>> https://github.com/lshannon/geode-aws-deployment-scripts/blob/master/README.md
>>>>
>>>> On Sun, Jul 22, 2018, 3:33 PM Upasana Rangwani, <ur...@gmail.com>
>>>> wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> I am new to Geode and exploring K-V NoSQL to use it for a caching
>>>>> layer for out product.
>>>>>
>>>>> I have setup 2 nodes Geode cluster in GCP and trying to connect it
>>>>> programatically (Java client) from my local laptop but having a following
>>>>> error,
>>>>>
>>>>>
>>>>> Exception in thread "main" org.apache.geode.cache.client.NoAvailableLocatorsException: Unable to connect to any locators in the list [LocatorAddress [socketInetAddress=71.251.200.35.bc.googleusercontent.com/35.200.251.71:10334, hostname=35.200.251.71, isIpString=true]]
>>>>>     at org.apache.geode.cache.client.internal.AutoConnectionSourceImpl.findServer(AutoConnectionSourceImpl.java:169)
>>>>>     at org.apache.geode.cache.client.internal.ConnectionFactoryImpl.createClientToServerConnection(ConnectionFactoryImpl.java:235)
>>>>>
>>>>> Geode cluster is formed using internal IPs and i am trying to connect
>>>>> locator using public IP of the node (35.200.251.71). I have also
>>>>> tried --bind-address and --hostname-for-clients options while starting
>>>>> servers/locator, but not able to connect.
>>>>>
>>>>> Can anyone guide how can i connect (Java client/ gfsh) to a cluster
>>>>> setup in cloud platform (GCP, AWS)..?
>>>>>
>>>>> -Upasana.
>>>>>
>>>>
>>>
>>
>> --
>> Luke Shannon | Platform Engineering | Pivotal
>> -------------------------------------------------------------------------
>>
>> Mobile:416-571-9495
>> twitter: @lukewshannon
>>
>> Join the Toronto Pivotal Usergroup:
>> http://www.meetup.com/Toronto-Pivotal-User-Group/
>>
>> Join the Ottawa Pivotal Usergroup:
>> https://www.meetup.com/Ottawa-Pivotal-User-Group/
>>
>
>

Re: Setup Geode cluster in GCP/AWS and connect it from local laptop

Posted by Upasana Rangwani <ur...@gmail.com>.
Thanks Luke for your reply. I could able to connect the GCP cluster.

Next step for me is to load (excel file) CSV data into region. Can anyone
let me know if there is any existing utility exist or some reference around
this.

Thanks in advance.

-Upasana.

On Mon, Jul 23, 2018 at 8:51 AM, Luke Shannon <ls...@pivotal.io> wrote:

> Below are my scripts. Its been a while since I ran this, but I think I was
> using Public IP where the variables are in the script.
>
> gfsh -e "start locator \
> --name=$NAME \
> --dir=$SERVER_DIR_LOCATION/$LOCATOR_NAME \
> --enable-cluster-configuration = false \
> --J=-Dgemfire.locators=$2[$LOCATOR_PORT],$3[$LOCATOR_PORT] \
> --J=-Dgemfire.hostname-for-clients=$1 \
> --J=-Dgemfire.port=$LOCATOR_PORT \
> --J=-Dgemfire.jmx-manager=true \
> --J=-Dgemfire.jmx-manager-start=true \
> --J=-Dgemfire.java.rmi.server.hostname=$1 \
> --J=-Dgemfire.jmx-manager-hostname-for-clients=$1 \
> --J=-Xms1g --J=-Xmx1g \
> --J=-XX:+PrintFlagsFinal \
> --J=-Dgemfire.log-level=error"
>
> Here is my start server:
>
> gfsh -e "start server \
> --name=$NAME \
> --classpath=$CLASSPATH \
> --cache-xml-file=$CONF_DIR/cache.xml \
> --properties-file=$CONF_DIR/geode.properties \
> --use-cluster-configuration=false \
> --dir=$SERVER_DIR_LOCATION/$SERVER_NAME \
> --J=-Dgemfire.locators=$2[$LOCATOR_PORT],$3[$LOCATOR_PORT],$4[
> $LOCATOR_PORT] \
> --J=-Xms$SERVER_HEAP \
> --J=-Xmx$SERVER_HEAP \
> --J=-XX:+PrintFlagsFinal"
>
> On Sun, Jul 22, 2018 at 8:56 PM Upasana Rangwani <ur...@gmail.com>
> wrote:
>
>> Luke, Thanks for your quick reply. I will change /etc/host files and give
>> a try.
>>
>> It would be great help if you share start locator and start server(s)
>> commands, I am not sure after changing /etc/host file, do i need to use *--bind-address,
>> --hostname-for-clients* options..? and if so what should be its value,
>> internal IP or public IP? so external Java client/gfsh can connect to it.
>>
>> -Upasana.
>>
>> On Mon, Jul 23, 2018 at 3:16 AM, Luke Shannon <ls...@pivotal.io>
>> wrote:
>>
>>> You need to set the /etc/host files to have the private IP, public IP
>>> and Hostname of all the members in the cluster. See the 'remote' section of
>>> this ReadMe:
>>> https://github.com/lshannon/geode-aws-deployment-scripts/
>>> blob/master/README.md
>>>
>>> On Sun, Jul 22, 2018, 3:33 PM Upasana Rangwani, <ur...@gmail.com>
>>> wrote:
>>>
>>>> Hello,
>>>>
>>>> I am new to Geode and exploring K-V NoSQL to use it for a caching layer
>>>> for out product.
>>>>
>>>> I have setup 2 nodes Geode cluster in GCP and trying to connect it
>>>> programatically (Java client) from my local laptop but having a following
>>>> error,
>>>>
>>>>
>>>> Exception in thread "main" org.apache.geode.cache.client.NoAvailableLocatorsException: Unable to connect to any locators in the list [LocatorAddress [socketInetAddress=71.251.200.35.bc.googleusercontent.com/35.200.251.71:10334, hostname=35.200.251.71, isIpString=true]]
>>>>     at org.apache.geode.cache.client.internal.AutoConnectionSourceImpl.findServer(AutoConnectionSourceImpl.java:169)
>>>>     at org.apache.geode.cache.client.internal.ConnectionFactoryImpl.createClientToServerConnection(ConnectionFactoryImpl.java:235)
>>>>
>>>> Geode cluster is formed using internal IPs and i am trying to connect
>>>> locator using public IP of the node (35.200.251.71). I have also tried
>>>> --bind-address and --hostname-for-clients options while starting
>>>> servers/locator, but not able to connect.
>>>>
>>>> Can anyone guide how can i connect (Java client/ gfsh) to a cluster
>>>> setup in cloud platform (GCP, AWS)..?
>>>>
>>>> -Upasana.
>>>>
>>>
>>
>
> --
> Luke Shannon | Platform Engineering | Pivotal
> -------------------------------------------------------------------------
>
> Mobile:416-571-9495
> twitter: @lukewshannon
>
> Join the Toronto Pivotal Usergroup: http://www.meetup.
> com/Toronto-Pivotal-User-Group/
>
> Join the Ottawa Pivotal Usergroup: https://www.meetup.
> com/Ottawa-Pivotal-User-Group/
>

Re: Setup Geode cluster in GCP/AWS and connect it from local laptop

Posted by Luke Shannon <ls...@pivotal.io>.
Below are my scripts. Its been a while since I ran this, but I think I was
using Public IP where the variables are in the script.

gfsh -e "start locator \
--name=$NAME \
--dir=$SERVER_DIR_LOCATION/$LOCATOR_NAME \
--enable-cluster-configuration = false \
--J=-Dgemfire.locators=$2[$LOCATOR_PORT],$3[$LOCATOR_PORT] \
--J=-Dgemfire.hostname-for-clients=$1 \
--J=-Dgemfire.port=$LOCATOR_PORT \
--J=-Dgemfire.jmx-manager=true \
--J=-Dgemfire.jmx-manager-start=true \
--J=-Dgemfire.java.rmi.server.hostname=$1 \
--J=-Dgemfire.jmx-manager-hostname-for-clients=$1 \
--J=-Xms1g --J=-Xmx1g \
--J=-XX:+PrintFlagsFinal \
--J=-Dgemfire.log-level=error"

Here is my start server:

gfsh -e "start server \
--name=$NAME \
--classpath=$CLASSPATH \
--cache-xml-file=$CONF_DIR/cache.xml \
--properties-file=$CONF_DIR/geode.properties \
--use-cluster-configuration=false \
--dir=$SERVER_DIR_LOCATION/$SERVER_NAME \
--J=-Dgemfire.locators=$2[$LOCATOR_PORT],$3[$LOCATOR_PORT],$4[$LOCATOR_PORT]
\
--J=-Xms$SERVER_HEAP \
--J=-Xmx$SERVER_HEAP \
--J=-XX:+PrintFlagsFinal"

On Sun, Jul 22, 2018 at 8:56 PM Upasana Rangwani <ur...@gmail.com>
wrote:

> Luke, Thanks for your quick reply. I will change /etc/host files and give
> a try.
>
> It would be great help if you share start locator and start server(s)
> commands, I am not sure after changing /etc/host file, do i need to use *--bind-address,
> --hostname-for-clients* options..? and if so what should be its value,
> internal IP or public IP? so external Java client/gfsh can connect to it.
>
> -Upasana.
>
> On Mon, Jul 23, 2018 at 3:16 AM, Luke Shannon <ls...@pivotal.io> wrote:
>
>> You need to set the /etc/host files to have the private IP, public IP and
>> Hostname of all the members in the cluster. See the 'remote' section of
>> this ReadMe:
>>
>> https://github.com/lshannon/geode-aws-deployment-scripts/blob/master/README.md
>>
>> On Sun, Jul 22, 2018, 3:33 PM Upasana Rangwani, <ur...@gmail.com>
>> wrote:
>>
>>> Hello,
>>>
>>> I am new to Geode and exploring K-V NoSQL to use it for a caching layer
>>> for out product.
>>>
>>> I have setup 2 nodes Geode cluster in GCP and trying to connect it
>>> programatically (Java client) from my local laptop but having a following
>>> error,
>>>
>>>
>>> Exception in thread "main" org.apache.geode.cache.client.NoAvailableLocatorsException: Unable to connect to any locators in the list [LocatorAddress [socketInetAddress=71.251.200.35.bc.googleusercontent.com/35.200.251.71:10334, hostname=35.200.251.71, isIpString=true]]
>>>     at org.apache.geode.cache.client.internal.AutoConnectionSourceImpl.findServer(AutoConnectionSourceImpl.java:169)
>>>     at org.apache.geode.cache.client.internal.ConnectionFactoryImpl.createClientToServerConnection(ConnectionFactoryImpl.java:235)
>>>
>>> Geode cluster is formed using internal IPs and i am trying to connect
>>> locator using public IP of the node (35.200.251.71). I have also tried
>>> --bind-address and --hostname-for-clients options while starting
>>> servers/locator, but not able to connect.
>>>
>>> Can anyone guide how can i connect (Java client/ gfsh) to a cluster
>>> setup in cloud platform (GCP, AWS)..?
>>>
>>> -Upasana.
>>>
>>
>

-- 
Luke Shannon | Platform Engineering | Pivotal
-------------------------------------------------------------------------

Mobile:416-571-9495
twitter: @lukewshannon

Join the Toronto Pivotal Usergroup:
http://www.meetup.com/Toronto-Pivotal-User-Group/

Join the Ottawa Pivotal Usergroup:
https://www.meetup.com/Ottawa-Pivotal-User-Group/

Re: Setup Geode cluster in GCP/AWS and connect it from local laptop

Posted by Upasana Rangwani <ur...@gmail.com>.
Luke, Thanks for your quick reply. I will change /etc/host files and give a
try.

It would be great help if you share start locator and start server(s)
commands, I am not sure after changing /etc/host file, do i need to
use *--bind-address,
--hostname-for-clients* options..? and if so what should be its value,
internal IP or public IP? so external Java client/gfsh can connect to it.

-Upasana.

On Mon, Jul 23, 2018 at 3:16 AM, Luke Shannon <ls...@pivotal.io> wrote:

> You need to set the /etc/host files to have the private IP, public IP and
> Hostname of all the members in the cluster. See the 'remote' section of
> this ReadMe:
> https://github.com/lshannon/geode-aws-deployment-scripts/
> blob/master/README.md
>
> On Sun, Jul 22, 2018, 3:33 PM Upasana Rangwani, <ur...@gmail.com>
> wrote:
>
>> Hello,
>>
>> I am new to Geode and exploring K-V NoSQL to use it for a caching layer
>> for out product.
>>
>> I have setup 2 nodes Geode cluster in GCP and trying to connect it
>> programatically (Java client) from my local laptop but having a following
>> error,
>>
>>
>> Exception in thread "main" org.apache.geode.cache.client.NoAvailableLocatorsException: Unable to connect to any locators in the list [LocatorAddress [socketInetAddress=71.251.200.35.bc.googleusercontent.com/35.200.251.71:10334, hostname=35.200.251.71, isIpString=true]]
>>     at org.apache.geode.cache.client.internal.AutoConnectionSourceImpl.findServer(AutoConnectionSourceImpl.java:169)
>>     at org.apache.geode.cache.client.internal.ConnectionFactoryImpl.createClientToServerConnection(ConnectionFactoryImpl.java:235)
>>
>> Geode cluster is formed using internal IPs and i am trying to connect
>> locator using public IP of the node (35.200.251.71). I have also tried
>> --bind-address and --hostname-for-clients options while starting
>> servers/locator, but not able to connect.
>>
>> Can anyone guide how can i connect (Java client/ gfsh) to a cluster setup
>> in cloud platform (GCP, AWS)..?
>>
>> -Upasana.
>>
>

Re: Setup Geode cluster in GCP/AWS and connect it from local laptop

Posted by Luke Shannon <ls...@pivotal.io>.
You need to set the /etc/host files to have the private IP, public IP and
Hostname of all the members in the cluster. See the 'remote' section of
this ReadMe:
https://github.com/lshannon/geode-aws-deployment-scripts/blob/master/README.md

On Sun, Jul 22, 2018, 3:33 PM Upasana Rangwani, <ur...@gmail.com>
wrote:

> Hello,
>
> I am new to Geode and exploring K-V NoSQL to use it for a caching layer
> for out product.
>
> I have setup 2 nodes Geode cluster in GCP and trying to connect it
> programatically (Java client) from my local laptop but having a following
> error,
>
>
> Exception in thread "main" org.apache.geode.cache.client.NoAvailableLocatorsException: Unable to connect to any locators in the list [LocatorAddress [socketInetAddress=71.251.200.35.bc.googleusercontent.com/35.200.251.71:10334, hostname=35.200.251.71, isIpString=true]]
>     at org.apache.geode.cache.client.internal.AutoConnectionSourceImpl.findServer(AutoConnectionSourceImpl.java:169)
>     at org.apache.geode.cache.client.internal.ConnectionFactoryImpl.createClientToServerConnection(ConnectionFactoryImpl.java:235)
>
> Geode cluster is formed using internal IPs and i am trying to connect
> locator using public IP of the node (35.200.251.71). I have also tried
> --bind-address and --hostname-for-clients options while starting
> servers/locator, but not able to connect.
>
> Can anyone guide how can i connect (Java client/ gfsh) to a cluster setup
> in cloud platform (GCP, AWS)..?
>
> -Upasana.
>