[ 
https://issues.apache.org/jira/browse/GEODE-1548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15925182#comment-15925182
 ] 

Swapnil Bawaskar commented on GEODE-1548:
-----------------------------------------

I tried to connect to a locator on AWS using the below command:
{noformat}
gfsh>start locator --name=loc1 
--J=-Djmx-manager-hostname-for-clients=52.35.218.38 
--J=-Djava.rmi.server.hostname=52.35.218.38
{noformat}
But the gfsh connection from my laptop timed out:
{noformat}
gfsh>connect --locator=52.35.218.38[10334]
Connecting to Locator at [host=52.35.218.38, port=10334] ..
Connecting to Manager at [host=172.31.24.20, port=1099] ..
Could not connect to : [host=172.31.24.20, port=1099]. Failed to retrieve 
RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is 
java.rmi.ConnectException: Connection refused to host: 172.31.24.20; nested 
exception is:
    java.net.ConnectException: Operation timed out]
{noformat}

However, when I tried to using --jmx-manager, I was able to connect:
{noformat}
gfsh>connect --jmx-manager=52.35.218.38[1099]
Connecting to Manager at [host=52.35.218.38, port=1099] ..
Successfully connected to: [host=52.35.218.38, port=1099]
{noformat}
I should have been able to connect using --locator as well.

> jmx-manager-hostname-for-clients not honored
> --------------------------------------------
>
>                 Key: GEODE-1548
>                 URL: https://issues.apache.org/jira/browse/GEODE-1548
>             Project: Geode
>          Issue Type: Bug
>          Components: gfsh, management
>            Reporter: Swapnil Bawaskar
>            Assignee: Jared Stewart
>             Fix For: 1.0.0-incubating
>
>
> While running Geode on AWS, found that {{jmx-manager-hostname-for-clients}} 
> is not being honored resulting in not being able to connect to gfsh from 
> outside AWS.
> I started a locator in AWS with the following command:
> {noformat}
> gfsh>start locator --name=locator 
> --J=-Dgemfire.jmx-manager-hostname-for-clients=<public_ip> 
> --hostname-for-clients=<public_ip>
> {noformat}
> When trying to connect to this locator from my laptop I get the following 
> error:
> {noformat}
> gfsh>connect --locator=52.41.104.182[10334]
> Connecting to Locator at [host=52.41.104.182, port=10334] ..
> Connecting to Manager at 
> [host=ec2-52-41-104-182.us-west-2.compute.amazonaws.com, port=1099] ..
> Could not connect to : 
> [host=ec2-52-41-104-182.us-west-2.compute.amazonaws.com, port=1099]. Failed 
> to retrieve RMIServer stub: javax.naming.CommunicationException [Root 
> exception is java.rmi.ConnectIOException: error during JRMP connection 
> establishment; nested exception is:
>     java.net.SocketException: Connection reset]
> {noformat}
> Note that gfsh is trying to connect to the public dns for the instance, not 
> using the {{jmx-manager-hostname-for-clients}} property provided.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to