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

Error messages from server not parsed correctly when using msgpack #505

Closed
mschwore opened this issue Aug 29, 2018 · 2 comments
Closed

Error messages from server not parsed correctly when using msgpack #505

mschwore opened this issue Aug 29, 2018 · 2 comments

Comments

@mschwore
Copy link

I am using the new msgpack format with influxdb-java and I am not seeing the right exceptions being thrown by influxdb-java. Here's a stack trace for an exception caught by my app:

org.influxdb.InfluxDBException: ??error?9partial write: points beyond retention policy dropped=463
        at org.influxdb.InfluxDBException.buildExceptionForErrorState(InfluxDBException.java:168) ~[influxdb-java-2.12.jar:?]
        at org.influxdb.impl.InfluxDBImpl.execute(InfluxDBImpl.java:690) ~[influxdb-java-2.12.jar:?]
        at org.influxdb.impl.InfluxDBImpl.write(InfluxDBImpl.java:422) ~[influxdb-java-2.12.jar:?]
        at org.influxdb.impl.OneShotBatchWriter.write(OneShotBatchWriter.java:22) ~[influxdb-java-2.12.jar:?]

I expected to see an exception of type PointsBeyondRetentionPolicyException. It looks like the InfluxDBException class is attempting to parse the error message from influxdb-server as JSON and failing as influxdb-server is sending back a msgpack formatted error message.

Here I am just using the OneShotBatchWriter, but I imagine if you used the retry batch writer that the retry capability will be broken.

@mschwore
Copy link
Author

This was using influxdb-java 2.12, influxdb-server 1.6.2 on CentOS 7

@lxhoan lxhoan self-assigned this Aug 30, 2018
lxhoan added a commit to bonitoo-io/influxdb-java that referenced this issue Aug 30, 2018
lxhoan added a commit to bonitoo-io/influxdb-java that referenced this issue Aug 30, 2018
lxhoan added a commit to bonitoo-io/influxdb-java that referenced this issue Aug 31, 2018
@majst01
Copy link
Collaborator

majst01 commented Sep 6, 2018

@mschwore can we close this issue ?

majst01 added a commit that referenced this issue Sep 6, 2018
fix issue #505 : Error messages from server not parsed correctly when using msgpack
@majst01 majst01 closed this as completed Sep 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants