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

Following instructions as-is leads to InfluxDb error #2

Closed
silentbobbert opened this issue Mar 4, 2021 · 6 comments
Closed

Following instructions as-is leads to InfluxDb error #2

silentbobbert opened this issue Mar 4, 2021 · 6 comments

Comments

@silentbobbert
Copy link

ERRO[0001] InfluxDB: Couldn't write stats  error="{\"code\":\"unauthorized\",\"message\":\"unauthorized access\"}"

I have tried this using WSL 2.0 on Windows 10, and directly on Windows 10 and get the same error. I have not managed to figure out the cause/fix yet.

@luidude
Copy link

luidude commented Mar 4, 2021

Getting similar errors on MacOSx

     execution: local
     script: /scripts/ewoks.js
     output: influxdb=http://influxdb:8086/k6 (http://influxdb:8086)

  scenarios: (100.00%) 1 scenario, 5 max VUs, 50s max duration (incl. graceful stop):
           * default: Up to 5 looping VUs for 20s over 3 stages (gracefulRampDown: 30s, gracefulStop: 30s)

ERRO[0001] InfluxDB: Couldn't write stats                error="{\"code\":\"unauthorized\",\"message\":\"unauthorized access\"}"
ERRO[0002] InfluxDB: Couldn't write stats                error="{\"code\":\"unauthorized\",\"message\":\"unauthorized access\"}"

@jfhamel98
Copy link

I was having this issue also on Windows 10.

After having looked around for a while, I noticed that in the original k6 docker-compose file, influxdb is pinned to version 1.8.

So I changed image: influxdb:latest to image: influxdb:1.8 in the docker-compose.yml file and now it works for me.

@stevegoossens
Copy link

stevegoossens commented Jul 20, 2021

I can confirm the issue on MacOS, looking like this:

Screenshot 2021-07-20 at 17 25 00

The workaround/fix suggested above to set the influxdb version to 1.8 in the compose file resolves the errors, and the grafana graphs are now populated (instead of N/A when run as-is)

@luketn
Copy link
Owner

luketn commented Aug 23, 2021

Hi @silentbobbert!

Thanks so much for the PR and write up. Apologies I'm just seeing this now in August. I missed the notification on it!

I appreciate the Windows script too.

I've just been reading the K6 forums and found other people also being affected by this:
grafana/k6#1883

I've put my thumbs up on the open enhancement ticket to support the new driver for InfluxDB 2 (also backward compatible with 1.8):
grafana/k6#1730 (comment)

In the meanwhile I'll review and merge in your changes. Thanks!

@luketn
Copy link
Owner

luketn commented Aug 23, 2021

Thanks so much for the contribution guys. Much appreciated.

@luketn
Copy link
Owner

luketn commented Aug 23, 2021

I was having this issue also on Windows 10.

After having looked around for a while, I noticed that in the original k6 docker-compose file, influxdb is pinned to version 1.8.

So I changed image: influxdb:latest to image: influxdb:1.8 in the docker-compose.yml file and now it works for me.

@jfhamel98 Great find!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants