401 Unauthorised access after upgrade to 2.1 from 1.8

Hi there,

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:

But it seems to me that I followed all the steps.

Obviously I am missing something but I cannot find similar issues on the community topics or the web.

Can someone please help me to unblock this migration ?

Thank you for your help !

In v2 you have to add your token.
‘influx user list -t “YourToken”’

Thank you for your answer @NorbertB

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.

Hi!

I have the same issue here. I did an upgrade from 1.8 to 2.5. Looks that everything went fine, but i am not able to take a backup.

pi@raspberrypi:~ $ influx user list
Error: failed to list users: 401 Unauthorized: unauthorized access

What can i do?

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.

Chris

1 Like