IMD SolutionComputing LibraryShop main store

Troubleshooting

Why an InfluxDB 1.8 to 2.0 upgrade shows the setup screen again

Edge computing and IIoT Published 7 min read By IMD Solution engineering team

Short answer

A setup prompt on port 8086 straight after a clean influxd upgrade log means the running 2.0 service is opening a different bolt-path or engine-path than the upgrade wrote to. Run influxd print-config, compare both paths with the upgrade and startup logs, repoint the service to the paths the upgrade logged, restart, and query a known bucket before creating a second user or reconnecting clients.

On this page
  1. What the second setup prompt means
  2. Compare the service paths with influxd print-config
  3. Worked example: a root-run upgrade against a service pointed at /influxdb
  4. When influxd has no upgrade command
  5. Container upgrades: the mount loop and the init variables
  6. Verify before you reconnect clients
  7. Questions asked

If an influxd upgrade finishes with a clean migration log and the web UI on port 8086 still asks you to create a user, an organization and a first bucket, the running 2.0 service is not opening the files the upgrade wrote. InfluxDB 2.0 keeps its users, organizations and bucket IDs in one bolt file and its measurements under one engine directory, and the setup screen is what the UI shows when the bolt file it opened contains no organizations. Treat that second prompt as a path mismatch until proven otherwise: run influxd print-config, compare its bolt-path and engine-path with the paths in the upgrade and startup logs, repoint the service, and only then reconnect clients.

What the second setup prompt means #

The documented 1.x-to-2.0 upgrade converts every 1.x database and retention policy into one 2.0 bucket and records the mapping in its log; a reported migration logged the telegraf database becoming the bucket telegraf/autogen. The same run builds the new metadata tree, the bolt file, and copies the 1.x data below an engine path, and both locations follow the environment the upgrade runs in. The 2.0 service then resolves its own bolt-path and engine-path from its config file, environment variables and command-line flags. When the two resolutions disagree, the server opens an empty tree and offers setup while the migrated data sits intact in the other tree.

Three things decide where each side writes, and each has produced a reported failure:

  • The account the process runs under: a root run writes its tree under /root/.influxdbv2, as one reported start did.
  • A config file left over from an earlier attempt, which silently overrides the defaults.
  • Environment variables such as INFLUXD_BOLT_PATH and INFLUXD_ENGINE_PATH set for the service but not for the upgrade, or the other way round.

Creating another administrator writes a user into whichever empty tree the service opened and cannot reach the migrated metadata, so do not use it as a test.

Compare the service paths with influxd print-config #

influxd print-config prints the effective configuration of the binary you run it with, and the bolt-path and engine-path lines sit near the top. One reported installation showed:

bolt-path: /influxdb/influxd.bolt
engine-path: /influxdb/engine

The command also takes --bolt-path and --engine-path as flags; the packaging script of one distribution calls it with explicit path values to locate a service's files, so pass your service's own flags to print-config, not the ones an interactive shell would use.

Now collect the other side. The upgrade log records the storage it wrote, and the startup log closes the loop: a 2.0 start logs a bolt service line whose path field names the file being opened, and one reported 2.0.3 start showed that field directly.

Decide on exact string equality, in this order: bolt-path from print-config against the bolt file in the upgrade log, then engine-path against the engine directory the upgrade copied into. Any difference is the fault. Exact matches on both exclude this explanation and move ownership, stale files or the organization mapping to the top of the list.

Worked example: a root-run upgrade against a service pointed at /influxdb #

Both path sets below are reported values; the combination of the two is an illustrative case built to show the comparison.

Inputs:

  • Upgrade side, from a 2.0.3 run under root: bolt file /root/.influxdbv2/influxd.bolt, engine directory /root/.influxdbv2/engine — the paths a root-run start is logged to open.
  • Service side, from a reported print-config run with non-default paths: bolt-path: /influxdb/influxd.bolt, engine-path: /influxdb/engine.

Rule: the UI offers setup only when the bolt file it opens holds no organizations, and it lists the migrated buckets only when it opens the engine directory the upgrade filled, so both strings must match exactly.

Arithmetic: compare the bolt strings character by character.

  • /root/.influxdbv2/influxd.bolt: position 1 is /, position 2 is r.
  • /influxdb/influxd.bolt: position 1 is /, position 2 is i.

First difference: position 2, r against i. The engine strings /root/.influxdbv2/engine and /influxdb/engine also differ first at position 2. Neither path matches.

Result: the service opens the /influxdb bolt file, which holds no organization records, so port 8086 prompts setup again while the migrated data sits complete under the /root tree.

Decision: any character difference between the two strings means mismatch. Stop the service, point its bolt-path and engine-path — or the INFLUXD_BOLT_PATH and INFLUXD_ENGINE_PATH variables — at the paths the upgrade logged, restart, and confirm the startup bolt line opens the upgrade's file before you touch the UI. To prove the data first, start influxd in the foreground with those two flags set to the upgrade's paths, as one reported run did. If both strings match exactly, this fault is excluded and ownership or stale files from earlier attempts move to the top of the list.

When influxd has no upgrade command #

The upgrade subcommand ships with the 2.0 binary. A 1.8 influxd lists only backup, config, help, restore, run and version — exactly the command set one reader found on the day of a migration. Confirm what your shell and your service unit really resolve:

influxd version
influxd help

A reported 2.0.3 start logs its version number at the top of the log, so run both from the same account and environment the migration will use; installing a 2.0 package does not change what an existing service unit or PATH entry executes.

Back up the 1.x data and configuration first and stop the 1.x service so it cannot write while the migration copies — never run an upgrade against the only copy. Then run the 2.0 binary's upgrade against the 1.x source: one reported run pointed it at /etc/influxdb/influxdb.conf, and the --v1-dir flag takes the 1.x data directory, for example --v1-dir /var/lib/influxdb where that installation kept its data. Where service permissions block the copy, run the upgrade under the same account the service runs as — one RPM installation resolved its ownership errors that way with sudo -u influxdb — so both sides own the same files.

Container upgrades: the mount loop and the init variables #

In DOCKER_INFLUXDB_INIT_MODE=upgrade the image reads the 1.x source named by DOCKER_INFLUXDB_INIT_UPGRADE_V1_CONFIG and writes the 2.x tree to INFLUXD_BOLT_PATH and INFLUXD_ENGINE_PATH, with INFLUXD_CONFIG_PATH and the DOCKER_INFLUXDB_INIT_USERNAME, DOCKER_INFLUXDB_INIT_PASSWORD, DOCKER_INFLUXDB_INIT_ORG and DOCKER_INFLUXDB_INIT_BUCKET values completing the init. One attempted run mounted the same named volume at /docker/influxdb2/data and again at its parent /docker/influxdb2, and the container failed with:

find: File system loop detected; '/docker/influxdb2/data' is part of the same file system loop as '/docker/influxdb2'.

A separately mounted child path inside the same volume mounted at its parent is the loop itself. Mount each path once — one volume at the parent, or two different volumes — never the same volume name at both a parent and a child. After that, resolve every variable inside the container: the 1.x config path, INFLUXD_BOLT_PATH and INFLUXD_ENGINE_PATH must each land on the intended mounts, and keep them on persistent volumes, because a container whose data path is not persistent loses old data after a restart.

The error naming the 1.x metadata file — Error: 1.x meta.db 'meta.db' does not exist — means the upgrade could not find that file at the location it was given. Fix the mount or the --v1-dir source so the file is really there; new credentials or a manually created bucket cannot replace missing metadata.

Verify before you reconnect clients #

Prove the server opened the migrated tree before any client or dashboard points at it:

  • The startup bolt line names the file the upgrade wrote — the same string, not a near match.
  • The log goes on to report the HTTP listener on port 8086; a reported 2.0.3 startup reached that line right after opening the migrated storage.
  • The bucket list in the upgrade's organization matches the mapping lines in the upgrade log, database and retention policy by name.
  • A query over a known time range returns measurements you recognize from the 1.x source.

Only after that query succeeds do dashboards, Telegraf and Node-RED writers get new endpoints and tokens. A failure at that point is a different fault: if a writer cannot reach an InfluxDB container by its name, that is service discovery, not a failed migration. And a failed client login never proves the data did not migrate — the bucket the server serves is the thing to prove first.

So the decision, case by case: paths differ, repoint the service and restart; paths match but the prompt returns, chase ownership and stale files from earlier attempts; no upgrade subcommand, you are on the 1.x binary, run the 2.0 one; container loop error, unmount the duplicated volume. Every case ends the same way — the bolt file the startup log names, and one known bucket query, are what reconnect clients.

Questions asked

Where did my 1.8 databases go after the upgrade?

Each 1.x database and its retention policy become one 2.0 bucket named as database plus policy, joined by a slash: a reported migration turned the telegraf database on its autogen policy into the bucket telegraf/autogen. The upgrade log records each mapping in its database and Bucket lines. If the bucket list in the upgraded organization is empty, the copy did not fail; the server is reading a different tree.

Does creating another admin user after the prompt help?

No. The prompt appears because the bolt file the service opened holds no organizations, and a second administrator is written into that same empty tree, so it can never touch metadata stored under another path. Stop the service, point it at the paths the upgrade logged, restart, and sign in with the administrator the upgrade itself created.

Can I move the data without influxd upgrade?

Yes. One reported 1.8-to-2.0 move exported buckets to CSV with influx query and its --raw flag, then imported them with influx write into a fresh 2.0 installation, after listing both connections with influx config ls --json to keep the servers straight. It is slower for long history and carries no users across, but the target is a clean install you fill yourself, so no path mismatch can hide the data.

Where does a 2.0 server look when nothing sets the paths?

Under the home directory of the account that runs it, in the .influxdbv2 folder there. Run as root with no config, a foreground start opens /root/.influxdbv2, which is exactly where one reported startup opened its bolt file. That is why the same binary yields different trees under different accounts, and why print-config must run in the same account and environment as the service.

Keep reading

  • Troubleshooting

    Fix InfluxDB database is locked on a network share

    The mounted share is the first suspect: InfluxDB 2.5.1 opens its bolt file on the share, then fails SQL migrations with database is locked because SQLite file locking is not dependable on NFS or SMB. Stop every process that can reach the paths, confirm the active bolt-path and engine-path, prove the same configuration on local storage, then keep the engine local and use the share only for backups.

    Edge computing and IIoT

  • Troubleshooting

    Why a Kubernetes liveness probe interrupts the InfluxDB upgrade

    The upgrade was not killed by volume size: the log shows the disk check passing with 63 GB free against 45 GB required, and a debug run shows no application error. A Kubernetes liveness probe with a too-short failure window restarted the container mid-migration. Give the migration a startup probe or a probe-free Job, size the window from a timed run, and validate the data before writers reconnect.

    Edge computing and IIoT

  • Troubleshooting

    Why DB Table Historian is missing on Ignition 8.0

    The DB Table Historian provider type does not exist in any Ignition 8.0.x gateway, regardless of module or license state: the type ships with the 8.1 line. The same configuration that lacks it on v8.0.2 shows it and populates MySQL on v8.1.4, so the fix is upgrading the gateway to 8.1.x and creating the provider on the existing connection.

    Edge computing and IIoT

Why InfluxDB initial token generation cannot be fully automated