Skip to content

Irritating warning Already signed out #645

@exaSR

Description

@exaSR

Steps to reproduce:
List the minimal actions needed to reproduce the behavior.

  1. Open and use multiple connections in a sequence, closing them after use
  2. Perform at least one operation on each connection

(see example code below)

Expected behavior:
Each connection is independent, performs as expected and does not trigger any unexpected warnings

Actual behavior:
Each connection is independent, performs as expected.
However, querying the second connection results in a log-warning:

Nov 16, 2023 1:31:42 PM com.influxdb.client.internal.AuthenticateInterceptor intercept
WARNING: Authorization interception failed. Already signed out.

As far as my debugging attempts got me, the reason is that the same AuthenticateInterceptor object is reused for multiple connections, and its signout flag is set when the first connection is closed, but is never reset for the second connection...

Specifications:

  • Client Version: 6.10.0
  • InfluxDB Version: 2.7.0 (yes; outdated, but the enforced change in join syntax is painful)
  • JDK Version: openjdk-17.0.8
  • Platform: Fedora 38

Example Code:
The actual code is connecting to different organizations and different users, so any recommendation to just reuse the client is not helpful.

public void produceWarning() {
    InfluxDBClientOptions options = new InfluxDBClientOptions.Builder()
            .url(influxUrl)
            .org(influxOrg)
            .authenticateToken(token)
            .build();

    InfluxDBClient client = InfluxDBClientFactory.create(options);
    client.getBucketsApi().findBuckets();
    client.close();

    InfluxDBClient client2 = InfluxDBClientFactory.create(options);
    // this one produces the warning
    client2.getBucketsApi().findBuckets();
    client2.close();
}

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy