Hello,
I am relative new to influxdb, e.g. my influx was working quite well and I did not change much, so I’m not well trained.
I have a docker-compose file with Influx (1.8) and grafana wich I want to convert to Influx 2.0. I read the docs how to do that, but I don’t understand them completely. My influx 1.8 compose file looks like this:
version: '2'
networks:
influx:
external: true
services:
influxdb:
image: influxdb:1.8
container_name: influxdb
ports:
- 8086:8086
- 8088:8088
- 8087:8087
volumes:
- /opt/influxdb:/var/lib/influxdb
restart:
always
networks:
- influx
grafana:
image: grafana/grafana
container_name: grafana
ports:
- 3000:3000
volumes:
- /opt/influxdb/grafana/var/lib/grafana:/var/lib/grafana
- /opt/influxdb/grafana/etc/grafana:/etc/grafana
restart:
always
networks:
- influx
then I changed the compose file like I understood from the docs:
services:
influxdb:
image: influxdb:2.0
container_name: influxdb
ports:
- 8086:8086
- 8088:8088
- 8087:8087
volumes:
- /opt/influxdb:/var/lib/influxdb
- /opt/influxdb/influxdb:/var/lib/influxdb2
- /opt/influxdb/influxdb:/etc/influxdb2
environment:
- DOCKER_INFLUXDB_INIT_MODE=upgrade
- DOCKER_INFLUXDB_INIT_USERNAME=admin
- DOCKER_INFLUXDB_INIT_PASSWORD=asdfghj
- DOCKER_INFLUXDB_INIT_ORG=4ma
- DOCKER_INFLUXDB_INIT_BUCKET=bucket1
- DOCKER_INFLUXDB_INIT_UPGRADE_V1_CONFIG=/etc/influxdb/influxdb.conf
restart:
always
networks:
- influx
But the converting of the data soesn’t work. In the logs it is said, the password is to short:
{"level":"info","ts":1619285176.6210938,"caller":"upgrade/upgrade.go:395","msg":"Starting InfluxDB 1.x upgrade"}
{"level":"info","ts":1619285176.6212215,"caller":"upgrade/upgrade.go:409","msg":"No InfluxDB 1.x config file specified, skipping its upgrade"}
{"level":"info","ts":1619285176.6213849,"caller":"upgrade/upgrade.go:412","msg":"Upgrade source paths","meta":"/var/lib/influxdb/meta","data":"/var/lib/influxdb/data"}
{"level":"info","ts":1619285176.621426,"caller":"upgrade/upgrade.go:413","msg":"Upgrade target paths","bolt":"/var/lib/influxdb2/influxd.bolt","engine":"/var/lib/influxdb2/engine"}
{"level":"info","ts":1619285176.6296387,"caller":"bolt/bbolt.go:76","msg":"Resources opened","service":"bolt","path":"/var/lib/influxdb2/influxd.bolt"}
{"level":"info","ts":1619285176.6301496,"caller":"migration/migration.go:153","msg":"Bringing up metadata migrations","service":"migrations","migration_count":14}
Error: password is too short
I tried to change the password in the 1.8 container, but the commands from the docs won’t work:
influx user password -n admin
What am I doing wrong??
Any help appreciated, Thanks in advance,
Ingo