Help upgrading from 1.8.6 --> 2.4

Having trouble upgrading from 1.8.6 to 2.4. Below is the docker compose I used for 1.8.6 and 2.4 (latest). When the 2.4 container launches (after stopping the 1.8.6 container) and I watch the size of the influxdb2 folder it grows in size until it matched the size of the influxdb container and then it drops to 249KB. The logs says the upgrade was completed and the service is now running. I am able to login to http://localhost:8086 and login with the user ID and password. I am not able to login to the database with InfluxDB UI or connect to it with Grafana. I see no errors in the log.

At a loss where to go from here. Not sure if the migration is failing, if retention is set by default to seconds or minutes and data is being deleted after the upgrade, why authentication is failing…

I see numerous posts with users having issues with the upgrade from 1.x to 2.x, but none seem to be the same issue(s) I am having. Hoping someone can help.

Influxdb 1.8.6 docker compose

  influxdb:
    hostname: influxdb
    image: influxdb:1.8.6
    container_name: influxdb
    restart: always
    ports:
     - "8086:8086"
     - "25826:25826"
    volumes:
     - "${docker}/influxdb:/var/lib/influxdb"
     - "${docker}/influxdb_backups:/var/lib/influxdb/backups"
     - "${docker}/influxdb/influxdb.conf:/var/lib/influxdb/influxdb.conf:ro"
    user: 1000:1000

Influxdb2 docker compose

  influxdb:
    hostname: influxdb
    image: influxdb:latest
    container_name: influxdb
    restart: always
    environment:
     - DOCKER_INFLUXDB_INIT_MODE=upgrade
     - DOCKER_INFLUXDB_INIT_USERNAME=user
     - DOCKER_INFLUXDB_INIT_PASSWORD=password
     - DOCKER_INFLUXDB_INIT_ORG=my-org
     - DOCKER_INFLUXDB_INIT_BUCKET=my-bucket
    ports:
     - "8086:8086"
     - "25826:25826"
    volumes:
     - "${docker}/influxdb:/var/lib/influxdb"
     - "${docker}/influxdb/influxdb.conf:/etc/influxdb/influxdb.conf:ro"
     - "${docker}/influxdb_backups:/var/lib/influxdb/backups"
     - "${docker}/influxdb2:/var/lib/influxdb2"
     - "${docker}/influxdb2:/etc/influxdb2"
    user: 1000:1000

Hello @osuhickeys,
I’m assuming that you’ve seen this:

but I thought I’d drop it here just in case you didnt. Is that what you followed?

Hmm it looks like there are some differences with the volume mounts. Can you please try following those docs? And let me know how that goes?

  -v influxdb:/root/influxdb/data \
  -v $PWD/influxdb.conf:/root/influxdb/influxdb.conf:ro \
  -v influxdb2:/root/influxdb2/data \
  -v influxdb2:/root/influxdb2 \

@Anaisdg Yes, that is the guide I followed. I followed the “Upgrade with a custom InfluxDB 1.x configuration file” as that exactly matches my 1.8 config which has both data and config mounted at /var/lib/influxdb. I would expect the “Upgrade with custom paths” method to fail as the paths in my 1.8 influxdb.conf are all pointing at /var/lib/influxdb, not a custom path. Can you clarify?