I have tried it several times but with no success sofar. I’m running a Docker container with currently Influx 1.8.10, Grafana 9.2.0 and Telegraf 1.24.2. I’m maintaining the image and upgrading it occassionally when Grafana or Telegraf has been upgraded. This works like a charm.
But as Influx 1.x is very outdated I wanted to give it a try to upgrade this to version 2.x. Created a new image with Influx 2.x and the latest Grafana and Telegraf. Tried starting it up initially through the following command:
docker run
-p 3003:3003
-p 3004:8083
-p 8086:8086
-p 22022:22
-v $PWD/influxdb.conf:/etc/influxdb/influxdb.conf:ro
-v influxdb1_data:/var/lib/influxdb
-v influxdb_log:/var/log/influxdb
-v influxdb2_data:/var/lib/influxdb2
-v influxdb2_log:/var/log/influxdb2
-v grafana_data:/var/lib/grafana
-v grafana_log:/var/log/grafana
-v telegraf_log:/var/log/telegraf
-e DOCKER_INFLUXDB_INIT_MODE=upgrade
-e DOCKER_INFLUXDB_INIT_USERNAME=admin
-e DOCKER_INFLUXDB_INIT_PASSWORD=xxxxx
-e DOCKER_INFLUXDB_INIT_ORG=myorg
-e DOCKER_INFLUXDB_INIT_BUCKET=mybucket
-e DOCKER_INFLUXDB_INIT_UPGRADE_V1_CONFIG=/etc/influxdb/influxdb.conf
-e INFLUXD_CONFIG_PATH=/etc/influxdb2/config.toml
-e INFLUXD_BOLT_PATH=/etc/influxdb2/influxdb.bolt
-e INFLUXD_ENGINE_PATH=/etc/influxdb2/engine
-e "GF_SECURITY_ADMIN_USER=xxxx
-e “GF_SECURITY_ADMIN_PASSWORD=xxxxxxx”
pluim003/influxdb2-grafana-telegraf:dev
Followed also the suggestion to chown /var/lib/influxdb to the influxdb-user (chown -R influxdb:influxdb instead of chown -R 1000:1000 as the influxdb-user in this image has PUID and GUID 999.
Unfortunately no logging but the only thing shown is:
pi@raspberrypi:~/influxdb2 $ ./influx_upgrade.sh
/usr/lib/python3/dist-packages/supervisor/options.py:474: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a “-c” argument specifying an absolute path to a configuration file for improved security.
self.warnings.warn(
2022-10-17 08:57:35,925 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message.
2022-10-17 08:57:35,926 INFO Included extra file “/etc/supervisor/conf.d/supervisord.conf” during parsing
2022-10-17 08:57:35,936 INFO RPC interface ‘supervisor’ initialized
2022-10-17 08:57:35,936 CRIT Server ‘unix_http_server’ running without any HTTP authentication checking
2022-10-17 08:57:35,937 INFO supervisord started with pid 1
2022-10-17 08:57:36,945 INFO spawned: ‘influxdb’ with pid 7
2022-10-17 08:57:36,954 INFO spawned: ‘telegraf’ with pid 8
2022-10-17 08:57:36,965 INFO spawned: ‘grafana’ with pid 9
2022-10-17 08:57:38,103 INFO success: influxdb entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-10-17 08:57:38,103 INFO success: telegraf entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-10-17 08:57:38,103 INFO success: grafana entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-10-17 08:57:38,116 INFO exited: influxdb (exit status 1; not expected)
2022-10-17 08:57:39,120 INFO spawned: ‘influxdb’ with pid 32
2022-10-17 08:57:40,152 INFO success: influxdb entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2022-10-17 08:57:40,165 INFO exited: influxdb (exit status 1; not expected)
2022-10-17 08:57:41,169 INFO spawned: ‘influxdb’ with pid 49
2022-10-17 08:57:42,201 INFO success: influxdb entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
What can cause this?