You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@slider.apache.org by "Steve Loughran (JIRA)" <ji...@apache.org> on 2016/02/19 22:37:18 UTC

[jira] [Commented] (SLIDER-1088) Slider client getting UnknownHost exception trying to RPC to AM in different subdomain

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

Steve Loughran commented on SLIDER-1088:
----------------------------------------

Looking at the code, the hostname is not an FQDN, it's a short hostname. It's coming back from the App report ... it's origin is the am, which creates an RPC port and then returns its hostname
{code}
      startSliderRPCServer(instanceDefinition);

      rpcServiceAddress = rpcService.getConnectAddress();
      appMasterHostname = rpcServiceAddress.getHostName();  // here
      appMasterRpcPort = rpcServiceAddress.getPort();
{code}

It looks like there's a call, {{.getCanonicalHostname()}} which will get the FQDN; this is what we need.

Also: review the bit where the web endpoint is registered to make sure it is also doing the same thing.

Issue: what happens if a machine can't work its FQDN? Assume that's a mess of a network config, where enough other things are failing this isn't something we need to worry about.

> Slider client getting UnknownHost exception trying to RPC to AM in different subdomain
> --------------------------------------------------------------------------------------
>
>                 Key: SLIDER-1088
>                 URL: https://issues.apache.org/jira/browse/SLIDER-1088
>             Project: Slider
>          Issue Type: Bug
>          Components: appmaster, client
>    Affects Versions: Slider 0.90.2
>            Reporter: Steve Loughran
>            Assignee: Steve Loughran
>
> When you try to issue a call like "slider status" from a domain other than that in which the cluster is, you get to see a stack trace
> {code}
> ERROR main.ServiceLauncher - Exception: Invalid host name: local host is: (unknown); destination host is: "wn1-slider":1024; java.net.UnknownHostException; For more details see:  http://wiki.apache.org/hadoop/UnknownHost
> java.net.UnknownHostException: Invalid host name: local host is: (unknown); destination host is: "wn1-slider":1024; java.net.UnknownHostException; For more details see:  http://wiki.apache.org/hadoop/UnknownHost
>  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>  at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
>  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>  at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
> ...
>  org.apache.slider.server.appmaster.rpc.SliderClusterProtocolProxy.getJSONClusterStatus(SliderClusterProtocolProxy.java:129)
>  at org.apache.slider.client.ipc.SliderClusterOperations.getClusterDescription(SliderClusterOperations.java:143)
>  at org.apache.slider.client.SliderClient.getClusterDescription(SliderClient.java:3342)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)