Score:0

Redis from docker image redis:6.2.5-alpine3.14 can't start "Invalid LZF compressed string"

us flag

After restart docker container with redis:6.2.5-alpine3.14 it can't start with error:

[offset 55130] Internal error in RDB reading offset 0, function at rdb.c:411 -> Invalid LZF compressed string

Everything is OK after Redis storage was cleaned up:

# ls -la /redis/
total 68
drwxr-xr-x.  2 polkitd 1000    43 Oct  4 19:22 .
drw-r-----. 14 root    root   179 Sep  8 19:51 ..
-rw-r--r--.  1 polkitd 1000 63907 Oct  4 19:13 dump.rdb
-rw-r--r--.  1 polkitd root  4096 Oct  4 19:22 .dump.rdb.swp

Could somebody explain what can be a reason of this issue?

cn flag
Why do you have the `dump.rdb.swp` file? Is `dump.rdb` edited by `vi` or `vim`? You can check that with `sudo fuser dump.rdb`
us flag
@MirceaVutcovici Yes, I've spotted this file and it's also very suspicious for me. No, I've not tried to open this file.
Score:1
cn flag

This means that the RDB database is corrupted. You should stop the container and restore the file from a backup. If you can't restore it, you can rename/move it to have a corrupted backup in case you want to restore it partially, then start the redis container.

If this is happening often, check if AOF (Append Only File) is better for you. You can have both RDB and AOF at the same time. For more details read also Redis persistence demystified.

To check the consistency of the RDB files you can use:

redis-check-dump dump.rdb

See 4.3.1 Verifying snapshots and append-only files for more details.

If you use a cluster, you can recover one of the nodes with:

rladmin recover list  # To see the list of all files to be recovered

rladmin recover all
rladmin recover db <database_id|name>    # To recover only one DB
recover db only_configuration <db_name>  # To recover only the DB config

rladmin status     # To check which DBs were recovered

Also in a cluster it's possible to recover the the DB with:

rladmin cluster recover ....

See: cluster recover documentation

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.