404 Not Found Responses to CLI Commands

I recently upgraded my influxdb instance from 1.8 to 2.5 using the procedure below:

The upgrade appeared to go smoothly and, reviewing the upgrade.log file, I don’t see any errors. I then started the influxd service without issue. However, when attempting to query using the CLI, I am getting 404 Not Found errors. When I pass in the --http-debug option, the version in the HTTP response still shows 1.8 and then the text 404 Not Found. For example, issuing the following command:

influx server-config --http-debug

yields the following response:

2022/11/22 13:06:45
GET /api/v2/config HTTP/1.1
Host: localhost:8006
User-Agent: influx/2.5.0 (linux) Sha/3285a03 Date/2022-11-01T16:32:06Z
Accept: application/json
Authorization: Token xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Accept-Encoding: gzip

2022/11/22 13:06:45
HTTP/1.1 404 Not Found
Content-Length: 19
Content-Type: text/plain; charset=utf-8
Date: Tue, 22 Nov 2022 18:06:45 GMT
X-Content-Type-Options: nosniff
X-Influxdb-Build: OSS
X-Influxdb-Version: 1.8.10

404 page not found

Error: failed to retrieve config: 404 Not Found: unable to decode response content type “text/plain; charset=utf-8”

However, If I run the following command:

influxd version

I get the following response:

InfluxDB v2.5.1 (git: 5b6fdbf05d) build_date: 2022-11-02T18:06:28Z

Any thoughts on what might be going on? What additional information can I provide that might help point to the root cause? Thanks in advance!

Hi @csheaupdesigns,
Have you downloaded the V2 CLI? The old CLI will no longer function against InfluxDB 2.X. I would also open a browser and see if you can access http://localhost:8086 on the server you installed InfluxDB on :).

I would also check:

systemctl status influxdb

Hi Jay,

Thanks for the response. Yes, I have the updated CLI. The response to:

influx version

is

Influx CLI 2.5.0 (git: 3285a03) build_date: 2022-11-01T16:32:06Z

Running the test of using the web browser, I get the same “404 page not found” error when I type in http://localhost:8086. My instance is using TCP port 8006 so I actually had to type http://localhost:8006. I turned on the Network analyzer in Firefox to capture the header in the http response from the Influx server. It showed the same behavior as above, where it is indicating that the X-Influxdb-Version is 1.8.10.

The response to:

systemctl status influxdb

shows that it is active (running) since Tue 2022-11-22. I’m not sure if you’re looking for any additional information from that command that would indicate a specific error. I may be wrong, but I don’t think it would’ve responded to the version command if it wasn’t running.

I’m having the same issue, though I’m not upgrading from a previous version (fresh install). Did you get this problem resolved?

@tomvb, no, I have not resolved the problem. However, I am able to get a fresh install to work without issue. I only had the issue when upgrading on one of my server instances.