redis rdb corruption - Wrong signature in header

3,520 views
Skip to first unread message

manohar ht

unread,
Sep 5, 2013, 4:14:13 AM9/5/13
to redi...@googlegroups.com
Hi,

Our redis server crashed today and after we got the machine up, redis is not able to load the rdb file. It fails logging below messages.

Sep  5 03:59:31 redis[1253]: Wrong signature trying to load DB from file
Sep  5 03:59:31 redis[1253]: Fatal error loading the DB. Exiting.

Is there any fix for this ? Redis version is 2.6.5

Thanks,
Manohar.

Henrique Mecking

unread,
Sep 5, 2013, 4:17:08 PM9/5/13
to redi...@googlegroups.com
Hi Manohar,
I suggest you update your Redis for more detail logs:

Att,
Henrique Mecking.


--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+u...@googlegroups.com.
To post to this group, send email to redi...@googlegroups.com.
Visit this group at http://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/groups/opt_out.




Salvatore Sanfilippo

unread,
Sep 5, 2013, 5:04:16 PM9/5/13
to Redis DB
Please post the output of this command:

$ hexdump -n 64 -C dump.rdb

You should get something like:

00000000 52 45 44 49 53 30 30 30 36 fe 00 00 07 6b 65 79 |REDIS0006....key|
00000010 3a 38 32 34 09 76 61 6c 75 65 3a 38 32 34 00 06 |:824.value:824..|
00000020 6b 65 79 3a 31 39 08 76 61 6c 75 65 3a 31 39 00 |key:19.value:19.|
00000030 07 6b 65 79 3a 34 31 39 09 76 61 6c 75 65 3a 34 |.key:419.value:4|
00000040

Salvatore
> --
> You received this message because you are subscribed to the Google Groups
> "Redis DB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to redis-db+u...@googlegroups.com.
> To post to this group, send email to redi...@googlegroups.com.
> Visit this group at http://groups.google.com/group/redis-db.
> For more options, visit https://groups.google.com/groups/opt_out.



--
Salvatore 'antirez' Sanfilippo
open source developer - GoPivotal
http://invece.org

Beauty is more important in computing than anywhere else in technology
because software is so complicated. Beauty is the ultimate defence
against complexity.
— David Gelernter

manohar h t

unread,
Sep 5, 2013, 11:51:35 PM9/5/13
to redi...@googlegroups.com
Below is the hexdump output of the corrupted dump file.

00000000  76 69 65 77 65 72 5f 63  6f 75 6e 74 5f 76 69 73  |viewer_count_vis|
00000010  69 62 6c 65 04 74 72 75  65 15 69 73 5f 70 61 73  |ible.true.is_pas|
00000020  73 77 6f 72 64 5f 70 72  6f 74 65 63 74 65 64 05  |sword_protected.|
00000030  66 61 6c 73 65 0d 69 73  5f 65 6d 62 65 64 64 61  |false.is_embedda|
00000040

- Manohar.

t...@tjl2.com

unread,
Oct 8, 2013, 5:00:47 PM10/8/13
to redi...@googlegroups.com
I'm seeing this problem too.

A hexdump on the dump file that we have shows that the dump starts with "|OK.REDIS0001?..!|"

After taking a look at the source code of where this error gets thrown, I see that the 1st 5 bytes of the .rdb file should be REDIS. Do you have any idea where the "OK." might be coming from?

Multiple attempts at dumping the data always create an rdb file that cannot be loaded up again.

We're dumping from redis-server-2.2.5 and trying to import back into 2.2.11, so I'm guessing there shouldn't be any major changes at play here, unless there was a bug with dumps in 2.2.5?

Salvatore Sanfilippo

unread,
Oct 9, 2013, 4:28:19 AM10/9/13
to Redis DB
Hello, sorry for the huge delay, this is not an RDB file at all apparently...
We suspect that trading off implementation flexibility for understandability makes sense for most system designs.
       — Diego Ongaro and John Ousterhout (from Raft paper)

Salvatore Sanfilippo

unread,
Oct 9, 2013, 4:28:42 AM10/9/13
to Redis DB
Hello, RDB files never used to start with "OK", the file was corrupted in some way.
Reply all
Reply to author
Forward
0 new messages