Redis - Error opening .rdb to save: permission denied

I am using redis version 3.0.6. The radish server process is started by the redis user.

Suddenly, 5 days after 24 hours, redis started to crash "opening .rdb to save." He worked before that.

As you can see in the excerpt from the logs below, Redis behaved normally and then started to crash. After rebooting the server, the server decided to solve the problem.

1427:M 24 May 01:09:05.102 * Background saving started by pid 2493 2493:C 24 May 01:09:34.916 * DB saved on disk 2493:C 24 May 01:09:34.917 * RDB: 310 MB of memory used by copy-on-write 1427:M 24 May 01:09:34.950 * Background saving terminated with success 1427:M 24 May 01:14:35.026 * 10 changes in 300 seconds. Saving... 1427:M 24 May 01:14:35.036 * Background saving started by pid 2494 2494:C 24 May 01:15:04.329 * DB saved on disk 2494:C 24 May 01:15:04.330 * RDB: 298 MB of memory used by copy-on-write 1427:M 24 May 01:15:04.408 * Background saving terminated with success 1427:M 24 May 01:20:05.008 * 10 changes in 300 seconds. Saving... 1427:M 24 May 01:20:05.018 * Background saving started by pid 2499 2499:C 24 May 01:20:33.830 * DB saved on disk 2499:C 24 May 01:20:33.831 * RDB: 330 MB of memory used by copy-on-write 1427:M 24 May 01:20:33.843 * Background saving terminated with success 1427:M 24 May 01:23:46.966 # Failed opening .rdb for saving: Read-only file system 1427:M 24 May 01:25:34.029 * 10 changes in 300 seconds. Saving... 1427:M 24 May 01:25:34.038 * Background saving started by pid 2500 2500:C 24 May 01:25:34.038 # Failed opening .rdb for saving: Read-only file system 1427:M 24 May 01:25:34.139 # Background saving error 1427:M 24 May 01:25:40.059 * 10 changes in 300 seconds. Saving... 1427:M 24 May 01:25:40.064 * Background saving started by pid 2501 2501:C 24 May 01:25:40.064 # Failed opening .rdb for saving: Read-only file system 1427:M 24 May 01:25:40.165 # Background saving error 1427:M 24 May 01:25:46.080 * 10 changes in 300 seconds. Saving... 1427:M 24 May 01:25:46.085 * Background saving started by pid 2502 2502:C 24 May 01:25:46.085 # Failed opening .rdb for saving: Read-only file system 1427:M 24 May 01:25:46.186 # Background saving error 1427:M 24 May 01:25:52.100 * 10 changes in 300 seconds. Saving... 1427:M 24 May 01:25:52.105 * Background saving started by pid 2503 2503:C 24 May 01:25:52.105 # Failed opening .rdb for saving: Read-only file system 1427:M 24 May 01:25:52.206 # Background saving error 

So my question is: how could this happen? Please give me the right solution for this.

+7
source share
2 answers

The read-only file system, I think, is the key here. It is possible that the device that he is trying to write was not installed correctly, but since this happened randomly, the system could make the file system work in readonly mode. There are a number of conditions that can cause the operating system to put the file system in read-only mode. This may mean that the file system is damaged or some file system consistency problem has occurred. If you host on a cloud provider and the drive supports a network like EBS in AWS, this may be caused by a temporary network problem. Sometimes the problems are short-lived, and fixing the problem can lead to reconfiguration of the partition (or server power cycling). In other cases, this is permanent, but since your server has fully recovered, this does not seem to be the case. But a true fix for this would be in your hardware setup, which was not detailed.

This answer is, although subtle in terms of β€œwhy”: Could not open the RDB file ... Read-only file system

+4
source

After updating .. (Ubuntu 14.04 LTS)

I had a redis complaint about this .. the file system was not an RO. That was good.

kill -9 REDIS-PROCESS # Otherwise, he will not die. looping on the error.

Deleted a dump.rdb file that already existed ..

Launched REDIS again, and the problem seemed to go away. (I just did it .. so that everything can come back ..)

It looks like this could be an upgrade issue ..

0
source

Source: https://habr.com/ru/post/1268153/


All Articles