I am running Ubuntu 18 (well, really Windows Subsystem for Linux with Ubuntu 18 distro). I have installed redis 4.0.9. If I start it with no config specified, it works out ok:
redis-server
However, if I start it using the default config file that installed, it throws an error:
Why would this be? I modified the default earlier but then I uninstalled with --purge and reinstalled redis-server to get back the original default config. Still the error persists.
You can see the loaded config that's causing me trouble here: https://defuse.ca/b/g4wHiT0SlX0AUcpuSpgx3v
PS
I posted this on StackOverflow after realizing that there may be the better forum since there are only a couple of hundred qs about redis here, but over 15,000 there. Sorry about the duplication.
Looks like you are restoring RDB from different server or different config and mismatching type of data the way it written or can't interpreted without ReJSON-RL. If that is the case just pass your required module during start of server it should work. like below
Thanks to Itamar Haber and asktyagi's comments/answer, I think I pieced together what was happening.
When I previously used the
ReJSON
module, it wrote some data to the DB. By default, Redis will backup its data to disk from time to time (I was under the wrong assumption that it operated entirely in RAM). So what happened is once I reverted back to the stock config and stopped using the module, Redis could not start and recover from the backup since it couldn't parse the data left behind by the now missing module. Hence the error.The reason uninstalling and reinstalling didn't help is that the new Redis installation would still find the backup file left behind by the previous installation and try to recover that data. The file was
dump.rdb
in my home directory. Perhaps a script moved it there from Redis working directory during uninstall and another script restored it to Redis working directory during install?. So to get Redis back to normal, I think I had to do any one of the following:dump.rdb
file, so there would be no data to restoredump.rdb
Here is the relevant section of the configuration. It shows how with its default config Redis was able to find the data dump from the previous installation
Thanks to all for your help. Wish I had figured this out earlier; I ended up wiping the OS and starting from scratch out of frustration.