I'm using stream bridge for sending kafka messages
streamBridge.send("alm-foo-dev", "kafka", message)
My tests however fail connecting to the Kafka broker
2022-07-12 12:29:41.095 WARN 79618 --- [read | consumer] org.apache.kafka.clients.NetworkClient : [Consumer clientId=consumer-consumer-1, groupId=consumer] Connection to node 0 (localhost/127.0.0.1:9952) could not be established. Broker may not be available.
2022-07-12 12:29:41.158 WARN 79618 --- [ad | producer-1] org.apache.kafka.clients.NetworkClient : [Producer clientId=producer-1] Connection to node 0 (localhost/127.0.0.1:9952) could not be established. Broker may not be available.
2022-07-12 12:29:41.205 WARN 79618 --- [read | consumer] org.apache.kafka.clients.NetworkClient : [Consumer clientId=consumer-consumer-1, groupId=consumer] Connection to node 0 (localhost/127.0.0.1:9952) could not be established. Broker may not be available.
2022-07-12 12:29:41.262 WARN 79618 --- [ad | producer-1] org.apache.kafka.clients.NetworkClient : [Producer clientId=producer-1] Connection to node 0 (localhost/127.0.0.1:9952) could not be established. Broker may not be available.
2022-07-12 12:29:41.378 WARN 79618 --- [read | consumer] org.apache.kafka.clients.NetworkClient : [Consumer clientId=consumer-consumer-1, groupId=consumer] Connection to node 0 (localhost/127.0.0.1:9952) could not be established. Broker may not be available.
2022-07-12 12:29:41.519 WARN 79618 --- [ad | producer-1] org.apache.kafka.clients.NetworkClient : [Producer clientId=producer-1] Connection to node 0 (localhost/127.0.0.1:9952) could not be established. Broker may not be available.
2022-07-12 12:29:41.769 WARN 79618 --- [read | consumer] org.apache.kafka.clients.NetworkClient : [Consumer clientId=consumer-consumer-1, groupId=consumer] Connection to node 0 (localhost/127.0.0.1:9952) could not be established. Broker may not be available.
2022-07-12 12:29:41.884 WARN 79618 --- [ad | producer-1] org.apache.kafka.clients.NetworkClient : [Producer clientId=producer-1] Connection to node 0 (localhost/127.0.0.1:9952) could not be established. Broker may not be available.
2022-07-12 12:29:42.679 WARN 79618 --- [read | consumer] org.apache.kafka.clients.NetworkClient : [Consumer clientId=consumer-consumer-1, groupId=consumer] Connection to node 0 (localhost/127.0.0.1:9952) could not be established. Broker may not be available.
2022-07-12 12:29:42.688 WARN 79618 --- [ad | producer-1] org.apache.kafka.clients.NetworkClient : [Producer clientId=producer-1] Connection to node 0 (localhost/127.0.0.1:9952) could not be established. Broker may not be available.
2022-07-12 12:29:43.693 WARN 79618 --- [ad | producer-1] org.apache.kafka.clients.NetworkClient : [Producer clientId=producer-1] Connection to node 0 (localhost/127.0.0.1:9952) could not be established. Broker may not be available.
2022-07-12 12:29:43.839 WARN 79618 --- [read | consumer] org.apache.kafka.clients.NetworkClient : [Consumer clientId=consumer-consumer-1, groupId=consumer] Connection to node 0 (localhost/127.0.0.1:9952) could not be established. Broker may not be available.
2022-07-12 12:29:44.865 WARN 79618 --- [ad | producer-1] org.apache.kafka.clients.NetworkClient : [Producer clientId=producer-1] Connection to node 0 (localhost/127.0.0.1:9952) could not be established. Broker may not be available.
2022-07-12 12:29:44.983 WARN 79618 --- [read | consumer] org.apache.kafka.clients.NetworkClient : [Consumer clientId=consumer-consumer-1, groupId=consumer] Connection to node 0 (localhost/127.0.0.1:9952) could not be established. Broker may not be available.
java.lang.IllegalStateException: No records found for topic
at org.springframework.kafka.test.utils.KafkaTestUtils.getSingleRecord(KafkaTestUtils.java:181)
at org.springframework.kafka.test.utils.KafkaTestUtils.getSingleRecord(KafkaTestUtils.java:142)
at com.foo.bar.baz.WebhooksFunctionTests.testPublishesHttpMessageToKafka(WebhooksFunctionTests.java:61)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:725)
at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84)
at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:214)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:210)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:135)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:66)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53)
at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:71)
at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
Here's how I configure embedded Kafka
#EmbeddedKafka(
brokerProperties = {"listeners=PLAINTEXT://localhost:9952", "port=9952"},
topics = {"alm-jira-dev"},
partitions = 1
)
and the src/test/java/application.yml
server:
port: 29191
logging:
level:
root: ERROR
org:
springframework.integration: DEBUG
springframework.cloud.stream: DEBUG
springframework.boot.autoconfigure.mongo: WARN
com.digite.cloud: DEBUG
spring:
application:
name: howler
main:
banner-mode: off
mongodb:
embedded:
version: 3.4.6
data:
mongodb:
port: 29129
host: localhost
database: howler_db
cloud:
stream:
kafka:
default:
producer:
useTopicHeader: true
binder:
defaultBrokerPort: 9952
autoCreateTopics: false
producerProperties:
key.serializer: org.apache.kafka.common.serialization.StringSerializer
value.serializer: org.springframework.kafka.support.serializer.JsonSerializer
max.block.ms: 100
This configuration worked for me (running tests)
spring:
embedded:
kafka:
brokers: localhost:9092
cloud:
stream:
kafka:
default:
producer:
useTopicHeader: true
binder:
autoCreateTopics: false
producerProperties:
key.serializer: org.apache.kafka.common.serialization.StringSerializer
value.serializer: org.springframework.kafka.support.serializer.JsonSerializer
max.block.ms: 100
Yet to figure out what will the config look like when I deploy the app to Kube.
On running a code I am getting the error: unable to find valid certification path to requested target
I am making a simple HTTP POST call to reqres.in/api/users. What could be the reason for this?
Code:
#Test
public void simplePostReqTest() throws URISyntaxException {
WebClient client = WebClient.create();
MultiValueMap<String, String> bodyValues = new LinkedMultiValueMap<>();
bodyValues.add("name", "olu");
bodyValues.add("job", "apple");
String response = client.post()
.uri(new URI("https://reqres.in/api/users"))
.contentType(MediaType.APPLICATION_JSON)
.body(BodyInserters.fromFormData(bodyValues))
.retrieve()
.bodyToMono(String.class)
.block();
System.out.println(response);
}
ERROR:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.springframework.util.ReflectionUtils (file:/C:/Users/BH21251/.m2/repository/org/springframework/spring-core/5.3.16/spring-core-5.3.16.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class)
WARNING: Please consider reporting this to the maintainers of org.springframework.util.ReflectionUtils
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
org.springframework.web.reactive.function.client.WebClientRequestException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target; nested exception is javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at org.springframework.web.reactive.function.client.ExchangeFunctions$DefaultExchangeFunction.lambda$wrapException$9(ExchangeFunctions.java:141)
Suppressed: The stacktrace has been enhanced by Reactor, refer to additional information below:
Error has been observed at the following site(s):
*__checkpoint ⇢ Request to POST https://reqres.in/api/users [DefaultWebClient]
Original Stack Trace:
at org.springframework.web.reactive.function.client.ExchangeFunctions$DefaultExchangeFunction.lambda$wrapException$9(ExchangeFunctions.java:141)
at reactor.core.publisher.MonoErrorSupplied.subscribe(MonoErrorSupplied.java:55)
at reactor.core.publisher.Mono.subscribe(Mono.java:4400)
at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:103)
at reactor.core.publisher.FluxPeek$PeekSubscriber.onError(FluxPeek.java:222)
at reactor.core.publisher.FluxPeek$PeekSubscriber.onError(FluxPeek.java:222)
at reactor.core.publisher.FluxPeek$PeekSubscriber.onError(FluxPeek.java:222)
at reactor.core.publisher.MonoNext$NextSubscriber.onError(MonoNext.java:93)
at reactor.core.publisher.MonoFlatMapMany$FlatMapManyMain.onError(MonoFlatMapMany.java:204)
at reactor.core.publisher.SerializedSubscriber.onError(SerializedSubscriber.java:124)
at reactor.core.publisher.FluxRetryWhen$RetryWhenMainSubscriber.whenError(FluxRetryWhen.java:225)
at reactor.core.publisher.FluxRetryWhen$RetryWhenOtherSubscriber.onError(FluxRetryWhen.java:274)
at reactor.core.publisher.FluxConcatMap$ConcatMapImmediate.drain(FluxConcatMap.java:415)
at reactor.core.publisher.FluxConcatMap$ConcatMapImmediate.onNext(FluxConcatMap.java:251)
at reactor.core.publisher.EmitterProcessor.drain(EmitterProcessor.java:491)
at reactor.core.publisher.EmitterProcessor.tryEmitNext(EmitterProcessor.java:299)
at reactor.core.publisher.SinkManySerialized.tryEmitNext(SinkManySerialized.java:100)
at reactor.core.publisher.InternalManySink.emitNext(InternalManySink.java:27)
at reactor.core.publisher.FluxRetryWhen$RetryWhenMainSubscriber.onError(FluxRetryWhen.java:190)
at reactor.core.publisher.MonoCreate$DefaultMonoSink.error(MonoCreate.java:194)
at reactor.netty.http.client.HttpClientConnect$MonoHttpConnect$ClientTransportSubscriber.onError(HttpClientConnect.java:304)
at reactor.core.publisher.MonoCreate$DefaultMonoSink.error(MonoCreate.java:194)
at reactor.netty.resources.DefaultPooledConnectionProvider$DisposableAcquire.onUncaughtException(DefaultPooledConnectionProvider.java:201)
at reactor.netty.resources.DefaultPooledConnectionProvider$PooledConnection.onUncaughtException(DefaultPooledConnectionProvider.java:450)
at reactor.netty.channel.ChannelOperationsHandler.exceptionCaught(ChannelOperationsHandler.java:129)
at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:302)
at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:281)
at io.netty.channel.AbstractChannelHandlerContext.fireExceptionCaught(AbstractChannelHandlerContext.java:273)
at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireExceptionCaught(CombinedChannelDuplexHandler.java:424)
at io.netty.channel.ChannelHandlerAdapter.exceptionCaught(ChannelHandlerAdapter.java:92)
at io.netty.channel.CombinedChannelDuplexHandler$1.fireExceptionCaught(CombinedChannelDuplexHandler.java:145)
at io.netty.channel.ChannelInboundHandlerAdapter.exceptionCaught(ChannelInboundHandlerAdapter.java:143)
at io.netty.channel.CombinedChannelDuplexHandler.exceptionCaught(CombinedChannelDuplexHandler.java:231)
at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:302)
at io.netty.channel.AbstractChannelHandlerContext.invokeExceptionCaught(AbstractChannelHandlerContext.java:281)
at io.netty.channel.AbstractChannelHandlerContext.fireExceptionCaught(AbstractChannelHandlerContext.java:273)
at reactor.netty.tcp.SslProvider$SslReadHandler.userEventTriggered(SslProvider.java:834)
at io.netty.channel.AbstractChannelHandlerContext.invokeUserEventTriggered(AbstractChannelHandlerContext.java:346)
at io.netty.channel.AbstractChannelHandlerContext.invokeUserEventTriggered(AbstractChannelHandlerContext.java:332)
at io.netty.channel.AbstractChannelHandlerContext.fireUserEventTriggered(AbstractChannelHandlerContext.java:324)
at io.netty.handler.ssl.SslHandler.handleUnwrapThrowable(SslHandler.java:1259)
at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1240)
at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1284)
at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:510)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:449)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:279)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:722)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:834)
Suppressed: java.lang.Exception: #block terminated with an error
at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:99)
at reactor.core.publisher.Mono.block(Mono.java:1707)
at com.macys.notification.enclaveapi.EncalveAPITest.simplePostReqTest(EncalveAPITest.java:75)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:725)
at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84)
at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:214)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:210)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:135)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:66)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53)
at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:71)
at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
Caused by: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131)
at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:369)
at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:312)
at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:307)
at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.checkServerCerts(CertificateMessage.java:1357)
at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.onConsumeCertificate(CertificateMessage.java:1232)
at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.consume(CertificateMessage.java:1175)
at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:392)
at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:478)
at java.base/sun.security.ssl.SSLEngineImpl$DelegatedTask$DelegatedAction.run(SSLEngineImpl.java:1081)
at java.base/sun.security.ssl.SSLEngineImpl$DelegatedTask$DelegatedAction.run(SSLEngineImpl.java:1068)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/sun.security.ssl.SSLEngineImpl$DelegatedTask.run(SSLEngineImpl.java:1015)
at io.netty.handler.ssl.SslHandler.runDelegatedTasks(SslHandler.java:1548)
at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1394)
at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1235)
at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1284)
at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:510)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:449)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:279)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:722)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:439)
at java.base/sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:306)
at java.base/sun.security.validator.Validator.validate(Validator.java:264)
at java.base/sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:313)
at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:276)
at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:141)
at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.checkServerCerts(CertificateMessage.java:1335)
... 31 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at java.base/sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
at java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
at java.base/java.security.cert.CertPathBuilder.build(CertPathBuilder.java:297)
at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:434)
... 37 more
Process finished with exit code -1
We are useing apache camel with ahc-ws to send messages from a industrial environment to a cloud server via websockets in the default configuration via ssl.
But when the connection breaks due to e.g. removal of the network cable. ahc-ws still sends the data.
Is there any configuration that we are missing to ensure the client received the message?
We are using apache camel version 3.1.0
And the ahc-ws component it uses async-http-client 2.10.5
<route id="timeseriesRoute" errorHandlerRef="timeseriesExceptionHandler" startupOrder="10001">
<from uri="seda:distributorTimeseriesEntryPoint"/>
<to uri="ahc-wss"/>
</route>
# normal operation sending data
2020-05-11 15:37:47.428 DEBUG 36156 --- [eriesEntryPoint] o.a.camel.component.ahc.ws.WsProducer : Sending out {"messageId":"53d4539a-fa79-45b5-b849-7ad465c42339","body":[{"name":"PROGRAM_END_COUNTER_cd21538e-d6a1-4dfb-bcde-251e8ce511df","datapoints":[[1589204267421,3979,3]],"attributes":{"datatype":"INTEGER"}}]}
2020-05-11 15:37:47.429 DEBUG 36156 --- [eriesEntryPoint] o.a.camel.component.ahc.ws.WsProducer : Sending out {"messageId":"9f5292d8-aedc-4509-ac7f-82884eb1e70e","body":[{"name":"OPERATION_MODE_cd21538e-d6a1-4dfb-bcde-251e8ce511df","datapoints":[[1589204267421,1,3]],"attributes":{"datatype":"INTEGER"}}]}
2020-05-11 15:37:47.429 DEBUG 36156 --- [eriesEntryPoint] o.a.camel.component.ahc.ws.WsProducer : Sending out {"messageId":"fafe9fd4-eb28-4171-a642-f6a1cee66017","body":[{"name":"RUNTIME_DATA_cd21538e-d6a1-4dfb-bcde-251e8ce511df","datapoints":[[1589204267421,true,3]],"attributes":{"datatype":"BOOLEAN"}}]}
2020-05-11 15:37:47.712 DEBUG 36156 --- [cHttpClient-3-1] o.a.camel.component.ahc.ws.WsEndpoint : Received message --> {"statusCode":202,"messageId":"53d4539a-fa79-45b5-b849-7ad465c42339"}
2020-05-11 15:37:47.814 DEBUG 36156 --- [cHttpClient-3-1] o.a.camel.component.ahc.ws.WsEndpoint : Received message --> {"statusCode":202,"messageId":"9f5292d8-aedc-4509-ac7f-82884eb1e70e"}
2020-05-11 15:37:47.915 DEBUG 36156 --- [cHttpClient-3-1] o.a.camel.component.ahc.ws.WsEndpoint : Received message --> {"statusCode":202,"messageId":"fafe9fd4-eb28-4171-a642-f6a1cee66017"}
# removed network cable
2020-05-11 15:37:52.432 DEBUG 36156 --- [eriesEntryPoint] o.a.camel.component.ahc.ws.WsProducer : Sending out {"messageId":"a25875af-8f54-4f2c-bc97-387cb824fc30","body":[{"name":"PROGRAM_END_COUNTER_cd21538e-d6a1-4dfb-bcde-251e8ce511df","datapoints":[[1589204272422,19594,3]],"attributes":{"datatype":"INTEGER"}}]}
2020-05-11 15:37:52.434 DEBUG 36156 --- [eriesEntryPoint] o.a.camel.component.ahc.ws.WsProducer : Sending out {"messageId":"aadea2b9-5d95-4df2-a776-9030666c8d4b","body":[{"name":"OPERATION_MODE_cd21538e-d6a1-4dfb-bcde-251e8ce511df","datapoints":[[1589204272422,2,3]],"attributes":{"datatype":"INTEGER"}}]}
2020-05-11 15:37:52.439 DEBUG 36156 --- [eriesEntryPoint] o.a.camel.component.ahc.ws.WsProducer : Sending out {"messageId":"7e78a167-782d-4eb6-a6e5-f91bd8e488fd","body":[{"name":"RUNTIME_DATA_cd21538e-d6a1-4dfb-bcde-251e8ce511df","datapoints":[[1589204272422,false,3]],"attributes":{"datatype":"BOOLEAN"}}]}
2020-05-11 15:37:53.172 DEBUG 36156 --- [eriesEntryPoint] o.a.camel.component.ahc.ws.WsProducer : Sending out {"messageId":"9021bcee-431a-4e4c-ba9e-999d57292dfd","body":[{"name":"OPERATION_MODE_cd21538e-d6a1-4dfb-bcde-251e8ce511df","datapoints":[[1589187213782,2,3]],"attributes":{"datatype":"INTEGER"}}]}
2020-05-11 15:37:53.178 DEBUG 36156 --- [eriesEntryPoint] o.a.camel.component.ahc.ws.WsProducer : Sending out {"messageId":"d72d4cd3-26f8-4f99-a712-63a71de6d02d","body":[{"name":"OPERATION_MODE_cd21538e-d6a1-4dfb-bcde-251e8ce511df","datapoints":[[1589187203987,1,3]],"attributes":{"datatype":"INTEGER"}}]}
2020-05-11 15:37:53.184 DEBUG 36156 --- [eriesEntryPoint] o.a.camel.component.ahc.ws.WsProducer : Sending out {"messageId":"d5457048-9487-4da5-bc0c-c3113672d8a7","body":[{"name":"RUNTIME_DATA_cd21538e-d6a1-4dfb-bcde-251e8ce511df","datapoints":[[1589187203987,true,3]],"attributes":{"datatype":"BOOLEAN"}}]}
2020-05-11 15:37:53.189 DEBUG 36156 --- [eriesEntryPoint] o.a.camel.component.ahc.ws.WsProducer : Sending out {"messageId":"df38d5f2-278b-4c3e-a814-3f779f4a83a9","body":[{"name":"PROGRAM_END_COUNTER_cd21538e-d6a1-4dfb-bcde-251e8ce511df","datapoints":[[1589187203987,48125,3]],"attributes":{"datatype":"INTEGER"}}]}
2020-05-11 15:37:53.195 DEBUG 36156 --- [eriesEntryPoint] o.a.camel.component.ahc.ws.WsProducer : Sending out {"messageId":"a451aa2d-67e4-40fb-a5ac-eba01a11e014","body":[{"name":"RUNTIME_DATA_cd21538e-d6a1-4dfb-bcde-251e8ce511df","datapoints":[[1589187186939,true,3]],"attributes":{"datatype":"BOOLEAN"}}]}
2020-05-11 15:37:57.427 DEBUG 36156 --- [eriesEntryPoint] o.a.camel.component.ahc.ws.WsProducer : Sending out {"messageId":"c9905ac3-38b2-4388-8e42-3a8d0994cabd","body":[{"name":"PROGRAM_END_COUNTER_cd21538e-d6a1-4dfb-bcde-251e8ce511df","datapoints":[[1589204277423,51036,3]],"attributes":{"datatype":"INTEGER"}}]}
2020-05-11 15:37:57.427 DEBUG 36156 --- [eriesEntryPoint] o.a.camel.component.ahc.ws.WsProducer : Sending out {"messageId":"3fe66fb8-7b88-4da2-b090-8699a2f3afca","body":[{"name":"RUNTIME_DATA_cd21538e-d6a1-4dfb-bcde-251e8ce511df","datapoints":[[1589204277423,true,3]],"attributes":{"datatype":"BOOLEAN"}}]}
2020-05-11 15:37:57.429 DEBUG 36156 --- [eriesEntryPoint] o.a.camel.component.ahc.ws.WsProducer : Sending out {"messageId":"c847d695-d84b-4726-9c84-5e48d36ee6ad","body":[{"name":"OPERATION_MODE_cd21538e-d6a1-4dfb-bcde-251e8ce511df","datapoints":[[1589204277423,0,3]],"attributes":{"datatype":"INTEGER"}}]}
2020-05-11 15:38:03.218 DEBUG 36156 --- [eriesEntryPoint] o.a.camel.component.ahc.ws.WsProducer : Sending out {"messageId":"c6281b02-c431-4b86-bcbf-07700e2b8450","body":[{"name":"OPERATION_MODE_cd21538e-d6a1-4dfb-bcde-251e8ce511df","datapoints":[[1589187219192,0,3]],"attributes":{"datatype":"INTEGER"}}]}
2020-05-11 15:38:03.223 DEBUG 36156 --- [eriesEntryPoint] o.a.camel.component.ahc.ws.WsProducer : Sending out {"messageId":"705363cb-bdb7-4fb8-bae7-f17d1b693658","body":[{"name":"RUNTIME_DATA_cd21538e-d6a1-4dfb-bcde-251e8ce511df","datapoints":[[1589187219191,true,3]],"attributes":{"datatype":"BOOLEAN"}}]}
2020-05-11 15:38:03.229 DEBUG 36156 --- [eriesEntryPoint] o.a.camel.component.ahc.ws.WsProducer : Sending out {"messageId":"979b5e45-23e0-4b99-aaf3-7cb8df9287a8","body":[{"name":"RUNTIME_DATA_cd21538e-d6a1-4dfb-bcde-251e8ce511df","datapoints":[[1589187213782,false,3]],"attributes":{"datatype":"BOOLEAN"}}]}
2020-05-11 15:38:03.234 DEBUG 36156 --- [eriesEntryPoint] o.a.camel.component.ahc.ws.WsProducer : Sending out {"messageId":"f510bb6e-3fc3-4b1c-bc42-90b43110e394","body":[{"name":"PROGRAM_END_COUNTER_cd21538e-d6a1-4dfb-bcde-251e8ce511df","datapoints":[[1589187213782,17756,3]],"attributes":{"datatype":"INTEGER"}}]}
2020-05-11 15:38:03.239 DEBUG 36156 --- [eriesEntryPoint] o.a.camel.component.ahc.ws.WsProducer : Sending out {"messageId":"a2a2e088-d2dc-4028-9643-25a25fcbdf80","body":[{"name":"RUNTIME_DATA_cd21538e-d6a1-4dfb-bcde-251e8ce511df","datapoints":[[1589187198214,false,3]],"attributes":{"datatype":"BOOLEAN"}}]}
2020-05-11 15:38:03.426 DEBUG 36156 --- [eriesEntryPoint] o.a.camel.component.ahc.ws.WsProducer : Sending out {"messageId":"de90d80a-9433-4310-87e9-eedf6f2277c6","body":[{"name":"OPERATION_MODE_cd21538e-d6a1-4dfb-bcde-251e8ce511df","datapoints":[[1589204283421,1,3]],"attributes":{"datatype":"INTEGER"}}]}
2020-05-11 15:38:03.429 DEBUG 36156 --- [eriesEntryPoint] o.a.camel.component.ahc.ws.WsProducer : Sending out {"messageId":"a2971272-c37c-4f82-b698-8baea6dcc7dc","body":[{"name":"PROGRAM_END_COUNTER_cd21538e-d6a1-4dfb-bcde-251e8ce511df","datapoints":[[1589204283421,48247,3]],"attributes":{"datatype":"INTEGER"}}]}
2020-05-11 15:38:03.429 DEBUG 36156 --- [eriesEntryPoint] o.a.camel.component.ahc.ws.WsProducer : Sending out {"messageId":"830c7ec5-2df1-476d-8e50-0f0c47e04232","body":[{"name":"RUNTIME_DATA_cd21538e-d6a1-4dfb-bcde-251e8ce511df","datapoints":[[1589204283421,false,3]],"attributes":{"datatype":"BOOLEAN"}}]}
2020-05-11 15:38:08.429 DEBUG 36156 --- [eriesEntryPoint] o.a.camel.component.ahc.ws.WsProducer : Sending out {"messageId":"7be3a918-3cc0-4b77-8213-6e05c8c07775","body":[{"name":"RUNTIME_DATA_cd21538e-d6a1-4dfb-bcde-251e8ce511df","datapoints":[[1589204288422,true,3]],"attributes":{"datatype":"BOOLEAN"}}]}
2020-05-11 15:38:08.430 DEBUG 36156 --- [eriesEntryPoint] o.a.camel.component.ahc.ws.WsProducer : Sending out {"messageId":"7264f325-7553-4fa8-8903-46482c10b968","body":[{"name":"OPERATION_MODE_cd21538e-d6a1-4dfb-bcde-251e8ce511df","datapoints":[[1589204288422,2,3]],"attributes":{"datatype":"INTEGER"}}]}
2020-05-11 15:38:08.431 DEBUG 36156 --- [eriesEntryPoint] o.a.camel.component.ahc.ws.WsProducer : Sending out {"messageId":"daf59001-6f83-47f3-842e-13d4641c1f4f","body":[{"name":"PROGRAM_END_COUNTER_cd21538e-d6a1-4dfb-bcde-251e8ce511df","datapoints":[[1589204288422,49374,3]],"attributes":{"datatype":"INTEGER"}}]}
2020-05-11 15:38:11.641 DEBUG 36156 --- [cHttpClient-3-1] o.a.camel.component.ahc.ws.WsEndpoint : websocket closed - reconnecting
2020-05-11 15:38:11.641 INFO 36156 --- [cHttpClient-3-1] o.a.camel.component.ahc.ws.WsEndpoint : Reconnecting websocket: wss
2020-05-11 15:38:11.641 DEBUG 36156 --- [cHttpClient-3-1] o.a.camel.component.ahc.ws.WsEndpoint : Connecting to wss
2020-05-11 15:38:13.278 DEBUG 36156 --- [eriesEntryPoint] o.a.camel.component.ahc.ws.WsProducer : Sending out {"messageId":"adfc5926-7c20-46c6-a56d-66c78cedd9d5","body":[{"name":"PROGRAM_END_COUNTER_cd21538e-d6a1-4dfb-bcde-251e8ce511df","datapoints":[[1589187242191,33465,3]],"attributes":{"datatype":"INTEGER"}}]}
2020-05-11 15:38:13.278 INFO 36156 --- [eriesEntryPoint] o.a.camel.component.ahc.ws.WsEndpoint : Reconnecting websocket: wss
2020-05-11 15:38:13.278 DEBUG 36156 --- [eriesEntryPoint] o.a.camel.component.ahc.ws.WsEndpoint : Connecting to wss
2020-05-11 15:38:21.654 DEBUG 36156 --- [cHttpClient-3-4] o.a.camel.component.ahc.ws.WsEndpoint : websocket on error
java.net.ConnectException: connection timed out: hostname/ip:443
at org.asynchttpclient.netty.channel.NettyConnectListener.onFailure(NettyConnectListener.java:179) ~[async-http-client-2.10.5.jar:na]
at org.asynchttpclient.netty.channel.NettyChannelConnector$1.onFailure(NettyChannelConnector.java:108) ~[async-http-client-2.10.5.jar:na]
at org.asynchttpclient.netty.SimpleChannelFutureListener.operationComplete(SimpleChannelFutureListener.java:28) ~[async-http-client-2.10.5.jar:na]
at org.asynchttpclient.netty.SimpleChannelFutureListener.operationComplete(SimpleChannelFutureListener.java:20) ~[async-http-client-2.10.5.jar:na]
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:577) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
at io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:570) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:549) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:490) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:615) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
at io.netty.util.concurrent.DefaultPromise.setFailure0(DefaultPromise.java:608) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
at io.netty.util.concurrent.DefaultPromise.tryFailure(DefaultPromise.java:117) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe$1.run(AbstractNioChannel.java:263) ~[netty-transport-4.1.42.Final.jar:4.1.42.Final]
at io.netty.util.concurrent.PromiseTask$RunnableAdapter.call(PromiseTask.java:38) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:139) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:510) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:518) ~[netty-transport-4.1.42.Final.jar:4.1.42.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$6.run(SingleThreadEventExecutor.java:1044) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
Caused by: io.netty.channel.ConnectTimeoutException: connection timed out: hostname/ip:443
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe$1.run(AbstractNioChannel.java:261) ~[netty-transport-4.1.42.Final.jar:4.1.42.Final]
... 9 common frames omitted
2020-05-11 15:38:21.655 WARN 36156 --- [cHttpClient-3-1] o.a.camel.component.ahc.ws.WsEndpoint : Error re-connecting to websocket
java.util.concurrent.ExecutionException: java.net.ConnectException: connection timed out: hostname/ip:443
at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395) ~[na:na]
at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1999) ~[na:na]
at org.asynchttpclient.netty.NettyResponseFuture.get(NettyResponseFuture.java:201) ~[async-http-client-2.10.5.jar:na]
at org.apache.camel.component.ahc.ws.WsEndpoint.connect(WsEndpoint.java:130) ~[camel-ahc-ws-3.1.0.jar:3.1.0]
at org.apache.camel.component.ahc.ws.WsEndpoint.reConnect(WsEndpoint.java:159) ~[camel-ahc-ws-3.1.0.jar:3.1.0]
at org.apache.camel.component.ahc.ws.WsEndpoint$WsListener.onClose(WsEndpoint.java:174) ~[camel-ahc-ws-3.1.0.jar:3.1.0]
at org.asynchttpclient.netty.ws.NettyWebSocket.onClose(NettyWebSocket.java:259) ~[async-http-client-2.10.5.jar:na]
at org.asynchttpclient.netty.handler.WebSocketHandler.handleChannelInactive(WebSocketHandler.java:162) ~[async-http-client-2.10.5.jar:na]
at org.asynchttpclient.netty.handler.AsyncHttpClientHandler.channelInactive(AsyncHttpClientHandler.java:144) ~[async-http-client-2.10.5.jar:na]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:257) ~[netty-transport-4.1.42.Final.jar:4.1.42.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:243) ~[netty-transport-4.1.42.Final.jar:4.1.42.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:236) ~[netty-transport-4.1.42.Final.jar:4.1.42.Final]
at io.netty.channel.ChannelInboundHandlerAdapter.channelInactive(ChannelInboundHandlerAdapter.java:81) ~[netty-transport-4.1.42.Final.jar:4.1.42.Final]
at io.netty.handler.codec.MessageAggregator.channelInactive(MessageAggregator.java:438) ~[netty-codec-4.1.42.Final.jar:4.1.42.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:257) ~[netty-transport-4.1.42.Final.jar:4.1.42.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:243) ~[netty-transport-4.1.42.Final.jar:4.1.42.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:236) ~[netty-transport-4.1.42.Final.jar:4.1.42.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelInputClosed(ByteToMessageDecoder.java:393) ~[netty-codec-4.1.42.Final.jar:4.1.42.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java:358) ~[netty-codec-4.1.42.Final.jar:4.1.42.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:257) ~[netty-transport-4.1.42.Final.jar:4.1.42.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:243) ~[netty-transport-4.1.42.Final.jar:4.1.42.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:236) ~[netty-transport-4.1.42.Final.jar:4.1.42.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelInputClosed(ByteToMessageDecoder.java:393) ~[netty-codec-4.1.42.Final.jar:4.1.42.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java:358) ~[netty-codec-4.1.42.Final.jar:4.1.42.Final]
at io.netty.handler.ssl.SslHandler.channelInactive(SslHandler.java:1075) ~[netty-handler-4.1.42.Final.jar:4.1.42.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:257) ~[netty-transport-4.1.42.Final.jar:4.1.42.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:243) ~[netty-transport-4.1.42.Final.jar:4.1.42.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:236) ~[netty-transport-4.1.42.Final.jar:4.1.42.Final]
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelInactive(DefaultChannelPipeline.java:1417) ~[netty-transport-4.1.42.Final.jar:4.1.42.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:257) ~[netty-transport-4.1.42.Final.jar:4.1.42.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:243) ~[netty-transport-4.1.42.Final.jar:4.1.42.Final]
at io.netty.channel.DefaultChannelPipeline.fireChannelInactive(DefaultChannelPipeline.java:913) ~[netty-transport-4.1.42.Final.jar:4.1.42.Final]
at io.netty.channel.AbstractChannel$AbstractUnsafe$8.run(AbstractChannel.java:819) ~[netty-transport-4.1.42.Final.jar:4.1.42.Final]
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:510) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:518) ~[netty-transport-4.1.42.Final.jar:4.1.42.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$6.run(SingleThreadEventExecutor.java:1044) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
Caused by: java.net.ConnectException: connection timed out: hostname/ip:443
at org.asynchttpclient.netty.channel.NettyConnectListener.onFailure(NettyConnectListener.java:179) ~[async-http-client-2.10.5.jar:na]
at org.asynchttpclient.netty.channel.NettyChannelConnector$1.onFailure(NettyChannelConnector.java:108) ~[async-http-client-2.10.5.jar:na]
at org.asynchttpclient.netty.SimpleChannelFutureListener.operationComplete(SimpleChannelFutureListener.java:28) ~[async-http-client-2.10.5.jar:na]
at org.asynchttpclient.netty.SimpleChannelFutureListener.operationComplete(SimpleChannelFutureListener.java:20) ~[async-http-client-2.10.5.jar:na]
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:577) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
at io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:570) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:549) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:490) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:615) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
at io.netty.util.concurrent.DefaultPromise.setFailure0(DefaultPromise.java:608) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
at io.netty.util.concurrent.DefaultPromise.tryFailure(DefaultPromise.java:117) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe$1.run(AbstractNioChannel.java:263) ~[netty-transport-4.1.42.Final.jar:4.1.42.Final]
at io.netty.util.concurrent.PromiseTask$RunnableAdapter.call(PromiseTask.java:38) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:139) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
... 7 common frames omitted
Caused by: io.netty.channel.ConnectTimeoutException: connection timed out: hostname/ip:443
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe$1.run(AbstractNioChannel.java:261) ~[netty-transport-4.1.42.Final.jar:4.1.42.Final]
... 9 common frames omitted
2020-05-11 15:38:23.285 DEBUG 36156 --- [cHttpClient-3-5] o.a.camel.component.ahc.ws.WsEndpoint : websocket on error
java.net.ConnectException: connection timed out: hostname/ip:443
at org.asynchttpclient.netty.channel.NettyConnectListener.onFailure(NettyConnectListener.java:179) ~[async-http-client-2.10.5.jar:na]
at org.asynchttpclient.netty.channel.NettyChannelConnector$1.onFailure(NettyChannelConnector.java:108) ~[async-http-client-2.10.5.jar:na]
at org.asynchttpclient.netty.SimpleChannelFutureListener.operationComplete(SimpleChannelFutureListener.java:28) ~[async-http-client-2.10.5.jar:na]
at org.asynchttpclient.netty.SimpleChannelFutureListener.operationComplete(SimpleChannelFutureListener.java:20) ~[async-http-client-2.10.5.jar:na]
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:577) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
at io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:570) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:549) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:490) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:615) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
at io.netty.util.concurrent.DefaultPromise.setFailure0(DefaultPromise.java:608) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
at io.netty.util.concurrent.DefaultPromise.tryFailure(DefaultPromise.java:117) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe$1.run(AbstractNioChannel.java:263) ~[netty-transport-4.1.42.Final.jar:4.1.42.Final]
at io.netty.util.concurrent.PromiseTask$RunnableAdapter.call(PromiseTask.java:38) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:139) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:510) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:518) ~[netty-transport-4.1.42.Final.jar:4.1.42.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$6.run(SingleThreadEventExecutor.java:1044) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.42.Final.jar:4.1.42.Final]
at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
Caused by: io.netty.channel.ConnectTimeoutException: connection timed out: hostname/ip:443
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe$1.run(AbstractNioChannel.java:261) ~[netty-transport-4.1.42.Final.jar:4.1.42.Final]
... 9 common frames omitted
2020-05-11 15:38:23.289 DEBUG 36156 --- [eriesEntryPoint] o.a.camel.component.ahc.ws.WsProducer : Sending out {"messageId":"4952fb3a-805a-4c46-9647-1607a4ca9b1e","body":[{"name":"OPERATION_MODE_cd21538e-d6a1-4dfb-bcde-251e8ce511df","datapoints":[[1589187225192,1,3]],"attributes":{"datatype":"INTEGER"}}]}
2020-05-11 15:38:23.289 INFO 36156 --- [eriesEntryPoint] o.a.camel.component.ahc.ws.WsEndpoint : Reconnecting websocket: wss
2020-05-11 15:38:23.289 DEBUG 36156 --- [eriesEntryPoint] o.a.camel.component.ahc.ws.WsEndpoint : Connecting to wss
2020-05-11 15:38:23.322 INFO 36156 --- [CloudTimeseries] o.a.c.i.e.RuntimeCamelCatalogResolver : Detected and using RuntimeCamelCatalog: org.apache.camel.catalog.impl.DefaultRuntimeCamelCatalog#3dd3d313
the webservice continues sending data afger removing the network cable (2020-05-11 15:37:48) it detects an error later on (2020-05-11 15:38:21)but the data send in the meantime is lost.
The web service does acknowledge each processed message (#see normal operation) but I don't see to react on this.
the error handler seems not to react on this.
I am trying to set up client-side load balancing using ribbon and consul.
Spring boot version 2.1.4.Release
Spring cloud version Greenwich.SR1
From the log I can see that the service name got resolved correctly by query the consul agent, however, the request to the actual server always results in a SocketTimeoutException.
I have set the logging.level.org.apache.http to DEBUG. it seems the server actually respond successfully.
The relevant part of the log is attached.
2019-05-22 14:27:06.013 INFO 22692 --- [erListUpdater-0] c.netflix.config.ChainedDynamicProperty : Flipping property: mrqcon.ribbon.ActiveConnectionsLimit to use NEXT property: niws.loadbalancer.availabilityFilteringRule.activeConnectionsLimit = 2147483647
2019-05-22 14:27:07.492 DEBUG 22692 --- [TaskScheduler-1] org.apache.http.wire : http-outgoing-0 << "HTTP/1.1 200 OK[\r][\n]"
2019-05-22 14:27:07.492 DEBUG 22692 --- [TaskScheduler-1] org.apache.http.wire : http-outgoing-0 << "Content-Encoding: gzip[\r][\n]"
2019-05-22 14:27:07.492 DEBUG 22692 --- [TaskScheduler-1] org.apache.http.wire : http-outgoing-0 << "Content-Type: application/json[\r][\n]"
2019-05-22 14:27:07.492 DEBUG 22692 --- [TaskScheduler-1] org.apache.http.wire : http-outgoing-0 << "Vary: Accept-Encoding[\r][\n]"
2019-05-22 14:27:07.493 DEBUG 22692 --- [TaskScheduler-1] org.apache.http.wire : http-outgoing-0 << "X-Consul-Effective-Consistency: leader[\r][\n]"
2019-05-22 14:27:07.493 DEBUG 22692 --- [TaskScheduler-1] org.apache.http.wire : http-outgoing-0 << "X-Consul-Index: 779[\r][\n]"
2019-05-22 14:27:07.493 DEBUG 22692 --- [TaskScheduler-1] org.apache.http.wire : http-outgoing-0 << "X-Consul-Knownleader: true[\r][\n]"
2019-05-22 14:27:07.493 DEBUG 22692 --- [TaskScheduler-1] org.apache.http.wire : http-outgoing-0 << "X-Consul-Lastcontact: 0[\r][\n]"
2019-05-22 14:27:07.493 DEBUG 22692 --- [TaskScheduler-1] org.apache.http.wire : http-outgoing-0 << "Date: Wed, 22 May 2019 06:27:24 GMT[\r][\n]"
2019-05-22 14:27:07.493 DEBUG 22692 --- [TaskScheduler-1] org.apache.http.wire : http-outgoing-0 << "Content-Length: 122[\r][\n]"
2019-05-22 14:27:07.493 DEBUG 22692 --- [TaskScheduler-1] org.apache.http.wire : http-outgoing-0 << "[\r][\n]"
2019-05-22 14:27:07.493 DEBUG 22692 --- [TaskScheduler-1] org.apache.http.wire : http-outgoing-0 << "[0x1f][0x8b][0x8][0x0][0x0][0x0][0x0][0x0][0x0][0xff][0xaa][0xe6]RPPPPJ[0xce][0xcf]+.[0xcd]Q[0xb2]R[0x88][0x8e][0xd5][0x81][0x88][0xe4][0x16][0x15]$[0x16][0x15][0xa7][0x16][0x81][0xc4][0xc0]"`[0xd1][0xe2][0xd4][0xe4][0xd2][0xa2]T[0xdb][0xb4][0xc4][0x9c][0xe2]T%[0x1d][0x84]xr~^IjEI#bI[0x86][0xad]~bA[0xa6]~[0x99][0xa1][0x9e][0x81]~jn[0x91][0x12]X[\r][0xc2][0xd0][0xc2][0xe4][0xfc]<T#qk[0xd5][0xc1]a/[0xc4]H[0xae]Z.#[0x0][0x0][0x0][0xff][0xff][0xa7][0xc2][0x1b][0x3][0xbd][0x0][0x0][0x0]"
2019-05-22 14:27:07.493 DEBUG 22692 --- [TaskScheduler-1] org.apache.http.headers : http-outgoing-0 << HTTP/1.1 200 OK
2019-05-22 14:27:07.493 DEBUG 22692 --- [TaskScheduler-1] org.apache.http.headers : http-outgoing-0 << Content-Encoding: gzip
2019-05-22 14:27:07.493 DEBUG 22692 --- [TaskScheduler-1] org.apache.http.headers : http-outgoing-0 << Content-Type: application/json
2019-05-22 14:27:07.493 DEBUG 22692 --- [TaskScheduler-1] org.apache.http.headers : http-outgoing-0 << Vary: Accept-Encoding
2019-05-22 14:27:07.493 DEBUG 22692 --- [TaskScheduler-1] org.apache.http.headers : http-outgoing-0 << X-Consul-Effective-Consistency: leader
2019-05-22 14:27:07.493 DEBUG 22692 --- [TaskScheduler-1] org.apache.http.headers : http-outgoing-0 << X-Consul-Index: 779
2019-05-22 14:27:07.493 DEBUG 22692 --- [TaskScheduler-1] org.apache.http.headers : http-outgoing-0 << X-Consul-Knownleader: true
2019-05-22 14:27:07.493 DEBUG 22692 --- [TaskScheduler-1] org.apache.http.headers : http-outgoing-0 << X-Consul-Lastcontact: 0
2019-05-22 14:27:07.493 DEBUG 22692 --- [TaskScheduler-1] org.apache.http.headers : http-outgoing-0 << Date: Wed, 22 May 2019 06:27:24 GMT
2019-05-22 14:27:07.493 DEBUG 22692 --- [TaskScheduler-1] org.apache.http.headers : http-outgoing-0 << Content-Length: 122
2019-05-22 14:27:07.493 DEBUG 22692 --- [TaskScheduler-1] o.a.http.impl.execchain.MainClientExec : Connection can be kept alive indefinitely
2019-05-22 14:27:07.493 DEBUG 22692 --- [TaskScheduler-1] h.i.c.PoolingHttpClientConnectionManager : Connection [id: 0][route: {}->http://localhost:8500] can be kept alive indefinitely
2019-05-22 14:27:07.493 DEBUG 22692 --- [TaskScheduler-1] h.i.c.DefaultManagedHttpClientConnection : http-outgoing-0: set socket timeout to 0
2019-05-22 14:27:07.493 DEBUG 22692 --- [TaskScheduler-1] h.i.c.PoolingHttpClientConnectionManager : Connection released: [id: 0][route: {}->http://localhost:8500][total kept alive: 2; route allocated: 2 of 500; total allocated: 2 of 1000]
2019-05-22 14:27:08.394 DEBUG 22692 --- [nio-8000-exec-2] org.apache.http.wire : http-outgoing-2 << "[read] I/O error: Read timed out"
2019-05-22 14:27:08.394 DEBUG 22692 --- [nio-8000-exec-2] h.i.c.DefaultManagedHttpClientConnection : http-outgoing-2: Close connection
2019-05-22 14:27:08.394 DEBUG 22692 --- [nio-8000-exec-2] h.i.c.DefaultManagedHttpClientConnection : http-outgoing-2: Shutdown connection
2019-05-22 14:27:08.395 DEBUG 22692 --- [nio-8000-exec-2] o.a.http.impl.execchain.MainClientExec : Connection discarded
2019-05-22 14:27:08.395 DEBUG 22692 --- [nio-8000-exec-2] h.i.c.PoolingHttpClientConnectionManager : Connection released: [id: 2][route: {}->http://30.5.40.181:8080][total kept alive: 0; route allocated: 0 of 5; total allocated: 0 of 10]
2019-05-22 14:27:08.396 INFO 22692 --- [nio-8000-exec-2] c.a.m.n.h.m.utils.RemoteServiceHandler : Retry request, execution count: 2, exception: {}
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method) ~[na:1.8.0_152]
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116) ~[na:1.8.0_152]
at java.net.SocketInputStream.read(SocketInputStream.java:171) ~[na:1.8.0_152]
at java.net.SocketInputStream.read(SocketInputStream.java:141) ~[na:1.8.0_152]
at org.apache.http.impl.conn.LoggingInputStream.read(LoggingInputStream.java:84) ~[httpclient-4.5.8.jar:4.5.8]
at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:137) ~[httpcore-4.4.11.jar:4.4.11]
at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:153) ~[httpcore-4.4.11.jar:4.4.11]
at org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:280) ~[httpcore-4.4.11.jar:4.4.11]
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:138) ~[httpclient-4.5.8.jar:4.5.8]
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:56) ~[httpclient-4.5.8.jar:4.5.8]
at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:259) ~[httpcore-4.4.11.jar:4.4.11]
at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:163) ~[httpcore-4.4.11.jar:4.4.11]
at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:157) ~[httpclient-4.5.8.jar:4.5.8]
at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:273) ~[httpcore-4.4.11.jar:4.4.11]
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125) ~[httpcore-4.4.11.jar:4.4.11]
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:272) ~[httpclient-4.5.8.jar:4.5.8]
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186) ~[httpclient-4.5.8.jar:4.5.8]
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) ~[httpclient-4.5.8.jar:4.5.8]
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) [httpclient-4.5.8.jar:4.5.8]
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) [httpclient-4.5.8.jar:4.5.8]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) [httpclient-4.5.8.jar:4.5.8]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56) [httpclient-4.5.8.jar:4.5.8]
at org.springframework.http.client.HttpComponentsClientHttpRequest.executeInternal(HttpComponentsClientHttpRequest.java:87) [spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:48) [spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:53) [spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.http.client.BufferingClientHttpRequestWrapper.executeInternal(BufferingClientHttpRequestWrapper.java:63) [spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:48) [spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:53) [spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.http.client.InterceptingClientHttpRequest$InterceptingRequestExecution.execute(InterceptingClientHttpRequest.java:108) [spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.cloud.client.loadbalancer.LoadBalancerRequestFactory.lambda$createRequest$0(LoadBalancerRequestFactory.java:61) [spring-cloud-commons-2.1.1.RELEASE.jar:2.1.1.RELEASE]
at org.springframework.cloud.netflix.ribbon.RibbonLoadBalancerClient.execute(RibbonLoadBalancerClient.java:144) ~[spring-cloud-netflix-ribbon-2.1.1.RELEASE.jar:2.1.1.RELEASE]
at org.springframework.cloud.netflix.ribbon.RibbonLoadBalancerClient.execute(RibbonLoadBalancerClient.java:125) ~[spring-cloud-netflix-ribbon-2.1.1.RELEASE.jar:2.1.1.RELEASE]
at org.springframework.cloud.netflix.ribbon.RibbonLoadBalancerClient.execute(RibbonLoadBalancerClient.java:99) ~[spring-cloud-netflix-ribbon-2.1.1.RELEASE.jar:2.1.1.RELEASE]
at org.springframework.cloud.client.loadbalancer.LoadBalancerInterceptor.intercept(LoadBalancerInterceptor.java:58) ~[spring-cloud-commons-2.1.1.RELEASE.jar:2.1.1.RELEASE]
at org.springframework.http.client.InterceptingClientHttpRequest$InterceptingRequestExecution.execute(InterceptingClientHttpRequest.java:92) [spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.http.client.InterceptingClientHttpRequest.executeInternal(InterceptingClientHttpRequest.java:76) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:48) [spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:53) [spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:735) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:670) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.web.client.RestTemplate.postForObject(RestTemplate.java:414) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at com.alibaba.mit.nlp.haikou.mrparser.utils.RemoteServiceHandler.process(RemoteServiceHandler.java:130) ~[classes/:na]
at com.alibaba.mit.nlp.haikou.mrparser.core.MrParser.handleExternalCall(MrParser.java:636) ~[classes/:na]
at com.alibaba.mit.nlp.haikou.mrparser.core.MrParser.analyzeMrHelper(MrParser.java:589) ~[classes/:na]
at com.alibaba.mit.nlp.haikou.mrparser.core.MrParser.analyzeMrHelper(MrParser.java:604) ~[classes/:na]
at com.alibaba.mit.nlp.haikou.mrparser.core.MrParser.analyzeMrHelper(MrParser.java:584) ~[classes/:na]
at com.alibaba.mit.nlp.haikou.mrparser.core.MrParser.analyzeMrHelper(MrParser.java:604) ~[classes/:na]
at com.alibaba.mit.nlp.haikou.mrparser.core.MrParser.analyzeMr(MrParser.java:353) ~[classes/:na]
at com.alibaba.mit.nlp.haikou.mrparser.core.MrParser.analyzeMr(MrParser.java:374) ~[classes/:na]
at com.alibaba.mit.nlp.haikou.mrparser.controller.ParseController.parse(ParseController.java:69) ~[classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_152]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_152]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_152]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_152]
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:189) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102) ~[spring-webmvc-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:892) ~[spring-webmvc-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797) ~[spring-webmvc-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1038) ~[spring-webmvc-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942) ~[spring-webmvc-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1005) ~[spring-webmvc-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:908) ~[spring-webmvc-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:660) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:882) ~[spring-webmvc-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-9.0.17.jar:9.0.17]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
at org.springframework.boot.actuate.web.trace.servlet.HttpTraceFilter.doFilterInternal(HttpTraceFilter.java:90) ~[spring-boot-actuator-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:92) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.filterAndRecordMetrics(WebMvcMetricsFilter.java:117) ~[spring-boot-actuator-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:106) ~[spring-boot-actuator-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:200) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:834) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_152]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_152]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-9.0.17.jar:9.0.17]
at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_152]
2019-05-22 14:27:08.397 INFO 22692 --- [nio-8000-exec-2] o.apache.http.impl.execchain.RetryExec : I/O exception (java.net.SocketTimeoutException) caught when processing request to {}->http://30.5.40.181:8080: Read timed out
2019-05-22 14:27:08.398 DEBUG 22692 --- [nio-8000-exec-2] o.apache.http.impl.execchain.RetryExec : Read timed out
I am trying to use spring data microservice to connect to config server to get mysql properties.
I can see the service can talk to config server and get the properties loaded.. but it is unable to register in Eureka after that. Also, discovery client is unable to make heartbeats
It works and registers fine when config server dependency is removed and all the properties lie in application.yml file
Any help on this is really appreciated.
Config server Configuration
server:
port: 8888
spring:
application:
name: configserver
cloud:
config:
server:
git:
uri: <github path>
spring:
application:
name: configserver
Eureka server Configuration
server:
port: ${PORT:8761} # Indicate the default PORT where this service will be started
eureka:
instance:
hostname: localhost
client:
registerWithEureka: false # telling the server not to register himself in the service
fetchRegistry: false
serviceUrl:
defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka/
Discovery Client configuration
spring:
cloud:
config:
uri: http://localhost:8888
application:
name: inventoryservice
server:
port: 8098
eureka:
client:
register-with-eureka: true
fetch-registry: false
serviceUrl:
defaultZone: http://localhost:8761/eureka/
logging:
file: error.log
Stacktrace of exception -
2018-05-08 16:47:41.734 INFO 54300 --- [main] o.s.c.n.e.s.EurekaServiceRegistry : Registering application inventoryservice with eureka with status UP
2018-05-08 16:47:41.735 INFO 54300 --- [main] com.netflix.discovery.DiscoveryClient : Saw local status change event StatusChangeEvent [timestamp=1525778261735, current=UP, previous=STARTING]
2018-05-08 16:47:41.737 INFO 54300 --- [DiscoveryClient-InstanceInfoReplicator-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_INVENTORYSERVICE/localhost:inventoryservice:8098: registering service...
2018-05-08 16:47:41.857 INFO 54300 --- [main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8098 (http)
2018-05-08 16:47:41.858 INFO 54300 --- [main] .s.c.n.e.s.EurekaAutoServiceRegistration : Updating port to 8098
2018-05-08 16:47:41.862 INFO 54300 --- [main] c.m.cloud.InventoryServiceApplication : Started InventoryServiceApplication in 17.788 seconds (JVM running for 18.544)
2018-05-08 16:47:43.830 ERROR 54300 --- [DiscoveryClient-InstanceInfoReplicator-0] c.n.d.s.t.d.RedirectingEurekaHttpClient : Request execution error
com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Connection refused: connect
at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:187) ~[jersey-apache-client4-1.19.1.jar:1.19.1]
at com.sun.jersey.api.client.filter.GZIPContentEncodingFilter.handle(GZIPContentEncodingFilter.java:123) ~[jersey-client-1.19.1.jar:1.19.1]
at com.netflix.discovery.EurekaIdentityHeaderFilter.handle(EurekaIdentityHeaderFilter.java:27) ~[eureka-client-1.6.2.jar:1.6.2]
at com.sun.jersey.api.client.Client.handle(Client.java:652) ~[jersey-client-1.19.1.jar:1.19.1]
at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682) ~[jersey-client-1.19.1.jar:1.19.1]
at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74) ~[jersey-client-1.19.1.jar:1.19.1]
at com.sun.jersey.api.client.WebResource$Builder.post(WebResource.java:570) ~[jersey-client-1.19.1.jar:1.19.1]
at com.netflix.discovery.shared.transport.jersey.AbstractJerseyEurekaHttpClient.register(AbstractJerseyEurekaHttpClient.java:56) ~[eureka-client-1.6.2.jar:1.6.2]
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$1.execute(EurekaHttpClientDecorator.java:59) [eureka-client-1.6.2.jar:1.6.2]
at com.netflix.discovery.shared.transport.decorator.MetricsCollectingEurekaHttpClient.execute(MetricsCollectingEurekaHttpClient.java:73) ~[eureka-client-1.6.2.jar:1.6.2]
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.register(EurekaHttpClientDecorator.java:56) [eureka-client-1.6.2.jar:1.6.2]
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$1.execute(EurekaHttpClientDecorator.java:59) [eureka-client-1.6.2.jar:1.6.2]
at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.executeOnNewServer(RedirectingEurekaHttpClient.java:118) ~[eureka-client-1.6.2.jar:1.6.2]
at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.execute(RedirectingEurekaHttpClient.java:79) ~[eureka-client-1.6.2.jar:1.6.2]
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.register(EurekaHttpClientDecorator.java:56) [eureka-client-1.6.2.jar:1.6.2]
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$1.execute(EurekaHttpClientDecorator.java:59) [eureka-client-1.6.2.jar:1.6.2]
at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:119) [eureka-client-1.6.2.jar:1.6.2]
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.register(EurekaHttpClientDecorator.java:56) [eureka-client-1.6.2.jar:1.6.2]
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$1.execute(EurekaHttpClientDecorator.java:59) [eureka-client-1.6.2.jar:1.6.2]
at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77) [eureka-client-1.6.2.jar:1.6.2]
at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.register(EurekaHttpClientDecorator.java:56) [eureka-client-1.6.2.jar:1.6.2]
at com.netflix.discovery.DiscoveryClient.register(DiscoveryClient.java:798) [eureka-client-1.6.2.jar:1.6.2]
at com.netflix.discovery.InstanceInfoReplicator.run(InstanceInfoReplicator.java:104) [eureka-client-1.6.2.jar:1.6.2]
at com.netflix.discovery.InstanceInfoReplicator$1.run(InstanceInfoReplicator.java:88) [eureka-client-1.6.2.jar:1.6.2]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_101]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_101]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_101]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.8.0_101]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_101]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_101]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_101]
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) ~[na:1.8.0_101]
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85) ~[na:1.8.0_101]
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[na:1.8.0_101]
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[na:1.8.0_101]
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[na:1.8.0_101]
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) ~[na:1.8.0_101]
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0_101]
at java.net.Socket.connect(Socket.java:589) ~[na:1.8.0_101]
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:121) ~[httpclient-4.5.3.jar:4.5.3]
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180) ~[httpclient-4.5.3.jar:4.5.3]
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:144) ~[httpclient-4.5.3.jar:4.5.3]
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:134) ~[httpclient-4.5.3.jar:4.5.3]
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:610) ~[httpclient-4.5.3.jar:4.5.3]
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:445) ~[httpclient-4.5.3.jar:4.5.3]
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835) ~[httpclient-4.5.3.jar:4.5.3]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:118) ~[httpclient-4.5.3.jar:4.5.3]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56) ~[httpclient-4.5.3.jar:4.5.3]
at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:173) ~[jersey-apache-client4-1.19.1.jar:1.19.1]
... 30 common frames omitted
2018-05-08 16:47:43.831 WARN 54300 --- [DiscoveryClient-InstanceInfoReplicator-0] c.n.d.s.t.d.RetryableEurekaHttpClient : Request execution failed with message: java.net.ConnectException: Connection refused: connect
2018-05-08 16:47:45.162 INFO 54300 --- [RMI TCP Connection(4)-127.0.0.1] inMXBeanRegistrar$SpringApplicationAdmin : Application shutdown requested.
2018-05-08 16:47:45.163 INFO 54300 --- [RMI TCP Connection(4)-127.0.0.1] ationConfigEmbeddedWebApplicationContext : Closing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#5c153b9e: startup date [Tue May 08 16:47:33 IST 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext#7770f470
2018-05-08 16:47:45.163 INFO 54300 --- [RMI TCP Connection(4)-127.0.0.1] o.s.c.n.e.s.EurekaServiceRegistry : Unregistering application inventoryservice with eureka with status DOWN
2018-05-08 16:47:45.164 WARN 54300 --- [RMI TCP Connection(4)-127.0.0.1] com.netflix.discovery.DiscoveryClient : Saw local status change event StatusChangeEvent [timestamp=1525778265164, current=DOWN, previous=UP]
2018-05-08 16:47:45.164 INFO 54300 --- [RMI TCP Connection(4)-127.0.0.1] com.netflix.discovery.DiscoveryClient : Shutting down DiscoveryClient ...
2018-05-08 16:47:45.164 INFO 54300 --- [RMI TCP Connection(4)-127.0.0.1] com.netflix.discovery.DiscoveryClient : Unregistering ...
2018-05-08 16:47:45.837 ERROR 54300 --- [DiscoveryClient-InstanceInfoReplicator-0] c.n.d.s.t.d.RedirectingEurekaHttpClient : Request execution error