Open lourot opened 1 year ago
Same problem on a paid AWS InfluxDB subscription. Same problem when running the client on Debian 11 instead of Ubuntu 22.04
$ influx v1 auth ls --http-debug
2023/04/06 11:33:24
GET /private/legacy/authorizations HTTP/1.1
Host: eu-central-1-1.aws.cloud2.influxdata.com
User-Agent: influx/dev (linux) Sha/none Date/2023-04-05T17:15:07Z
Accept: application/json
Authorization: Token ********
Accept-Encoding: gzip
2023/04/06 11:33:24
HTTP/2.0 200 OK
Content-Type: text/html
Date: Thu, 06 Apr 2023 11:33:24 GMT
Etag: W/"6414b785-4cf"
Last-Modified: Fri, 17 Mar 2023 18:55:01 GMT
Strict-Transport-Security: max-age=15724800; includeSubDomains
Vary: Accept-Encoding
X-Influxdb-Build: Cloud
X-Influxdb-Request-Id: ffac5f0bab319aac83a28e713458dd55
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="description" content="InfluxDB is a time series platform, purpose-built by InfluxData for storing metrics and events, provides real-time visibility into stacks, sensors, and systems."><title>InfluxDB</title><base href="/"><script>(function (w, d, s, l, i) { w[l] = w[l] || []; w[l].push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' }); var f = d.getElementsByTagName(s)[0], j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f); })(window, document, 'script', 'dataLayer', 'GTM-NXMTGSW');</script><script>window.userpilotSettings = {token: '72cf72g10'}</script><script src="https://js.userpilot.io/sdk/latest.js"></script><base href=""><link rel="icon" href="/favicon.ico"></head><body><div id="react-root" data-basepath=""></div><noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-NXMTGSW" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript><script defer="defer" src="/static/b5d622cfc1.js"></script></body></html>
Error: could not find Authorizations for specified arguments: unable to decode response content type "text/html"
Also if I try to just set up Grafana without username and password, it fails with error reading InfluxDB. Status Code: 501
, which is also exactly what I see if I do:
$ influx v1 shell --http-debug
[...]
Connected to InfluxDB cloud2 2.0
2023/04/06 13:40:08
GET /query?db=&q=SHOW+DATABASES&rp= HTTP/1.1
Host: eu-central-1-1.aws.cloud2.influxdata.com
User-Agent: influx/dev (linux) Sha/none Date/2023-04-05T17:15:07Z
Accept: application/json
Authorization: Token ********
Accept-Encoding: gzip
2023/04/06 13:40:08
HTTP/2.0 501 Not Implemented
Content-Length: 54
Content-Type: application/json; charset=utf-8
Date: Thu, 06 Apr 2023 11:40:09 GMT
Request-Id: da020d107f4f66947e97cb3903fb472b
Strict-Transport-Security: max-age=15724800; includeSubDomains
Trace-Id: 6a49282f1ca08b3e
Trace-Sampled: false
Vary: Accept-Encoding
X-Influxdb-Build: Cloud
X-Influxdb-Request-Id: da020d107f4f66947e97cb3903fb472b
X-Platform-Error-Code: not implemented
X-Request-Id: da020d107f4f66947e97cb3903fb472b
{"code":"not implemented","message":"not implemented"}
No problem when running influxdb
myself in a local docker container:
$ docker run -p 8086:8086 -v myInfluxVolume:/var/lib/influxdb2 influxdb:latest
$ influx config create --config-name 030_local_docker --host-url http://localhost:8086 --org 030Solutions --token ********
$ influx v1 auth ls
ID Description Username v2 User Name v2 User ID Permissions
So this seems to be related to how InfluxDB Cloud gets deployed on AWS.
The Cloud specific documentation needs to be updated, it does not support the V1 auth styles. To setup Grafana using InfluxQL against Cloud2, you can follow that guide and make sure you use token-authentication. You'll need to create an appropriately scoped API token to use.
Thanks a lot! Indeed I got the connection between Grafana and InfluxDB working with Flux (v2) instead of InfluxQL (v1), but for context: with Flux I can't get Grafana Geomap to work, which is how I ended up wanting to go back to v1, which is how I ended up stumbling upon this. Anyway, good to know that InfluxDB Cloud doesn't support v1, thanks again.
For reference I managed to get Grafana Geomap working with InfluxDB over Flux (v2), see https://github.com/grafana/grafana/issues/54071#issuecomment-1510924027
Should we keep this issue open in order to document that Influx Cloud doesn't support v1 anymore, and rename the issue accordingly?
Should we keep this issue open in order to document that Influx Cloud doesn't support v1 anymore
Just to be clear, the TSM based Cloud product should support V1 querying through InfluxQL. It requires that you use V2 Auth (tokens) but you should still be able to query using InfluxQL via DBRP Mappings.
Thanks, but I didn't manage, as described in the first comment https://github.com/influxdata/influx-cli/issues/492#issue-1657149927
EDIT: but maybe it's only me. Feel free to close this issue if that's the case, as I have switched to v2 meanwhile anyway. Thanks again!
Context: I'm following https://docs.influxdata.com/influxdb/cloud/tools/grafana/?t=InfluxQL in order to be able to query InfluxDB from Grafana using InfluxQL instead of Flux. My InfluxDB is an InfluxDB Cloud Free Plan
Steps to reproduce
I did
but then I can't create a v1 user/password as any command involving
influx v1 auth
fails with:Version
influx
binary downloaded from https://dl.influxdata.com/influxdb/releases/influxdb2-client-2.7.1-linux-amd64.tar.gz running on Ubuntu 22.04Additional info
// CC @nikste