InfluxDB won't start anymore

Hello
My influxdb is running on a raspberry pi more then two years as a docker container (image arm32v7/influxdb). After a reboot of my raspberry pi my influx db won’t start anymore and there is no listener.

My Logfile in portainer shows the following lines…

ts=2024-02-25T10:30:41.071873Z lvl=info msg=“InfluxDB starting” log_id=0nZxv4gl000 version=1.8.4 branch=1.8 commit=bc8ec4384eed25436d31045f974bf39f3310fa3c
ts=2024-02-25T10:30:41.071954Z lvl=info msg=“Go runtime” log_id=0nZxv4gl000 version=go1.13.8 maxprocs=4
run: create server: proto: required field “MaxShardID” not set

What is MaxShardID? Do I have to set this parameter in influxdb.conf? I couldn’t find any hint with google about this parameter.

Best regards Manuel

Hello @Manuel,
This problem is less about a missing configuration in your influxdb.conf and more about potentially corrupted metadata within InfluxDB itself. MaxShardID is not something you would manually set in your configuration file; it’s managed internally by InfluxDB to track the highest shard ID in use. MaxShardID is an internal metadata field used by InfluxDB to track the highest numerical identifier assigned to its shards. Shards in InfluxDB are a fundamental part of how data is stored; they represent a portion of the database’s data, typically segmented by time. Each shard contains a set of time series data for a specific time range, and every shard is assigned a unique identifier, or ShardID.

What version of InfluxDB are you using? For v1, there’s a influx_inspect buildtsi tool that can be used to rebuild the TSI index. You might want to perform a backup if you need.

Hello Anaisdg
Thank you very much for your answer. I see the following log lines from my docker influx container.

ts=2025-02-07T19:25:55.574890Z lvl=info msg=“InfluxDB starting” log_id=0u_TrRyW000 version=1.8.4 branch=1.8 commit=bc8ec4384eed25436d31045f974bf39f3310fa3c
ts=2025-02-07T19:25:55.574950Z lvl=info msg=“Go runtime” log_id=0u_TrRyW000 version=go1.13.8 maxprocs=4
run: create server: proto: required field “MaxShardID” not set

The state of the container is “exited” and I don’t have a chance to work with influx_inspect buildtsi do I? How can I fix the db outside of the container?

Greetings Manuel

Hello again
What I did. According to Rebuild the TSI index | InfluxDB OSS v1 Documentation in my docker container. Delete all _series and index directories in /var/lib/influxdb

root@dockerpi:~# docker run --rm arm32v7/influxdb:1.8.4 id influxdb
uid=999(influxdb) gid=999(influxdb) groups=999(influxdb)

root@dockerpi:/home/pi/docker-compose/influxdb/data# docker run --user 1001:1001 --rm -v /home/pi/docker-compose/influxdb/data:/var/lib/influxdb arm32v7/influxdb:1.8.4 influx_inspect buildtsi -datadir /var/lib/influxdb -waldir
/var/lib/influxdb
ts=2025-02-08T21:25:20.258104Z lvl=info msg=“Rebuilding database” log_id=0uas5B0G000 name=backup
ts=2025-02-08T21:25:20.262265Z lvl=info msg=“Rebuilding retention policy” log_id=0uas5B0G000 db_instance=backup db_rp=backup_20210810
ts=2025-02-08T21:25:20.263622Z lvl=info msg=“Rebuilding database” log_id=0uas5B0G000 name=data
ts=2025-02-08T21:25:20.326459Z lvl=info msg=“Rebuilding retention policy” log_id=0uas5B0G000 db_instance=data db_rp=_internal
ts=2025-02-08T21:25:20.327402Z lvl=info msg=“Rebuilding retention policy” log_id=0uas5B0G000 db_instance=data db_rp=openhab_db
ts=2025-02-08T21:25:20.328523Z lvl=info msg=“Rebuilding database” log_id=0uas5B0G000 name=meta
ts=2025-02-08T21:25:20.332737Z lvl=info msg=“Rebuilding database” log_id=0uas5B0G000 name=wal
ts=2025-02-08T21:25:20.336706Z lvl=info msg=“Rebuilding retention policy” log_id=0uas5B0G000 db_instance=wal db_rp=_internal
ts=2025-02-08T21:25:20.337368Z lvl=info msg=“Rebuilding retention policy” log_id=0uas5B0G000 db_instance=wal db_rp=openhab_db

Unfortunately still no luck in starting influxdb again. Log of docker containter saiys

ts=2025-02-08T21:36:17.494636Z lvl=info msg=“InfluxDB starting” log_id=0uasiILW000 version=1.8.4 branch=1.8 commit=bc8ec4384eed25436d31045f974bf39f3310fa3c
ts=2025-02-08T21:36:17.494715Z lvl=info msg=“Go runtime” log_id=0uasiILW000 version=go1.13.8 maxprocs=4
run: create server: proto: required field “MaxShardID” not set

Greetings Manuel