influxdata / influxdb-client-java

InfluxDB 2 JVM Based Clients

Home Page:https://influxdata.github.io/influxdb-client-java/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Java Clinet lost connection

alpha3171 opened this issue · comments

When I use java client, version 5.0.0. When the server run after a period , I found the point has not been writen to db. And there are not any exception logs.
Then , i use command "netstat -apntl | grep 8086" ,find none.
Could you tell me how to fix it. thanks.

I use token to auth.

init code is :

influxDBClients = InfluxDBClientFactory.create(address, token.toCharArray());
writeApis = influxDBClients.makeWriteApi(WriteOptions.builder().batchSize(128).flushInterval(3000).build());

and call in another function

writeApi = getApi();
Point point = Point.measurement(measurement).addTags(tags);
writeApi.writePoint("bucket1", "xxxx", point);

Hi,

Were you able to resolve your issue?
Are you closing the client or the writeapi? Take a look at the response in this other issue: #469

Hi,

Were you able to resolve your issue? Are you closing the client or the writeapi? Take a look at the response in this other issue: #469

thanks for your response. my issue has not been resolved. I use token to connect influxdb. And this issue happened accidentally, But if it happend, my server can write any data into the influxdb , even restart the server app, it not work too.

Have you tried the example in the issue I linked to as an alternative?