Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Queries throw a "missing required parameter "q"" exception using influxdb-java 2.22 with enableGzip set to true #848

@mschwore

Description

@mschwore

Queries throw an exception about missing required parameter q when using the latest influxdb-java 2.22 with the enableGzip set to true. I am using influxdb-java 2.22, influxdb-server 1.8.10 on CentOS 7.

Here's my connection setup code

    OkHttpClient.Builder builder = new OkHttpClient.Builder().readTimeout(readTimeout, TimeUnit.SECONDS).writeTimeout(writeTimeout, TimeUnit.SECONDS);
    InfluxDB influxDB = InfluxDBFactory.connect(databaseUrl, databaseUser, databasePassword, builder, ResponseFormat.MSGPACK);
    influxDB.enableGzip();

This is the exception that gets thrown. My process's first query to influxdb is to create the database which this stack is for.

org.influxdb.InfluxDBException: missing required parameter "q"
        at org.influxdb.InfluxDBException.buildExceptionFromErrorMessage(InfluxDBException.java:161) ~[influxdb-java-2.22.jar:?]
        at org.influxdb.InfluxDBException.buildExceptionForErrorState(InfluxDBException.java:189) ~[influxdb-java-2.22.jar:?]
        at org.influxdb.impl.InfluxDBImpl.execute(InfluxDBImpl.java:844) ~[influxdb-java-2.22.jar:?]
        at org.influxdb.impl.InfluxDBImpl.executeQuery(InfluxDBImpl.java:833) ~[influxdb-java-2.22.jar:?]
        at org.influxdb.impl.InfluxDBImpl.createDatabase(InfluxDBImpl.java:743) ~[influxdb-java-2.22.jar:?]

If I leave enableGzip set to false, everything works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions