Hi , I am getting the below errors, i am trying to enable the batching and make the influx db down and then up after some time to verify if the batching is working correctly. But it failing without any retries. Any help will be appreciated.
Code snippet is - InfluxDB influxDB= connectionFactory.getConnection(BPMConstant.DBUserType.BPMINGEST); influxDB.setDatabase(connectionFactory.getDatabase().toString()); influxDB.setRetentionPolicy(retentionPolicy); //influxDB.setConsistency(InfluxDB.ConsistencyLevel.ALL); if(!influxDB.isBatchEnabled()) { influxDB.enableBatch(100, 200, TimeUnit.MILLISECONDS); } //write the Point to both Primary and Secondary database //write to primary db try { // writeToDB(influxDB, ops); influxDB.write(connectionFactory.getDatabase().toString(),retentionPolicy,ops.getPoints().get(0)); influxDB.flush(); } Exception logs - ERROR org.influxdb.impl.BatchProcessor - Batch could not be sent. Data will be lost org.influxdb.InfluxDBIOException: java.net.ConnectException: Failed to connect to localhost/0:0:0:0:0:0:0:1:8086 at org.influxdb.impl.InfluxDBImpl.execute(InfluxDBImpl.java:514) [influxdb-java-2.7.jar!/:na] at org.influxdb.impl.InfluxDBImpl.write(InfluxDBImpl.java:312) [influxdb-java-2.7.jar!/:na] at org.influxdb.impl.BatchProcessor.write(BatchProcessor.java:248) [influxdb-java-2.7.jar!/:na] at org.influxdb.impl.BatchProcessor.flush(BatchProcessor.java:298) [influxdb-java-2.7.jar!/:na] at org.influxdb.impl.InfluxDBImpl.flush(InfluxDBImpl.java:526) [influxdb-java-2.7.jar!/:na] at com.ariba.bpm.domain.service.influxdb.InfluxDBTemplate.create(InfluxDBTemplate.java:170) [bpm-db-0.0.13.jar!/:0.0.13] at com.ariba.bpm.domain.repository.BPMRepository.write(BPMRepository.java:72) [bpm-db-0.0.13.jar!/:0.0.13] at com.ariba.bpm.domain.repository.BPMRepository$$FastClassBySpringCGLIB$$4191129c.invoke(<generated>) [bpm-db-0.0.13.jar!/:0.0.13] at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) [spring-core-4.3.8.RELEASE.jar!/:4.3.8.RELEASE] at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738) [spring-aop-4.3.8.RELEASE.jar!/:4.3.8.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMetho -- Remember to include the version number! --- You received this message because you are subscribed to the Google Groups "InfluxData" group. To unsubscribe from this group and stop receiving emails from it, send an email to influxdb+unsubscr...@googlegroups.com. To post to this group, send email to influxdb@googlegroups.com. Visit this group at https://groups.google.com/group/influxdb. To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/6478e2b3-73a5-4dbe-ac53-81ff4b765377%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.