4

我根据 AWS 的教程创建了一个集群,它应该可以正常工作,但是当我尝试连接到它时,出现以下错误

java.io.IOException:无法从主机配置集群端点:[mydaxcluster.ximfba.clustercfg.dax.use1.cache.amazonaws.com:8111] at com.amazon.dax.client.cluster.Source$AutoconfSource.pull( Source.java:128) ~[DaxJavaClient-latest.jar:1.0.792.0] at com.amazon.dax.client.cluster.Source$AutoconfSource.update(Source.java:60) ~[DaxJavaClient-latest.jar:1.0 .792.0] 在 com.amazon.dax.client.cluster.Source$AutoconfSource.refresh(Source.java:51) ~[DaxJavaClient-latest.jar:1.0.792.0] 在 com.amazon.dax.client.cluster.Cluster .refresh(Cluster.java:311) ~[DaxJavaClient-latest.jar:1.0.792.0] at com.amazon.dax.client.cluster.Cluster.refresh(Cluster.java:294) ~[DaxJavaClient-latest.jar: 1.0.792.0] 在 com.amazon.dax.client.cluster.Cluster.startup(Cluster.java:191) ~[DaxJavaClient-latest.jar:1.0.792.0] 在 com.amazon。dax.client.cluster.Cluster.startup(Cluster.java:143) ~[DaxJavaClient-latest.jar:1.0.792.0] at com.amazon.dax.client.dynamodbv2.ClusterDaxClient.(ClusterDaxClient.java:159) [DaxJavaClient -latest.jar:1.0.792.0] 在 com.amazon.dax.client.dynamodbv2.ClusterDaxClient.(ClusterDaxClient.java:130) [DaxJavaClient-latest.jar:1.0.792.0] 在 com.poc.dynamo.controller.DataController .testDax(DataController.java:190) [classes/:na] 在 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] 在 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] 在 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] 在 java.lang.reflect.Method.invoke(Method.java:498) ~[ na:1.8.0_121] 在 org.springframework.web.method.support。InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE] at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE] 在 org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:116) [spring-webmvc-4.3 .6.RELEASE.jar:4.3.6.RELEASE] 在 org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827) [spring-webmvc-4.3.6.RELEASE.jar :4.3.6.RELEASE] 在 org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738) [spring-webmvc-4.3.6.RELEASE.jar:4.3.6。发布] 在 org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) [spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE] 在 org.springframework.web .servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963) [spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897 ) [spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE] 在 org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) [spring-webmvc-4.3.6.RELEASE. jar:4.3.6.RELEASE] 在 org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872) [spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE] 在 javax.servlet .http.HttpServlet.service(HttpServlet.java:648) [tomcat-embed-core-8.5.11.jar:8.5.11] 在 org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) [spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE] 在 javax.servlet.http .HttpServlet.service(HttpServlet.java:729) [tomcat-embed-core-8.5.11.jar:8.5.11] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) [tomcat- embed-core-8.5.11.jar:8.5.11] 在 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.11.jar:8.5.11]在 org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-embed-websocket-8.5.11.jar:8.5.11] 在 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.11.jar:8.5.11] 在 org.apache.catalina.core。ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.11.jar:8.5.11] at org.springframework.boot.web.filter.ApplicationContextHeaderFilter.doFilterInternal(ApplicationContextHeaderFilter.java:55) [spring -boot-1.5.1.RELEASE.jar:1.5.1.RELEASE] 在 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.6.RELEASE.jar:4.3 .6.RELEASE] 在 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.11.jar:8.5.11] 在 org.apache.catalina.core。 ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.11.jar:8.5.11] at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:108) [spring -boot-actuator-1.5.1。RELEASE.jar:1.5.1.RELEASE] 在 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE] 在 org .apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.11.jar:8.5.11] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java :165) [tomcat-embed-core-8.5.11.jar:8.5.11] 在 org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) [spring-web-4.3.6.RELEASE。 jar:4.3.6.RELEASE] 在 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE] 在 org.apache .catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.11.jar:8.5.11] 在 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.11.jar :8.5.11] 在 org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:105) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE] 在 org.springframework.web。 filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.11.jar:8.5.11] 在 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.11.jar:8.5 .11] 在 org.springframework.web.filter.HiddenHttpMethodFilter。doFilterInternal(HiddenHttpMethodFilter.java:81) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web -4.3.6.RELEASE.jar:4.3.6.RELEASE] 在 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.11.jar:8.5.11 ] 在 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.11.jar:8.5.11] 在 org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal( CharacterEncodingFilter.java:197) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3 .6.RELEASE.jar:4.3.6.RELEASE] 在 org.apache.catalina。core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.11.jar:8.5.11] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat -embed-core-8.5.11.jar:8.5.11] 在 org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:106) [spring-boot-actuator-1.5.1.RELEASE.jar :1.5.1.RELEASE] 在 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE] 在 org.apache。 catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.11.jar:8.5.11] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.11.jar:8.5.11] 在 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) [tomcat-embed-core-8.5.11.jar:8.5.11] 在 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java: 96) [tomcat-embed-core-8.5.11.jar:8.5.11] 在 org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:474) [tomcat-embed-core-8.5.11.jar :8.5.11] 在 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [tomcat-embed-core-8.5.11.jar:8.5.11] 在 org.apache.catalina.valves。 ErrorReportValve.invoke(ErrorReportValve.java:79) [tomcat-embed-core-8.5.11.jar:8.5.11] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [tomcat-embed -core-8.5.11.jar:8.5.11] 在 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)[tomcat-embed-core-8.5.11.jar:8.5.11] 在 org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783)[tomcat-embed-core-8.5.11.jar :8.5.11] 在 org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-embed-core-8.5.11.jar:8.5.11] 在 org.apache.coyote.AbstractProtocol$ConnectionHandler。进程(AbstractProtocol.java:798)[tomcat-embed-core-8.5.11.jar:8.5.11] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1434)[tomcat -embed-core-8.5.11.jar:8.5.11] 在 org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-8.5.11.jar:8.5 .11] 在 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_121] 在 java.util.concurrent.ThreadPoolExecutor$Worker。运行(ThreadPoolExecutor.java:617)[na:1.8.0_121] 在 org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)[tomcat-embed-core-8.5.11.jar :8.5.11] 在 java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] 原因:java.net.ConnectException:超时等待 com.amazon.dax.client 的可用管.SocketTubePool.alloc(SocketTubePool.java:77) ~[DaxJavaClient-latest.jar:1.0.792.0] at com.amazon.dax.client.generated.DaxClientStubs.endpoints_455855874_1(DaxClientStubs.java:449) ~[DaxJavaClient-latest. jar:1.0.792.0] 在 com.amazon.dax.client.dynamodbv2.DaxClient.endpoints(DaxClient.java:1825) ~[DaxJavaClient-latest.jar:1.0.792.0] 在 com.amazon.dax.client.cluster。 Source$AutoconfSource.pullFrom(Source.java:138) ~[DaxJavaClient-latest.jar:1.0.792.0] 在 com.amazon.dax.client.cluster。Source$AutoconfSource.pull(Source.java:106) ~[DaxJavaClient-latest.jar:1.0.792.0] ... 75 个常用帧省略 Suppressed: java.net.ConnectException: timeout waiting for an available tube ... 80 个常用帧省略被抑制:java.net.ConnectException:超时等待可用管......省略了80个常见帧

无法读取项目无法调用集群端点:没有可用的端点

4

1 回答 1

5

我们需要了解有关如何设置 DAX 集群和客户端实例的更多信息才能提供帮助。一些一般的尝试:

  1. 您是否能够从 EC2 客户端实例连接到 DAX 集群?尝试运行: nc -z mydaxcluster.ximfba.clustercfg.dax.use1.cache.amazonaws.com 8111
  2. 您是否使用 VPC 的默认安全组来创建 DAX 集群?您需要将 TCP 端口 8111 上的入站流量授权给用于从客户端实例的安全组创建 DAX 集群的安全组。请按照步骤为您的 VPC 配置安全组规则
于 2017-07-05T18:19:13.223 回答