No user provided. What is happening?

I am still trying to figure out why Grafana shows “no data” and InfluxDB reports lots of data in “cached”, however, I suddenly lost any kind of connection to the database and I don’t know why. I already deleted everything and started from scratch since I am still in the exploration phase but I can’t understand why I get no user provided when I clearly provide a user.

$ curl -G http://localhost:8086/query   -u admin:SUPER_SECRET_PASSWORD   --data-urlencode "q=SHOW DATABASES"
{"error":"error authorizing query: no user provided"}

I created the admin user via the Ansible plugin, which worked perfectly fine for the initial setup.

What is happening?

Hello @tamasgal,
What version of InfluxDB are you using?
Are you sure that you have set everything up properly? The order of things should be:

  • InfluxDB is running with no http-auth setup.
  • Create an admin user CREATE USER admin WITH PASSWORD 'pass' WITH ALL PRIVILEGES .
  • Shut down InfluxDB.
  • Edit the configuration file and set auth-enabled = true in the [http] section.
  • Restart InfluxDB ensuring you’re using the configuration file you edited.

Then your cURL command should work:
I like including as params.

$  curl -G "http://localhost:8086/query?u=admin&p=pass" --data-urlencode "q=SHOW DATABASES"
1 Like

Thanks, somehow the admin role with privileges ALL as not set up properly. The error message is really confusing :frowning: anyways, got it working now. Still fighting though to get the collected data displayed.

1 Like

Btw. I think my other post is hidden due to the spam regulations or No data available but tons of values cached? :see_no_evil: