[ 
https://issues.apache.org/jira/browse/HDDS-8041?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated HDDS-8041:
---------------------------------
    Labels: pull-request-available  (was: )

> Ozone FS Client should fail to connect if wrong hostname/serviceID in URI.
> --------------------------------------------------------------------------
>
>                 Key: HDDS-8041
>                 URL: https://issues.apache.org/jira/browse/HDDS-8041
>             Project: Apache Ozone
>          Issue Type: Bug
>            Reporter: Sadanand Shenoy
>            Assignee: Sadanand Shenoy
>            Priority: Major
>              Labels: pull-request-available
>
> On providing an incorrect hostname/service ID in ofs URI , the filesystem 
> client  instead of failing , retries till exhaustion. Also the default retry 
> config for client retries is too high currently  (500). Considering linear 
> retry policy , it would take the client ((1 + 500) * 500 * 2)/2 = 250500 
> seconds ~= 70 hours to stop retrying.
>  
> {code:java}
> $ ozone fs -ls ofs://ozone2/
> 23/02/28 07:02:35 WARN ha.OMProxyInfo: OzoneManager address ozone2:9862 for 
> serviceID null remains unresolved for node ID null Check your ozone-site.xml 
> file to ensure ozone manager addresses are configured properly.
> 23/02/28 07:02:38 INFO retry.RetryInvocationHandler: 
> com.google.protobuf.ServiceException: java.net.UnknownHostException: Invalid 
> host name: local host is: "xxx"; destination host is: "ozone2":9862; 
> java.net.UnknownHostException: Invalid host name: local host is: "ozone"; 
> destination host is: "ozone2":9862; java.net.UnknownHostException; For more 
> details see:  http://wiki.apache.org/hadoop/UnknownHost; For more details 
> see:  http://wiki.apache.org/hadoop/UnknownHost, while invoking 
> $Proxy11.submitRequest over nodeId=null,nodeAddress=ozone2:9862 after 1 
> failover attempts. Trying to failover after sleeping for 4000ms.
> 23/02/28 07:02:42 INFO retry.RetryInvocationHandler: 
> com.google.protobuf.ServiceException: java.net.UnknownHostException: Invalid 
> host name: local host is: "xxx"; destination host is: "ozone2":9862; 
> java.net.UnknownHostException: Invalid host name: local host is: "ozone"; 
> destination host is: "ozone2":9862; java.net.UnknownHostException; For more 
> details see:  http://wiki.apache.org/hadoop/UnknownHost; For more details 
> see:  http://wiki.apache.org/hadoop/UnknownHost, while invoking 
> $Proxy11.submitRequest over nodeId=null,nodeAddress=ozone2:9862 after 2 
> failover attempts. Trying to failover after sleeping for 6000ms.
> 23/02/28 07:02:48 INFO retry.RetryInvocationHandler: 
> com.google.protobuf.ServiceException: java.net.UnknownHostException: Invalid 
> host name: local host is: "xxx"; destination host is: "ozone2":9862; 
> java.net.UnknownHostException: Invalid host name: local host is: "ozone"; 
> destination host is: "ozone2":9862; java.net.UnknownHostException; For more 
> details see:  http://wiki.apache.org/hadoop/UnknownHost; For more details 
> see:  http://wiki.apache.org/hadoop/UnknownHost, while invoking 
> $Proxy11.submitRequest over nodeId=null,nodeAddress=ozone2:9862 after 3 
> failover attempts. Trying to failover after sleeping for 8000ms.
>  {code}
>  
>  
> The code checks if the authority in the URI is one of the serviceID's defined 
> in the client config and if not it considers the authority as hostname. Any 
> wrong/incorrect name is considered as hostname and almost endless retries are 
> triggered.
> {code:java}
> if (OmUtils.isOmHAServiceId(conf, omHost)) {
>   this.ozoneClient =
>       OzoneClientFactory.getRpcClient(omHost, conf);
> } else if (StringUtils.isNotEmpty(omHost) && omPort != -1) {
>   this.ozoneClient =
>       OzoneClientFactory.getRpcClient(omHost, omPort, conf);
> } else {
>   this.ozoneClient =
>       OzoneClientFactory.getRpcClient(conf);
> } {code}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to