influxdata / influxdata/influxdb
cannot visit influxdb in jmeter,the error is responseCode: 401, responseBody: {"code":"unauthorized","message":"unauthorized access"}
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
In my Local environment, Jmeter cannot visit influxdb. I have configured influxdbToken, and it works well with curl cmd, but in jmeter, it reports errors:
**responseCode: 401, responseBody: {"code":"unauthorized","message":"unauthorized access"}**
Does anyone know how to solve this problem?
__Environment info:__
* System info: mac
* InfluxDB version: InfluxDB 2.6.1
* jmeter 5.1.1
__Config info:__
jmeter backend listener config __Config:__

__Logs:__
jmeter log
2023-01-10 11:34:00,372 INFO o.a.j.e.StandardJMeterEngine: Running the test!
2023-01-10 11:34:00,372 INFO o.a.j.s.SampleEvent: List of sample_variables: []
2023-01-10 11:34:00,373 INFO o.a.j.v.b.BackendListener: Backend Listener: Starting worker with class: class org.apache.jmeter.visualizers.backend.influxdb.InfluxdbBackendListenerClient and queue capacity: 5000
2023-01-10 11:34:00,373 INFO o.a.j.v.b.BackendListener: Backend Listener: Started worker with class: class org.apache.jmeter.visualizers.backend.influxdb.InfluxdbBackendListenerClient
2023-01-10 11:34:00,376 INFO o.a.j.g.u.JMeterMenuBar: setRunning(true, *local*)
2023-01-10 11:34:00,557 INFO o.a.j.e.StandardJMeterEngine: Starting ThreadGroup: 1 : jmeter与influxdb
2023-01-10 11:34:00,557 INFO o.a.j.e.StandardJMeterEngine: Starting 3 threads for group jmeter与influxdb.
2023-01-10 11:34:00,557 INFO o.a.j.e.StandardJMeterEngine: Thread will continue on error
2023-01-10 11:34:00,557 INFO o.a.j.t.ThreadGroup: Starting thread group... number=1 threads=3 ramp-up=1 delayedStart=false
2023-01-10 11:34:00,558 INFO o.a.j.t.JMeterThread: Thread started: jmeter与influxdb 1-1
2023-01-10 11:34:00,558 ERROR o.a.j.v.b.i.HttpMetricsSender: Error writing metrics to influxDB Url: **http://127.0.0.1:8086/api/v2/write?org=linpy&bucket=jmeter, responseCode: 401, responseBody: {"code":"unauthorized","message":"unauthorized access"}**
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the JMeter backend listener request to the shown InfluxDB write URL and compare its token and authorization headers with the working curl command. Done means the same configured token lets JMeter write metrics without the 401 response.
Written by the indexing model from the issue text.
Assessment
- Domain
- authentication, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100