Databases empty after restart


I have run into a strange issue. I am running InfluxDB 1.5.1 on Docker, I have created two new databases and sent data into both of them. I then decided to restart the container and now if I run a ‘SHOW MEASUREMENTS’ or ‘SHOW SERIES’ on either of these then they are empty.

I have re imported the data again and checked using ‘SHOW STATS’ to see if there are bytes written to disk for the database, which there is. I checked the path on disk which is correct and has TSM and TSI files in the correct locations.

The logging on startup shows the files being read and opened but nothing appearing in Grafana or via the CLI.

I have telegraf and kapacitor reading/writing to InfluxDB as well as the InfluxDB internal metrics and these survive a restart.

I have http auth enabled on InfluxDB and the user is a non admin user with write permissions granted. I have also tried dropping and re-creating the databases to see if it was a permissions issue which it was not. Also the databases use the autogen RP.

What else can I check to find the cause of this issue?

I’d check your Docker setup first to make sure everything is fine there. Try restarting, run ls on your data directory, see if there are directories for the database you created. If not, I suspect the Docker container isn’t using persistent volumes.

Hi Katy,

Thanks for your response, I fixed my issue by deleting and recreating the databases or changing the retention policies (not sure which one did it in the end).

Nothing on the docker side was changed as the telegraf DB was fine, I’ve prototyped before with InfluxDB and not come across this issue.
The only thing I can think of that is different was I switched on auth after the initial setup and creation of the databases…

1 Like

Interesting. Definitely let us know if you see a repeat problem here!

I came across the same issue.
I am running the TICK stack on my RPI (3b).
I am not using the docker.
After a crash and rebooting the rpi, the DB is empty.