Influxdb creates database but didn’t add data. It only created empty database, and returned 204 success message. I’m trying to follow the documentation to save data into Influxdb and I called it from the command line as detailed in the tutorial. I guessed it’s Influxdb problem but I wish someone who’d overcame something like this can help with a solution.
Run k6 with --verbose
to see what’s happening in more detail.
This is the log I get when I added --verbose
C:\Users\GEGE\Documents\project\k6>k6 run --out influxdb=http://localhost:8086/myk6db default.js --verbose
DEBU[0000] Logger format: TEXT
DEBU[0000] k6 version: v0.29.0 (2020-11-11T13:27:19+0000/d9bced3, go1.15.3, windows/amd64)
/\ |‾‾| /‾‾/ /‾‾/
/\ / \ | |/ / / /
/ \/ \ | ( / ‾‾\
/ \ | |\ \ | (‾) |
/ __________ \ |__| \__\ \_____/ .io
DEBU[0000] Initializing the runner...
DEBU[0000] Loading... moduleSpecifier="file:///C:/Users/GEGE/Documents/project/k6/default.js" originalModuleSpecifier=default.js
DEBU[0001] Babel: Transformed t=168.0004ms
DEBU[0001] Getting the script options...
DEBU[0001] Initializing the execution scheduler...
execution: local
script: default.js
DEBU[0001] Starting the REST API server on localhost:6565
output: influxdb=http://localhost:8086/myk6db (http://localhost:8086)
scenarios: (100.00%) 1 scenario, 1 max VUs, 10m30s max duration (incl. graceful stop):
* default: 1 iterations for each of 1 VUs (maxDuration: 10m0s, gracefulStop: 30s)
DEBU[0001] Initialization starting... component=engine
DEBU[0001] Start of initialization executorsCount=1 neededVUs=1 phase=local-execution-scheduler-init
DEBU[0001] Initialized VU #1 phase=local-execution-scheduler-init
DEBU[0001] Finished initializing needed VUs, start initializing executors... phase=local-execution-scheduler-init
DEBU[0001] Initialized executor default phase=local-execution-scheduler-init
DEBU[0001] Initialization completed phase=local-execution-scheduler-init
DEBU[0001] Execution scheduler starting... component=engine
DEBU[0001] Start of test run executorsCount=1 phase=local-execution-scheduler-run
DEBU[0001] Starting emission of VU metrics... component=engine
DEBU[0001] Metrics processing started... component=engine
DEBU[0001] InfluxDB: Running!
DEBU[0001] Running setup() phase=local-execution-scheduler-run
DEBU[0001] Start all executors... phase=local-execution-scheduler-run
DEBU[0001] Starting executor executor=default startTime=0s type=per-vu-iterations
DEBU[0001] Starting executor run... executor=per-vu-iterations iterations=1 maxDuration=10m0s scenario=default type=per-vu-iterations vus=1=
DEBU[0002] InfluxDB: Committing...
DEBU[0002] InfluxDB: Writing... samples=10
DEBU[0002] InfluxDB: Writing... points=10
DEBU[0002] InfluxDB: Batch written! t=91.276ms
DEBU[0003] Executor finished successfully executor=default startTime=0s type=per-vu-iterations
DEBU[0003] Regular duration is done, waiting for iterations to gracefully finish executor=per-vu-iterations gracefulStop=30s scenario=default1
DEBU[0003] Running teardown() phase=local-execution-scheduler-run
DEBU[0003] Execution scheduler terminated component=engine error="<nil>"
DEBU[0003] Processing metrics and thresholds after the test run has ended... component=engine
DEBU[0003] Engine run terminated cleanly
DEBU[0003] run: execution scheduler terminated component=engine
r
running (00m02.0s), 0/1 VUs, 1 complete and 0 interrupted iterations0
default ✓ [======================================] 1 VUs 00m01.7s/10m0s 1/1 iters, 1 per VU
DEBU[0003] Metrics emission terminated component=engine
running (00m02.0s), 0/1 VUs, 1 complete and 0 interrupted iterations
default ✓ [======================================] 1 VUs 00m01.7s/10m0s 1/1 iters, 1 per VU
running (00m02.0s), 0/1 VUs, 1 complete and 0 interrupted iterations
default ✓ [======================================] 1 VUs 00m01.7s/10m0s 1/1 iters, 1 per VU
DEBU[0003] Engine: Thresholds terminated component=engine
data_received..............: 11 kB 5.6 kB/s
data_sent..................: 76 B 38 B/s
http_req_blocked...........: avg=362.03ms min=362.03ms med=362.03ms max=362.03ms p(90)=362.03ms p(95)=362.03ms
DEBU[0003] InfluxDB: Committing...
DEBU[0003] InfluxDB: Writing... samples=4
http_req_connecting........: avg=212.47ms min=212.47ms med=212.47ms max=212.47ms p(90)=212.47ms p(95)=212.47ms
http_req_duration..........: avg=239.04ms min=239.04ms med=239.04ms max=239.04ms p(90)=239.04ms p(95)=239.04ms
DEBU[0003] InfluxDB: Writing... points=4
http_req_receiving.........: avg=6ms min=6ms med=6ms max=6ms p(90)=6ms p(95)=6ms
http_req_sending...........: avg=0s min=0s med=0s max=0s p(90)=0s p(95)=0s
http_req_tls_handshaking...: avg=0s min=0s med=0s max=0s p(90)=0s p(95)=0s
http_req_waiting...........: avg=233.04ms min=233.04ms med=233.04ms max=233.04ms p(90)=233.04ms p(95)=233.04ms
http_reqs..................: 1 0.511577/s
iteration_duration.........: avg=1.6s min=1.6s med=1.6s max=1.6s p(90)=1.6s p(95)=1.6s
iterations.................: 1 0.511577/s
vus........................: 1 min=1 max=1
vus_max....................: 1 min=1 max=1
DEBU[0003] Waiting for engine processes to finish...
DEBU[0003] Metrics processing winding down... component=engine
DEBU[0003] InfluxDB: Committing...
DEBU[0003] InfluxDB: Writing... samples=0
DEBU[0003] InfluxDB: Writing... points=0
DEBU[0003] InfluxDB: Batch written! t=3.0055ms
DEBU[0003] InfluxDB: Batch written! t=91.003ms
DEBU[0003] Everything has finished, exiting k6!
And all the meta, data, and wall are empty
See the InfluxDB: Batch written!
log messages - it means k6 successfully sent the data to InfluxDB. You are looking at the myk6db
database in InfluxDB, right?
Thanks @ned I’m finally seeing the data by querying it from the client. I’m just wondering why it’s not showing in the folders
@ned, I left the project for a while, now I’m back at it. It is still not saving the data in the InfluxDB. I’d thought it was but when I checked it only created the empty tables, no data in them, and it returned a 204 success message.
Hi @ken4ward
I was wondering if you solved the problem, I faced the same problem.
Hi @cpolat,
your previous question was about InfluxDB v2 and this topic is around InfluxDB v1 so are you sure that the problem is the same?
Can you explain in more detail which problem are you facing, please? And if you’re using the v2 then it’s better if you open a new topic with the detailed info.
Hi @codebien
I’m using v2 and open new topic with the detailed info.
New topic : K6 and influxdb v2 not create database and add data
Best Regards