influxdata / influxdata/influxdb

使用maven包<artifactId>influxdb-java</artifactId>需要输入用户名密码等信息,已输入,但始终报错,提示权限不足

Open
#23,222 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

操作步骤:
1. .\influxd.exe启动服务(备注版本:influxdb2-2.1.1-windows)
2. 进入http://localhost:8086管理页面,并按提示输入用户名、密码、组织、bucket等信息
3. 代码集成,引入依赖:

org.influxdb
influxdb-java
2.22

4.错误提示:
Exception in thread "main" org.influxdb.InfluxDBException: {"code":"unauthorized","message":"Unauthorized"}
at org.influxdb.InfluxDBException.buildExceptionForErrorState(InfluxDBException.java:175)
at org.influxdb.impl.InfluxDBImpl.execute(InfluxDBImpl.java:846)
at org.influxdb.impl.InfluxDBImpl.executeQuery(InfluxDBImpl.java:833)
at org.influxdb.impl.InfluxDBImpl.query(InfluxDBImpl.java:559)
at com.muscleape.influxdb.controller.TestController.main(TestController.java:60)

使用客户端链接(或cli)问题同上:
![image](https://user-images.githubusercontent.com/24490695/159687976-f1c36f9b-e742-4c3f-b639-df670c77db85.png)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the unauthorized error with influxdb-java 2.22 against the InfluxDB 2.1.1 service started by .\influxd.exe. Inspect the query call at TestController.java:60 and compare the configured credentials and client API with the server setup at http://localhost:8086. Done means identifying whether the failure is a configuration or compatibility issue and documenting a verified working connection.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.