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

got unauthorize access after a while using influxdb #6940

Open
amin-basiri opened this issue Sep 3, 2024 · 1 comment
Open

got unauthorize access after a while using influxdb #6940

amin-basiri opened this issue Sep 3, 2024 · 1 comment
Labels
kind/bug Something isn't working team/ui

Comments

@amin-basiri
Copy link

About the bug

Steps to reproduce:

  1. start influxdb oss on docker
  2. use api call to save and query data from another service on docker

Expected behavior:
api call works normally and i can get and set my data periodically

Actual behavior:
after 3 days i got unauthorized access from influxdb on my service.
when i try to login to influxdb on ui i got An InfluxDB error has occurred

Visual Proof:
i got this after login from ui
image

About your environment

Environment info:

  • System info: Linux 5.15.0-113-generic x86_64
  • InfluxDB version: InfluxDB v2.7.6 (git: 3c58c06206) build_date: 2024-04-12T21:51:21Z
  • Docker: Docker version 26.0.0, build 2ae903e
  • Docker Compose: Docker Compose version v2.25.0

Config:
i just use DOCKER_INFLUXDB_INIT_MODE, DOCKER_INFLUXDB_INIT_USERNAME, DOCKER_INFLUXDB_INIT_PASSWORD, DOCKER_INFLUXDB_INIT_ORG, DOCKER_INFLUXDB_INIT_BUCKET environment variable to launch influxdb on docker using docker compose

Logs:
influx db logs on docker:

influx-db-1  | ts=2024-09-03T07:59:45.567559Z lvl=info msg=Unauthorized log_id=0rMGMBwW000 error="session not found"
influx-db-1  | ts=2024-09-03T07:59:45.576214Z lvl=info msg=Unauthorized log_id=0rMGMBwW000 error="session not found"
influx-db-1  | ts=2024-09-03T07:59:45.583360Z lvl=info msg=Unauthorized log_id=0rMGMBwW000 error="session not found"
influx-db-1  | ts=2024-09-03T07:59:45.599761Z lvl=info msg=Unauthorized log_id=0rMGMBwW000 error="session not found"
influx-db-1  | ts=2024-09-03T07:59:45.613114Z lvl=info msg=Unauthorized log_id=0rMGMBwW000 error="session not found"
influx-db-1  | ts=2024-09-03T07:59:45.619762Z lvl=info msg=Unauthorized log_id=0rMGMBwW000 error="session not found"

api call logs from other service:

websocket-1  | HTTP response headers: HTTPHeaderDict({'Content-Type': 'application/json; charset=utf-8', 'X-Influxdb-Build': 'OSS', 'X-Influxdb-Version': 'v2.7.6', 'X-Platform-Error-Code': 'unauthorized', 'Date': 'Tue, 03 Sep 2024 08:04:21 GMT', 'Content-Length': '55'})
websocket-1  | HTTP response body: {"code":"unauthorized","message":"unauthorized access"}
@amin-basiri amin-basiri added kind/bug Something isn't working team/ui labels Sep 3, 2024
@amin-basiri
Copy link
Author

amin-basiri commented Sep 8, 2024

i am using python influxdb client and username and password for authentication.
in my case after a while my session has been expired and i have 2 choice to solve this problem

  1. using token base authentication except username and password authentication (i choose this one)
  2. catch exception manually and sign in again

the problem with client solved but ui crash exists and randomly influx ui crashes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working team/ui
Projects
None yet
Development

No branches or pull requests

1 participant