[
https://issues.apache.org/jira/browse/GEODE-9880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17460501#comment-17460501
]
Tigran Ghahramanyan commented on GEODE-9880:
--------------------------------------------
Update on _builder.setHostnameForClients();_
in IPv6 environment setting the ip address as "host name for clients" fails
with the following error when starting the locator.
This must be because of the ':' symbols from the ip address, that are not
allowed as part of a host names.
_2021/12/15 09:43:44 | INFO | jvm 1 | 2021-12-15T09:43:44,822+0000 ERROR
[Thread-1 tid=10] com.vmware.vcops.federation.GemfireWrapperMain.run - Failed
to start gemfire locator, reason is IllegalArgumentException: Contains non-LDH
ASCII characters_
_2021/12/15 09:43:44 | INFO | jvm 1 | java.lang.IllegalArgumentException:
Contains non-LDH ASCII characters_
_2021/12/15 09:43:44 | INFO | jvm 1 | at
java.net.IDN.toASCIIInternal(IDN.java:296)_
_2021/12/15 09:43:44 | INFO | jvm 1 | at
java.net.IDN.toASCII(IDN.java:122)_
_2021/12/15 09:43:44 | INFO | jvm 1 | at
javax.net.ssl.SNIHostName.<init>(SNIHostName.java:99)_
_2021/12/15 09:43:44 | INFO | jvm 1 | at
org.apache.geode.internal.net.SocketCreator.setServerNames(SocketCreator.java:793)_
_2021/12/15 09:43:44 | INFO | jvm 1 | at
org.apache.geode.internal.net.SocketCreator.configureClientSSLSocket(SocketCreator.java:961)_
_2021/12/15 09:43:44 | INFO | jvm 1 | at
org.apache.geode.internal.net.SocketCreator.connect(SocketCreator.java:702)_
_2021/12/15 09:43:44 | INFO | jvm 1 | at
org.apache.geode.distributed.internal.tcpserver.TcpSocketCreatorImpl.connect(TcpSocketCreatorImpl.java:165)_
_2021/12/15 09:43:44 | INFO | jvm 1 | at
org.apache.geode.distributed.internal.tcpserver.TcpClient.getServerVersion(TcpClient.java:268)_
_2021/12/15 09:43:44 | INFO | jvm 1 | at
org.apache.geode.distributed.internal.tcpserver.TcpClient.requestToServer(TcpClient.java:164)_
_2021/12/15 09:43:44 | INFO | jvm 1 | at
org.apache.geode.distributed.internal.tcpserver.TcpClient.requestToServer(TcpClient.java:147)_
_2021/12/15 09:43:44 | INFO | jvm 1 | at
org.apache.geode.distributed.internal.membership.gms.locator.GMSLocator.recover(GMSLocator.java:427)_
_2021/12/15 09:43:44 | INFO | jvm 1 | at
org.apache.geode.distributed.internal.membership.gms.locator.GMSLocator.recoverFromOtherLocators(GMSLocator.java:416)_
_2021/12/15 09:43:44 | INFO | jvm 1 | at
org.apache.geode.distributed.internal.membership.gms.locator.GMSLocator.recover(GMSLocator.java:409)_
_2021/12/15 09:43:44 | INFO | jvm 1 | at
org.apache.geode.distributed.internal.membership.gms.locator.GMSLocator.init(GMSLocator.java:194)_
_2021/12/15 09:43:44 | INFO | jvm 1 | at
org.apache.geode.distributed.internal.membership.gms.locator.PrimaryHandler.init(PrimaryHandler.java:54)_
_2021/12/15 09:43:44 | INFO | jvm 1 | at
org.apache.geode.distributed.internal.tcpserver.TcpServer.start(TcpServer.java:178)_
_2021/12/15 09:43:44 | INFO | jvm 1 | at
org.apache.geode.distributed.internal.membership.gms.locator.MembershipLocatorImpl.start(MembershipLocatorImpl.java:106)_
_2021/12/15 09:43:44 | INFO | jvm 1 | at
org.apache.geode.distributed.internal.InternalLocator.startPeerLocation(InternalLocator.java:636)_
_2021/12/15 09:43:44 | INFO | jvm 1 | at
org.apache.geode.distributed.internal.InternalLocator.startLocator(InternalLocator.java:381)_
_2021/12/15 09:43:44 | INFO | jvm 1 | at
org.apache.geode.distributed.LocatorLauncher.start(LocatorLauncher.java:714)_
_2021/12/15 09:43:44 | INFO | jvm 1 | at
com.vmware.vcops.federation.GemfireWrapperMain.run(GemfireWrapperMain.java:156)_
> Cluster with multiple locators in an environment with no host name
> resolution, leads to null pointer exception
> --------------------------------------------------------------------------------------------------------------
>
> Key: GEODE-9880
> URL: https://issues.apache.org/jira/browse/GEODE-9880
> Project: Geode
> Issue Type: Bug
> Components: locator, membership
> Affects Versions: 1.12.5
> Reporter: Tigran Ghahramanyan
> Priority: Major
> Labels: membership
>
> In our use case we have two locators that are initially configured with IP
> addresses, but _AutoConnectionSourceImpl.UpdateLocatorList()_ flow keeps on
> adding their corresponding host names to the locators list, while these host
> names are not resolvable.
> Later in {_}AutoConnectionSourceImpl.queryLocators(){_}, whenever a client
> tries to use such non resolvable host name to connect to a locator it tries
> to establish a connection to {_}socketaddr=0.0.0.0{_}, as written in
> {_}SocketCreator.connect(){_}. Which seems strange.
> Then, if there is no locator running on the same host, the next locator in
> the list is contacted, until reaching a locator contact configured with IP
> address - which succeeds eventually.
> But, when there happens to be a locator listening on the same host, then we
> have a null pointer exception in the second line below, because _inetadd=null_
> _socket.connect(sockaddr, Math.max(timeout, 0)); // sockaddr=0.0.0.0,
> connects to a locator listening on the same host_
> _configureClientSSLSocket(socket, inetadd.getHostName(), timeout); // inetadd
> = null_
>
> As a result, the cluster comes to a failed state, unable to recover.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)