Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WriteApi does nothing after WriteRetriableErrorEvent #357

Closed
olenagerasimova opened this issue May 25, 2022 · 6 comments · Fixed by #358
Closed

WriteApi does nothing after WriteRetriableErrorEvent #357

olenagerasimova opened this issue May 25, 2022 · 6 comments · Fixed by #358
Labels
bug Something isn't working
Milestone

Comments

@olenagerasimova
Copy link

olenagerasimova commented May 25, 2022

Hi, I'm using influxdb-client-java 6.0.0 asynchronous non-blocking API to write data to Influx DB with writePoint method. If db is not available for some time, WriteRetriableErrorEvent happens as expected with exception:

`com.influxdb.exceptions.InfluxException: Failed to connect to ...
	at com.influxdb.internal.AbstractRestClient.toInfluxException(AbstractRestClient.java:101) ~[influxdb-client-core-6.0.0.jar!/:6.0.0]
	at com.influxdb.client.internal.AbstractWriteClient.access$700(AbstractWriteClient.java:69) ~[influxdb-client-java-6.0.0.jar!/:6.0.0]
	at com.influxdb.client.internal.AbstractWriteClient$ToWritePointsMaybe.lambda$apply$1(AbstractWriteClient.java:415) ~[influxdb-client-java-6.0.0.jar!/:6.0.0]
	at com.influxdb.client.internal.AbstractWriteClient.lambda$null$21(AbstractWriteClient.java:517) ~[influxdb-client-java-6.0.0.jar!/:6.0.0]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableFlatMap$MergeSubscriber.onNext(FlowableFlatMap.java:130) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableZip$ZipCoordinator.drain(FlowableZip.java:243) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableZip$ZipSubscriber.onNext(FlowableZip.java:371) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.processors.UnicastProcessor.drainFused(UnicastProcessor.java:349) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.processors.UnicastProcessor.drain(UnicastProcessor.java:382) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.processors.UnicastProcessor.onNext(UnicastProcessor.java:444) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.processors.SerializedProcessor.onNext(SerializedProcessor.java:103) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableRepeatWhen$WhenSourceSubscriber.again(FlowableRepeatWhen.java:171) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableRetryWhen$RetryWhenSubscriber.onError(FlowableRetryWhen.java:77) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.maybe.MaybeToFlowable$MaybeToFlowableSubscriber.onError(MaybeToFlowable.java:75) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.maybe.MaybeMap$MapMaybeObserver.onError(MaybeMap.java:95) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.maybe.MaybeFromSingle$FromSingleObserver.onError(MaybeFromSingle.java:82) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.observable.ObservableSingleSingle$SingleElementObserver.onError(ObservableSingleSingle.java:94) ~[rxjava-3.1.4.jar!/:na]
	at retrofit2.adapter.rxjava3.CallExecuteObservable.subscribeActual(CallExecuteObservable.java:60) ~[adapter-rxjava3-2.9.0.jar!/:na]
	at io.reactivex.rxjava3.core.Observable.subscribe(Observable.java:13176) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.observable.ObservableSingleSingle.subscribeActual(ObservableSingleSingle.java:36) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4855) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.maybe.MaybeFromSingle.subscribeActual(MaybeFromSingle.java:41) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.core.Maybe.subscribe(Maybe.java:5375) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.maybe.MaybeMap.subscribeActual(MaybeMap.java:41) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.core.Maybe.subscribe(Maybe.java:5375) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.maybe.MaybeToFlowable.subscribeActual(MaybeToFlowable.java:45) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15917) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15863) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableRepeatWhen$WhenReceiver.onNext(FlowableRepeatWhen.java:100) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableRetryWhen.subscribeActual(FlowableRetryWhen.java:63) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15917) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableSingleMaybe.subscribeActual(FlowableSingleMaybe.java:34) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.core.Maybe.subscribe(Maybe.java:5375) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.maybe.MaybeTimeoutMaybe.subscribeActual(MaybeTimeoutMaybe.java:50) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.core.Maybe.subscribe(Maybe.java:5375) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.maybe.MaybeMap.subscribeActual(MaybeMap.java:41) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.core.Maybe.subscribe(Maybe.java:5375) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.maybe.MaybePeek.subscribeActual(MaybePeek.java:56) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.core.Maybe.subscribe(Maybe.java:5375) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.maybe.MaybeOnErrorNext.subscribeActual(MaybeOnErrorNext.java:42) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.core.Maybe.subscribe(Maybe.java:5375) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.mixed.FlowableConcatMapMaybe$ConcatMapMaybeSubscriber.drain(FlowableConcatMapMaybe.java:230) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.mixed.ConcatMapXMainSubscriber.onNext(ConcatMapXMainSubscriber.java:106) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.mixed.FlowableConcatMapSingle$ConcatMapSingleSubscriber.drain(FlowableConcatMapSingle.java:233) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.mixed.FlowableConcatMapSingle$ConcatMapSingleSubscriber.innerSuccess(FlowableConcatMapSingle.java:129) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.mixed.FlowableConcatMapSingle$ConcatMapSingleSubscriber$ConcatMapSingleObserver.onSuccess(FlowableConcatMapSingle.java:271) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.single.SingleMap$MapSingleObserver.onSuccess(SingleMap.java:65) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.single.SingleMap$MapSingleObserver.onSuccess(SingleMap.java:65) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableCollectSingle$CollectSubscriber.onComplete(FlowableCollectSingle.java:120) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.subscribers.BasicFuseableSubscriber.onComplete(BasicFuseableSubscriber.java:120) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.subscribers.BasicFuseableConditionalSubscriber.onComplete(BasicFuseableConditionalSubscriber.java:120) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableGroupBy$State.checkTerminated(FlowableGroupBy.java:640) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableGroupBy$State.drainNormal(FlowableGroupBy.java:547) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableGroupBy$State.drain(FlowableGroupBy.java:474) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableGroupBy$State.onComplete(FlowableGroupBy.java:445) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableGroupBy$GroupedUnicast.onComplete(FlowableGroupBy.java:353) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableGroupBy$GroupBySubscriber.onComplete(FlowableGroupBy.java:225) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.processors.UnicastProcessor.checkTerminated(UnicastProcessor.java:417) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.processors.UnicastProcessor.drainRegular(UnicastProcessor.java:301) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.processors.UnicastProcessor.drain(UnicastProcessor.java:384) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.processors.UnicastProcessor.onComplete(UnicastProcessor.java:474) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableWindowBoundary$WindowBoundaryMainSubscriber.drain(FlowableWindowBoundary.java:233) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableWindowBoundary$WindowBoundaryMainSubscriber.innerNext(FlowableWindowBoundary.java:147) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableWindowBoundary$WindowBoundaryInnerSubscriber.onNext(FlowableWindowBoundary.java:281) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.processors.PublishProcessor$PublishSubscription.onNext(PublishProcessor.java:361) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.processors.PublishProcessor.onNext(PublishProcessor.java:243) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableFlatMap$MergeSubscriber.tryEmit(FlowableFlatMap.java:270) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableFlatMap$InnerSubscriber.onNext(FlowableFlatMap.java:627) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableWindowTimed$WindowExactBoundedSubscriber.createNewWindow(FlowableWindowTimed.java:511) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableWindowTimed$WindowExactBoundedSubscriber.drain(FlowableWindowTimed.java:470) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableWindowTimed$AbstractWindowSubscriber.onNext(FlowableWindowTimed.java:127) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowablePublishMulticast$MulticastProcessor.drain(FlowablePublishMulticast.java:401) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowablePublishMulticast$MulticastProcessor.onNext(FlowablePublishMulticast.java:218) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableOnBackpressureBufferStrategy$OnBackpressureBufferStrategySubscriber.drain(FlowableOnBackpressureBufferStrategy.java:234) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableOnBackpressureBufferStrategy$OnBackpressureBufferStrategySubscriber.onNext(FlowableOnBackpressureBufferStrategy.java:145) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.processors.PublishProcessor$PublishSubscription.onNext(PublishProcessor.java:361) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.processors.PublishProcessor.onNext(PublishProcessor.java:243) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.subscribers.LambdaSubscriber.onNext(LambdaSubscriber.java:65) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableMap$MapSubscriber.onNext(FlowableMap.java:69) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.subscriptions.ScalarSubscription.request(ScalarSubscription.java:55) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.subscribers.BasicFuseableSubscriber.request(BasicFuseableSubscriber.java:153) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.subscribers.LambdaSubscriber.request(LambdaSubscriber.java:114) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableInternalHelper$RequestMax.accept(FlowableInternalHelper.java:217) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableInternalHelper$RequestMax.accept(FlowableInternalHelper.java:213) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.subscribers.LambdaSubscriber.onSubscribe(LambdaSubscriber.java:52) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.subscribers.BasicFuseableSubscriber.onSubscribe(BasicFuseableSubscriber.java:67) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableJust.subscribeActual(FlowableJust.java:34) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15917) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableMap.subscribeActual(FlowableMap.java:38) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15917) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15808) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15768) ~[rxjava-3.1.4.jar!/:na]
	at com.influxdb.client.internal.AbstractWriteClient.write(AbstractWriteClient.java:243) ~[influxdb-client-java-6.0.0.jar!/:6.0.0]
	at com.influxdb.client.internal.AbstractWriteClient.lambda$writePoints$14(AbstractWriteClient.java:226) ~[influxdb-client-java-6.0.0.jar!/:6.0.0]
	at io.reactivex.rxjava3.internal.subscribers.LambdaSubscriber.onNext(LambdaSubscriber.java:65) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableMap$MapSubscriber.onNext(FlowableMap.java:69) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableFilter$FilterSubscriber.tryOnNext(FlowableFilter.java:75) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableFromIterable$IteratorConditionalSubscription.fastPath(FlowableFromIterable.java:321) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableFromIterable$BaseRangeSubscription.request(FlowableFromIterable.java:129) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.subscribers.BasicFuseableSubscriber.request(BasicFuseableSubscriber.java:153) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.subscribers.BasicFuseableSubscriber.request(BasicFuseableSubscriber.java:153) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.subscribers.LambdaSubscriber.request(LambdaSubscriber.java:114) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableInternalHelper$RequestMax.accept(FlowableInternalHelper.java:217) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableInternalHelper$RequestMax.accept(FlowableInternalHelper.java:213) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.subscribers.LambdaSubscriber.onSubscribe(LambdaSubscriber.java:52) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.subscribers.BasicFuseableSubscriber.onSubscribe(BasicFuseableSubscriber.java:67) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.subscribers.BasicFuseableSubscriber.onSubscribe(BasicFuseableSubscriber.java:67) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableFromIterable.subscribe(FlowableFromIterable.java:66) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableFromIterable.subscribeActual(FlowableFromIterable.java:47) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15917) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableFilter.subscribeActual(FlowableFilter.java:38) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15917) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableMap.subscribeActual(FlowableMap.java:38) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15917) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15808) ~[rxjava-3.1.4.jar!/:na]
	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15768) ~[rxjava-3.1.4.jar!/:na]
	at com.influxdb.client.internal.AbstractWriteClient.writePoints(AbstractWriteClient.java:223) ~[influxdb-client-java-6.0.0.jar!/:6.0.0]
	at com.influxdb.client.internal.WriteApiImpl.writePoints(WriteApiImpl.java:190) ~[influxdb-client-java-6.0.0.jar!/:6.0.0]
	at com.influxdb.client.internal.WriteApiImpl.writePoint(WriteApiImpl.java:156) ~[influxdb-client-java-6.0.0.jar!/:6.0.0]
	at com.influxdb.client.internal.WriteApiImpl.writePoint(WriteApiImpl.java:143) ~[influxdb-client-java-6.0.0.jar!/:6.0.0]
	at com.influxdb.client.internal.WriteApiImpl.writePoint(WriteApiImpl.java:135) ~[influxdb-client-java-6.0.0.jar!/:6.0.0]
	at pro.etag.hbm.db.InfluxProcessHb.updatePriceTag(InfluxProcessHb.java:51) ~[classes!/:0.1-SNAPSHOT]
	at pro.etag.hbm.HeartbeatController.update(HeartbeatController.java:147) ~[classes!/:0.1-SNAPSHOT]
	at pro.etag.hbm.HeartbeatController.lambda$post$0(HeartbeatController.java:105) ~[classes!/:0.1-SNAPSHOT]
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) ~[na:na]
	at pro.etag.hbm.HeartbeatController.post(HeartbeatController.java:105) ~[classes!/:0.1-SNAPSHOT]
	at jdk.internal.reflect.GeneratedMethodAccessor30.invoke(Unknown Source) ~[na:na]
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
	at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) ~[spring-web-5.3.16.jar!/:5.3.16]
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150) ~[spring-web-5.3.16.jar!/:5.3.16]
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117) ~[spring-webmvc-5.3.16.jar!/:5.3.16]
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895) ~[spring-webmvc-5.3.16.jar!/:5.3.16]
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808) ~[spring-webmvc-5.3.16.jar!/:5.3.16]
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-5.3.16.jar!/:5.3.16]
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067) ~[spring-webmvc-5.3.16.jar!/:5.3.16]
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963) ~[spring-webmvc-5.3.16.jar!/:5.3.16]
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) ~[spring-webmvc-5.3.16.jar!/:5.3.16]
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909) ~[spring-webmvc-5.3.16.jar!/:5.3.16]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:681) ~[tomcat-embed-core-9.0.58.jar!/:na]
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) ~[spring-webmvc-5.3.16.jar!/:5.3.16]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:764) ~[tomcat-embed-core-9.0.58.jar!/:na]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227) ~[tomcat-embed-core-9.0.58.jar!/:na]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.58.jar!/:na]
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-9.0.58.jar!/:na]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.58.jar!/:na]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.58.jar!/:na]
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-5.3.16.jar!/:5.3.16]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.16.jar!/:5.3.16]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.58.jar!/:na]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.58.jar!/:na]
	at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-5.3.16.jar!/:5.3.16]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.16.jar!/:5.3.16]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.58.jar!/:na]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.58.jar!/:na]
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-5.3.16.jar!/:5.3.16]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.16.jar!/:5.3.16]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.58.jar!/:na]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.58.jar!/:na]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197) ~[tomcat-embed-core-9.0.58.jar!/:na]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) ~[tomcat-embed-core-9.0.58.jar!/:na]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540) ~[tomcat-embed-core-9.0.58.jar!/:na]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135) ~[tomcat-embed-core-9.0.58.jar!/:na]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) ~[tomcat-embed-core-9.0.58.jar!/:na]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) ~[tomcat-embed-core-9.0.58.jar!/:na]
	at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:769) ~[tomcat-embed-core-9.0.58.jar!/:na]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359) ~[tomcat-embed-core-9.0.58.jar!/:na]
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399) ~[tomcat-embed-core-9.0.58.jar!/:na]
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) ~[tomcat-embed-core-9.0.58.jar!/:na]
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889) ~[tomcat-embed-core-9.0.58.jar!/:na]
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735) ~[tomcat-embed-core-9.0.58.jar!/:na]
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-embed-core-9.0.58.jar!/:na]
	at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) ~[tomcat-embed-core-9.0.58.jar!/:na]
	at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) ~[tomcat-embed-core-9.0.58.jar!/:na]
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-9.0.58.jar!/:na]
	at java.base/java.lang.Thread.run(Thread.java:831) ~[na:na]
Caused by: java.net.ConnectException: Failed to connect to influxdb-stage.e-tag.tech/195.80.238.131:8086
	at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:297) ~[okhttp-4.9.3.jar!/:na]
	at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:207) ~[okhttp-4.9.3.jar!/:na]
	at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:226) ~[okhttp-4.9.3.jar!/:na]
	at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106) ~[okhttp-4.9.3.jar!/:na]
	at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74) ~[okhttp-4.9.3.jar!/:na]
	at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255) ~[okhttp-4.9.3.jar!/:na]
	at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32) ~[okhttp-4.9.3.jar!/:na]
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[okhttp-4.9.3.jar!/:na]
	at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95) ~[okhttp-4.9.3.jar!/:na]
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[okhttp-4.9.3.jar!/:na]
	at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83) ~[okhttp-4.9.3.jar!/:na]
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[okhttp-4.9.3.jar!/:na]
	at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76) ~[okhttp-4.9.3.jar!/:na]
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[okhttp-4.9.3.jar!/:na]
	at com.influxdb.client.internal.GzipInterceptor.intercept(GzipInterceptor.java:91) ~[influxdb-client-java-6.0.0.jar!/:6.0.0]
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[okhttp-4.9.3.jar!/:na]
	at com.influxdb.client.internal.AuthenticateInterceptor.intercept(AuthenticateInterceptor.java:97) ~[influxdb-client-java-6.0.0.jar!/:6.0.0]
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[okhttp-4.9.3.jar!/:na]
	at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.java:152) ~[logging-interceptor-3.14.9.jar!/:na]
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[okhttp-4.9.3.jar!/:na]
	at com.influxdb.internal.UserAgentInterceptor.intercept(UserAgentInterceptor.java:60) ~[influxdb-client-core-6.0.0.jar!/:6.0.0]
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[okhttp-4.9.3.jar!/:na]
	at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201) ~[okhttp-4.9.3.jar!/:na]
	at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154) ~[okhttp-4.9.3.jar!/:na]
	at retrofit2.OkHttpCall.execute(OkHttpCall.java:204) ~[retrofit-2.9.0.jar!/:na]
	at retrofit2.adapter.rxjava3.CallExecuteObservable.subscribeActual(CallExecuteObservable.java:46) ~[adapter-rxjava3-2.9.0.jar!/:na]
	... 158 common frames omitted
Caused by: java.net.ConnectException: Connection refused
	at java.base/sun.nio.ch.Net.pollConnect(Native Method) ~[na:na]
	at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:669) ~[na:na]
	at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:549) ~[na:na]
	at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:597) ~[na:na]
	at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:331) ~[na:na]
	at java.base/java.net.Socket.connect(Socket.java:630) ~[na:na]
	at okhttp3.internal.platform.Platform.connectSocket(Platform.kt:128) ~[okhttp-4.9.3.jar!/:na]
	at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:295) ~[okhttp-4.9.3.jar!/:na]
	... 183 common frames omitted`

After this event, nothing happens, no other attempts to write data.
WriteOptions are not manually configured, I expect default values to work.

Steps to reproduce:

  1. Use asynchronous non-blocking API to write data to Influx
  2. Stop Influx DB
  3. Wait for WriteRetriableErrorEvent to appear

Expected behavior:
Influx client tries to connect to db and white data again. If db is avaliable again in 3 seconds or less, data should be written successfully.

Actual behavior:
Influx client does nothing.

Specifications:

  • Client Version: 6.0.0
  • InfluxDB Version: OSS 2.2
  • JDK Version: 17
  • Platform: linux
@bednar
Copy link
Contributor

bednar commented May 26, 2022

Hi @olenagerasimova,

thanks for using our client.

WriteOptions are not manually configured, I expect default values to work.

The default retry strategy for the next attempt is random distributed with following delays: [5_000-10_000, 10_000-20_000, 20_000-40_000, 40_000-80_000, 80_000-125_000].

Steps to reproduce:

Use asynchronous non-blocking API to write data to Influx
Stop Influx DB
Wait for WriteRetriableErrorEvent to appear

How looks like your event handler for WriteRetriableErrorEvent?

Regards

@olenagerasimova
Copy link
Author

@bednar hi, thanks for the reply.

About retry strategy: db is not available for about a minute in our case. Thus, retry events should definitely happen.

How looks like your event handler for WriteRetriableErrorEvent?

It just logs the error

this.api.listenEvents(
            WriteRetriableErrorEvent.class,
            event -> InfluxApi.LGR.error(
                "Retrievable error while writing to influx", event.getThrowable()
            )
        );

We are still investigating, I'll add more details as soon as we understand them.

@bednar bednar added the question Further information is requested label May 26, 2022
@bednar
Copy link
Contributor

bednar commented May 26, 2022

@bednar hi, thanks for the reply.

About retry strategy: db is not available for about a minute in our case. Thus, retry events should definitely happen.

I agree, there is no reason why the retry attempt should not be repeated.

It just logs the error

this.api.listenEvents(
            WriteRetriableErrorEvent.class,
            event -> InfluxApi.LGR.error(
                "Retrievable error while writing to influx", event.getThrowable()
            )
        );

We are still investigating, I'll add more details as soon as we understand them.

Thanks for help with this.

@bednar
Copy link
Contributor

bednar commented Jun 1, 2022

This is probably caused by same issue as is mentioned in #202 (comment). For more info see: #202 (comment)

@olenagerasimova
Copy link
Author

@bednar thanks, we tried snapshot version, it helped.

@bednar
Copy link
Contributor

bednar commented Jun 29, 2022

Hi @olenagerasimova,

The PR#358 is ready to review before merge into master. The development version is deployed into snapshot repository with version 6.2.0.groupBy-SNAPSHOT.

Any feedback and testing will be appreciate👂

Regards

@bednar bednar added bug Something isn't working and removed question Further information is requested labels Jun 29, 2022
@bednar bednar added this to the 6.4.0 milestone Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants