I am trying to upgrade an influxDB instance from 1.8 to 2.1 on Linux (Ubuntu 20.04)
After installing the CLI and the influxdb v2, I tried differents procedures, and had to rollback to 1.8 several times since I always end up with the same blocking step:
After upgrading procedure is done, I cannot use any admin commands from influx CLI.
For example:
$ influx user list
Error: failed to list users: 401 Unauthorized: unauthorized access
$ influx auth create --org my_org --all-access
Error: failed to lookup org with name "my_org": 401 Unauthorized: unauthorized access
InfluxDB service is started and running with a specific user influxdb.
I find it difficult to follow the exact upgrading and migration steps from the procedures listed below:
I also tried the command using the token as flags to influx CLI or as environment variables.
I ended up openning an issue since I cannot proceed with this migration.
If someone actually manage to migrate a 1.8 to 2.1 influxDB database following the automatic or manual upgrade documentation please let me know so I can understand more precisely what is missing.
Hello together,
for everyone who gets the above error on a Debian/ Ubuntu installation using .deb packages, I think the trick is to use the influxdb user like mentioned in the notes of the upgrade procedure. sudo -u influxdb influx user list
works on my installation.
However I had the interesting effect that the user I’ve created during the upgrade process was not granted access to the GUI.
I resolved it by issuing
sudo -u influxdb influx user password --name <user-name> -p <password>
As I use a password generator and I’m pretty sure I copy&pasted the same password I’m not sure what happened with the password during the account creation. Nevertheless, the system is up and running. From the first look on it the upgrade seemed to work for the databases.