geode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luke Shannon <lshan...@pivotal.io>
Subject Re: Setup Geode cluster in GCP/AWS and connect it from local laptop
Date Mon, 23 Jul 2018 03:21:02 GMT
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 <urangwani780@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 <lshannon@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/

Mime
View raw message