[Apiman-user] Having trouble connecting to Amazon Elasticsearch service
Paul Blair
pblair at clearme.com
Tue Dec 8 12:12:20 EST 2015
The stack trace is below. Note that the instance seems to start fine; it's
only when I make a request to the Gateway that I get this error.
Thanks!
16:18:04,746 ERROR [io.undertow.request] (default task-1) UT005023:
Exception handling request to /apiman-gateway/test_api/1.7:
java.lang.RuntimeException: org.apache.http.NoHttpResponseException:
search-testapi-....us-west-2.es.amazonaws.com:443 failed to respond
at
io.apiman.gateway.engine.es.ESClientFactory.initializeClient(ESClientFactor
y.java:200) [apiman-gateway-engine-es-1.1.9.Final.jar:]
at
io.apiman.gateway.engine.es.ESClientFactory.createJestClient(ESClientFactor
y.java:140) [apiman-gateway-engine-es-1.1.9.Final.jar:]
at
io.apiman.gateway.engine.es.ESClientFactory.createJestClient(ESClientFactor
y.java:101) [apiman-gateway-engine-es-1.1.9.Final.jar:]
at
io.apiman.gateway.engine.es.ESClientFactory.createClient(ESClientFactory.ja
va:66) [apiman-gateway-engine-es-1.1.9.Final.jar:]
at
io.apiman.gateway.engine.es.AbstractESComponent.getClient(AbstractESCompone
nt.java:45) [apiman-gateway-engine-es-1.1.9.Final.jar:]
at io.apiman.gateway.engine.es.ESRegistry.getService(ESRegistry.java:315)
[apiman-gateway-engine-es-1.1.9.Final.jar:]
at io.apiman.gateway.engine.es.ESRegistry.getService(ESRegistry.java:304)
[apiman-gateway-engine-es-1.1.9.Final.jar:]
at
io.apiman.gateway.engine.es.CachingESRegistry.getService(CachingESRegistry.
java:189) [apiman-gateway-engine-es-1.1.9.Final.jar:]
at
io.apiman.gateway.engine.impl.SecureRegistryWrapper.getService(SecureRegist
ryWrapper.java:97) [apiman-gateway-engine-core-1.1.9.Final.jar:]
at
io.apiman.gateway.engine.impl.ServiceRequestExecutorImpl.execute(ServiceReq
uestExecutorImpl.java:252) [apiman-gateway-engine-core-1.1.9.Final.jar:]
at
io.apiman.gateway.platforms.servlet.GatewayServlet.doAction(GatewayServlet.
java:236) [apiman-gateway-platforms-servlet-1.1.9.Final.jar:]
at
io.apiman.gateway.platforms.servlet.GatewayServlet.doGet(GatewayServlet.jav
a:82) [apiman-gateway-platforms-servlet-1.1.9.Final.jar:]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
[jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
[jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]
at
io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.ja
va:86) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final]
at
io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequ
est(ServletSecurityRoleHandler.java:62)
[undertow-servlet-1.1.8.Final.jar:1.1.8.Final]
at
io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(Servle
tDispatchingHandler.java:36) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final]
at
org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.h
andleRequest(SecurityContextAssociationHandler.java:78)
at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler
.java:43) [undertow-core-1.1.8.Final.jar:1.1.8.Final]
at
io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.hand
leRequest(SSLInformationAssociationHandler.java:131)
[undertow-servlet-1.1.8.Final.jar:1.1.8.Final]
at
io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.hand
leRequest(ServletAuthenticationCallHandler.java:57)
[undertow-servlet-1.1.8.Final.jar:1.1.8.Final]
at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler
.java:43) [undertow-core-1.1.8.Final.jar:1.1.8.Final]
at
io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(
AbstractConfidentialityHandler.java:46)
[undertow-core-1.1.8.Final.jar:1.1.8.Final]
at
io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandl
er.handleRequest(ServletConfidentialityConstraintHandler.java:64)
[undertow-servlet-1.1.8.Final.jar:1.1.8.Final]
at
io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest
(AuthenticationMechanismsHandler.java:58)
[undertow-core-1.1.8.Final.jar:1.1.8.Final]
at
io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.han
dleRequest(CachedAuthenticatedSessionHandler.java:70)
[undertow-servlet-1.1.8.Final.jar:1.1.8.Final]
at
io.undertow.security.handlers.SecurityInitialHandler.handleRequest(Security
InitialHandler.java:76) [undertow-core-1.1.8.Final.jar:1.1.8.Final]
at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler
.java:43) [undertow-core-1.1.8.Final.jar:1.1.8.Final]
at
org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleReq
uest(JACCContextIdHandler.java:61)
at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler
.java:43) [undertow-core-1.1.8.Final.jar:1.1.8.Final]
at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler
.java:43) [undertow-core-1.1.8.Final.jar:1.1.8.Final]
at
io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(Servl
etInitialHandler.java:261) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final]
at
io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletI
nitialHandler.java:248) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final]
at
io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitia
lHandler.java:77) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final]
at
io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletI
nitialHandler.java:167) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final]
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:199)
[undertow-core-1.1.8.Final.jar:1.1.8.Final]
at
io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:761)
[undertow-core-1.1.8.Final.jar:1.1.8.Final]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1
142) [rt.jar:1.8.0_25]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:
617) [rt.jar:1.8.0_25]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_25]
Caused by: org.apache.http.NoHttpResponseException:
search-testapi-....us-west-2.es.amazonaws.com:443 failed to respond
at
org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpRe
sponseParser.java:143) [httpclient-4.5.jar:4.5]
at
org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpRe
sponseParser.java:57) [httpclient-4.5.jar:4.5]
at
org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.j
ava:261) [httpcore-4.4.1.jar:4.4.1]
at
org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(Def
aultBHttpClientConnection.java:165) [httpcore-4.4.1.jar:4.4.1]
at
org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:
167) [httpclient-4.5.jar:4.5]
at
org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestE
xecutor.java:272) [httpcore-4.4.1.jar:4.4.1]
at
org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.ja
va:124) [httpcore-4.4.1.jar:4.4.1]
at
org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:2
71) [httpclient-4.5.jar:4.5]
at
org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
[httpclient-4.5.jar:4.5]
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
[httpclient-4.5.jar:4.5]
at
org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
[httpclient-4.5.jar:4.5]
at
org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient
.java:184) [httpclient-4.5.jar:4.5]
at
org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient
.java:82) [httpclient-4.5.jar:4.5]
at
org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient
.java:107) [httpclient-4.5.jar:4.5]
at
io.searchbox.client.http.JestHttpClient.execute(JestHttpClient.java:50)
[jest-0.1.6.jar:]
at
io.apiman.gateway.engine.es.ESClientFactory.initializeClient(ESClientFactor
y.java:193) [apiman-gateway-engine-es-1.1.9.Final.jar:]
... 39 more
On 12/8/15, 11:48 AM, "Eric Wittmann" <eric.wittmann at redhat.com> wrote:
>You definitely need to set the protocol to 'https', for the record.
>Beyond that I'm not quite sure. Do you have a full stack trace or just
>that part of it?
>
>On 12/8/2015 11:19 AM, Paul Blair wrote:
>> Not quite sure what to make of this: I'm getting
>>
>> org.apache.http.NoHttpResponseException: [endpoint_URI]:443 failed
>> to respond
>>
>> But if I do:
>>
>> curl https://[endpont_URI]:443
>>
>> I get a response from Elasticsearch‹this is because I have the Amazon
>> Elasticsearch instance permissioned to accept any connections from the
>> IP address where apiman is running.
>>
>> The apiman configurations look like this:
>>
>> apiman.es.protocol=http
>> apiman.es.host=[endpoint_URI]
>> apiman.es.port=443
>> apiman.es.username=
>> apiman.es.password=
>>
>> Changing protocol from http to https doesn't appear to help, nor does
>> removing the username and password properties entirely. Any suggestions?
>>
>>
>> _______________________________________________
>> Apiman-user mailing list
>> Apiman-user at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/apiman-user
>>
More information about the Apiman-user
mailing list