[
https://issues.apache.org/jira/browse/SLIDER-796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14341013#comment-14341013
]
Jonathan Maron commented on SLIDER-796:
---------------------------------------
I'm not sure it would have bubbled up that far - there's a
ClientHandlerException being generated from the connection handler, so the 401
may not get propagated that far up the stack. The description above specifies
an "interactive login", so I suspect that's the mechanism we're seeing here.
If we really need to manage this scenario, it may require configuring the
Jersey Client with an HTTPBasicAuthFilter, and retrieving the required
credentials from a configured credential provider (rather than configuring a
username and password in a config file or the like).
> Protocol change during redirect
> -------------------------------
>
> Key: SLIDER-796
> URL: https://issues.apache.org/jira/browse/SLIDER-796
> Project: Slider
> Issue Type: Bug
> Affects Versions: Slider 0.60
> Reporter: Lee Yang
> Assignee: Steve Loughran
> Priority: Minor
>
> In our grid, we have an internal auth filter which appears to be injected via
> the hadoop.http.filter.initializers property in our core-site.xml. As such,
> attempts to access the Slider AM web service get routed through our
> interactive login URL. Unfortunately, for non-interactive/programmatic
> use-cases, this is a problem. And, aside from that, the RegistryRetriever
> complains about a protocol change from HTTP to HTTPS.
> As a workaround, I've re-introduced the following two lines from
> Slider-0.50.2 (along with any dependencies) to SliderAppMaster.java:
> {noformat}
> serviceConf.set(HADOOP_HTTP_FILTER_INITIALIZERS,
> SliderAmFilterInitializer.NAME);
> serviceConf.set(SliderAmIpFilter.WS_CONTEXT_ROOT, WS_CONTEXT_ROOT + "|" +
> WS_AGENT_CONTEXT_ROOT);
> {noformat}
> Here is the stack trace from the failure:
> {noformat}
> 2015-02-26 17:30:25,357 [main] INFO client.RMProxy - Connecting to
> ResourceManager at axonitered-jt1.red.ygrid.yahoo.com/98.139.154.88:8032
> 2015-02-26 17:30:27,142 [main] INFO retrieve.RegistryRetriever - Protocol
> change during redirect. Redirecting
> http://gsrd229n05.red.ygrid.yahoo.com:45546/ws/v1/slider/publisher/slider to
> URL
> https://bouncer.by.corp.yahoo.com/login/?done=http%3A%2F%2Faxonitered-jt1.red.ygrid.yahoo.com%3A8088%2Fproxy%2Fapplication_1424818686446_2293%2Fws%2Fv1%2Fslider%2Fpublisher%2Fslider
> Exception: java.net.ConnectException: Connection timed out
> 2015-02-26 17:31:30,372 [main] ERROR main.ServiceLauncher - Exception:
> java.net.ConnectException: Connection timed out
> com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException:
> Connection timed out
> at
> com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:149)
> at com.sun.jersey.api.client.Client.handle(Client.java:648)
> at com.sun.jersey.api.client.WebResource.handle(WebResource.java:670)
> at com.sun.jersey.api.client.WebResource.get(WebResource.java:191)
> at
> org.apache.slider.core.registry.retrieve.RegistryRetriever.getConfigurations(RegistryRetriever.java:216)
> at
> org.apache.slider.client.SliderClient.actionRegistryGetConfig(SliderClient.java:3124)
> at
> org.apache.slider.client.SliderClient.actionRegistry(SliderClient.java:2617)
> at org.apache.slider.client.SliderClient.exec(SliderClient.java:404)
> at
> org.apache.slider.client.SliderClient.runService(SliderClient.java:348)
> at
> org.apache.slider.core.main.ServiceLauncher.launchService(ServiceLauncher.java:188)
> at
> org.apache.slider.core.main.ServiceLauncher.launchServiceRobustly(ServiceLauncher.java:475)
> at
> org.apache.slider.core.main.ServiceLauncher.launchServiceAndExit(ServiceLauncher.java:403)
> at
> org.apache.slider.core.main.ServiceLauncher.serviceMain(ServiceLauncher.java:630)
> at org.apache.slider.Slider.main(Slider.java:49)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)