Redis error currently not able to persist on disk
When doing a FLUSHALl on redis server, i get following error message
[root@server ~]# redis-cli FLUSHALL
(error) MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error.
[root@server ~]#
The error was because redis data directory was not properly configured.
To fix, the error, edit redis config file
1 |
vi /etc/redis/redis.conf |
Find
1 |
dir ./ |
Replace with
1 |
dir /var/lib/redis |
Create a directory
1 |
mkdir /var/lib/redis |
Make it owned by user redis
1 |
chown redis:redis /var/lib/redis |
Restart redis server
1 |
systemctl restart redis |
See Redis