Here is the detail from the log:

=== REDIS BUG REPORT START: Cut & paste starting from here === [0/428] [9701] 18 Jul 02:21:30.542 # Redis 2.9.7 crashed by signal: 11 [9701] 18 Jul 02:21:30.542 # Failed assertion: (:0) [9701] 18 Jul 02:21:30.542 # --- STACK TRACE /usr/local/bin/redis-server(logStackTrace+0x52)[0x4390d2] /usr/local/bin/redis-server(dictNext+0x68)[0x4128d8] /lib/x86_64-linux-gnu/libpthread.so.0(+0xfcb0)[0x7fcdf3a84cb0] /usr/local/bin/redis-server(dictNext+0x68)[0x4128d8] /usr/local/bin/redis-server(rdbSave+0x228)[0x4255a8] /usr/local/bin/redis-server(rdbSaveBackground+0x6f)[0x4257af] /usr/local/bin/redis-server(serverCron+0x467)[0x414f77] /usr/local/bin/redis-server(aeProcessEvents+0x1f3)[0x410dd3] /usr/local/bin/redis-server(aeMain+0x2b)[0x410fbb] /usr/local/bin/redis-server(main+0x2c4)[0x40fe34] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x7fcdf36d976d] /usr/local/bin/redis-server[0x40ff9d] [9701] 18 Jul 02:21:30.542 # --- INFO OUTPUT [9701] 18 Jul 02:21:30.542 # # Server redis_version:2.9.7 redis_git_sha1:a2db8e48 redis_git_dirty:1 os:Linux 3.2.0-23-generic x86_64 arch_bits:64 multiplexing_api:epoll gcc_version:4.6.3 process_id:9701 run_id:5f48a144472ae281c1de68f5b18c8574caf48e49 tcp_port:6379 uptime_in_seconds:231 uptime_in_days:0 lru_clock:37199

Clients

connected_clients:1 client_longest_output_list:0 client_biggest_input_buf:0 blocked_clients:0

Memory

used_memory:4908282496 used_memory_human:4.57G used_memory_rss:5015216128 used_memory_peak:4908397808 used_memory_peak_human:4.57G used_memory_lua:30720 mem_fragmentation_ratio:1.02 mem_allocator:jemalloc-3.0.0

Persistence

loading:0 rdb_changes_since_last_save:17534 rdb_bgsave_in_progress:0 rdb_last_save_time:1342549047 rdb_last_bgsave_status:err rdb_last_bgsave_time_sec:13 rdb_current_bgsave_time_sec:-1 aof_enabled:0 aof_rewrite_in_progress:0 aof_rewrite_scheduled:0 aof_last_rewrite_time_sec:-1 aof_current_rewrite_time_sec:-1

Stats

total_connections_received:4 total_commands_processed:44173 instantaneous_ops_per_sec:0 rejected_connections:0 expired_keys:0 evicted_keys:0 keyspace_hits:9198 keyspace_misses:1520 pubsub_channels:0 pubsub_patterns:0 latest_fork_usec:50434

Replication

role:master connected_slaves:0

CPU

used_cpu_sys:0.59 used_cpu_user:11.56 used_cpu_sys_children:0.00 used_cpu_user_children:0.00

Commandstats

cmdstat_sadd:calls=6410,usec=14064,usec_per_call=2.19 cmdstat_zadd:calls=3957,usec=19042,usec_per_call=4.81 cmdstat_zscore:calls=364,usec=1363,usec_per_call=3.74 cmdstat_hset:calls=2410,usec=4998,usec_per_call=2.07 cmdstat_hget:calls=4355,usec=5004,usec_per_call=1.15 cmdstat_hmset:calls=6369,usec=50431,usec_per_call=7.92 cmdstat_hmget:calls=5999,usec=10266,usec_per_call=1.71 cmdstat_select:calls=5,usec=5,usec_per_call=1.00 cmdstat_keys:calls=1,usec=1219,usec_per_call=1219.00 cmdstat_multi:calls=4766,usec=1480,usec_per_call=0.31 cmdstat_exec:calls=4766,usec=16059,usec_per_call=3.37 cmdstat_info:calls=5,usec=504,usec_per_call=100.80 cmdstat_watch:calls=4766,usec=4115,usec_per_call=0.86

Cluster

cluster_enabled:0

Keyspace

db0:keys=7595100,expires=0 db1:keys=3412,expires=0 hash_init_value: 1342206335

[9701] 18 Jul 02:21:30.542 # --- CLIENT LIST OUTPUT [9701] 18 Jul 02:21:30.542 # addr=127.0.0.1:35864 fd=6 age=231 idle=40 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=info

[9701] 18 Jul 02:21:30.542 # --- REGISTERS [9701] 18 Jul 02:21:30.542 # RAX:00007bcdd25eef40 RBX:00007fcdf2c5a080 RCX:ff4febb51ed00b65 RDX:000000000000002e RDI:00007fccc6c09340 RSI:00007fcdbdf25600 RBP:0000000000000000 RSP:00007fff24cc7028 R8 :0000000001f34ce0 R9 :1ed00b74615f6574 R10:73616c09064febb5 R11:00007fcdbdf255f5 R12:0000000000000000 R13:00007fccc6c09340 R14:00007fcdbdf79db0 R15:00000138962c3e94 RIP:00000000004128d8 EFL:0000000000010202 CSGSFS:0000000000000033 [9701] 18 Jul 02:21:30.542 # (00007fff24cc70a0) -> 3037392d706d6574 [9701] 18 Jul 02:21:30.542 # (00007fff24cc7098) -> 0000000000467775 [9701] 18 Jul 02:21:30.542 # (00007fff24cc7090) -> 0000000000000000 [9701] 18 Jul 02:21:30.542 # (00007fff24cc7088) -> 00007fcdbdf25618 [9701] 18 Jul 02:21:30.542 # (00007fff24cc7080) -> 00000001f3000010 [9701] 18 Jul 02:21:30.542 # (00007fff24cc7078) -> 00007fcdf3000198 [9701] 18 Jul 02:21:30.542 # (00007fff24cc7070) -> 0000000000000000 [9701] 18 Jul 02:21:30.542 # (00007fff24cc7068) -> 0000000001f34c00 [9701] 18 Jul 02:21:30.542 # (00007fff24cc7060) -> ccec6b508c3dbb83 [9701] 18 Jul 02:21:30.542 # (00007fff24cc7058) -> 0000000000441490 [9701] 18 Jul 02:21:30.542 # (00007fff24cc7050) -> 0000000000441370 [9701] 18 Jul 02:21:30.542 # (00007fff24cc7048) -> 0000000000441380 [9701] 18 Jul 02:21:30.542 # (00007fff24cc7040) -> 00000000004413a0 [9701] 18 Jul 02:21:30.542 # (00007fff24cc7038) -> 00007fcdf2c10040 [9701] 18 Jul 02:21:30.542 # (00007fff24cc7030) -> 0000000001f34c00 [9701] 18 Jul 02:21:30.542 # (00007fff24cc7028) -> 00000000004255a8 [9701] 18 Jul 02:21:30.542 # === REDIS BUG REPORT END. Make sure to include from START to END. ===

Comment From: tangxinfa

your previous bgsave failed(rdb_last_bgsave_status:err), fix it quickly:

redis 127.0.0.1:6379> config set stop-writes-on-bgsave-error no

Comment From: tangxinfa

Yes, It's good to put the "stop-writes-on-bgsave-error no" option in your redis configure file, then temporary bgsave failed not break your service.

On Tue, Nov 12, 2013 at 12:53 AM, Nando Sousa notifications@github.comwrote:

@tangxinfa https://github.com/tangxinfa it worked here.. can i put this on redis-conf?

— Reply to this email directly or view it on GitHubhttps://github.com/antirez/redis/issues/584#issuecomment-28217000 .

Comment From: charsyam

@byzhang but I might think that you should look for the reason why bgsave failed first.

Comment From: tsyber1an

"config set stop-writes-on-bgsave-error no" works for me

Comment From: mohsinahmed22

When you restart your server you need to redo "config set stop-writes-on-bgsave-error no" command

Comment From: aakanksha0402

The error for me was the permissions to the dir and the dbfilename path and file that can be found in redis.conf. The same is mentioned here - https://stackoverflow.com/a/28686802/5805239

Comment From: JamesStark-wasp

What is permanent solution I have to give "config set stop-writes-on-bgsave-error no" every day? dont know why may be due to high traffic or What?

Comment From: oranagra

@JamesStark-wasp you'll have to provide more info so that we know why it's failing. the post at the top of this issue was a bug that is probably resolved long ago.

Comment From: JamesStark-wasp

I am using redis server for storing some Key_value with nodejs I have installed Redis in one of my two servers and access comman redis server from both of my server. Actually this is my requirement I am using redis just to share data beetween both server and I am getting above error daily. I am using $ redis-cli

config set stop-writes-on-bgsave-error no as a temporary solution

redis.log file is like, 2218:M 02 Sep 12:35:13.096 * 1 changes in 900 seconds. Saving... 2218:M 02 Sep 12:35:13.096 * Background saving started by pid 23799 23799:C 02 Sep 12:35:13.096 # Failed opening the RDB file dump.rdb (in server root dir /var/spool/cron) for saving: Read-only file system 2218:M 02 Sep 12:35:13.196 # Background saving error

Comment From: oranagra

@JamesStark-wasp it looks like someone is trying to hack your system. i.e. inject some data into redis and try to save it in /var/spool/cron to be executed and gain control of your server. lucky for you, it looks like they're failing to write there. you must password protect your redis (and it would be wise to also flush or sanitize the data).

Comment From: JamesStark-wasp

As I Told you before is there any possibility that I am using comman redis between my two nodejs server with diffrent IP address so is redis consider another nodejs server as a hack? because its connecting out side of localhost environment?

"I am using redis server for storing some Key_value with nodejs I have installed Redis in one of my two servers and access comman redis server from both of my server. Actually this is my requirement I am using redis just to share data beetween both server and I am getting above error daily."

Comment From: oranagra

@JamesStark-wasp the reason for the error is that redis fails to write to the disk. And it's clear from your log file that the reason for that is that someone have set it to try to write to cron file (which is a mechanism for schedules task execution in linux). This is a common thing that hackers do to try and gain control over your server and cause it to execute their code. (I.e. Write some data into redis, and then make redis write it to the disk in a location where Linux will execute that it).

This is most likely because your redis isn't password protected, and malicious users managed to write into it and change its configuration.

The error you're getting daily is the least of your concerns....

Comment From: JamesStark-wasp

I tried to set password but I could not restart redis server so password can apply after restarting. using sudo systemctl restart redis Command line.

Still I TRY TO RESTART redis server but it could not restarting not even showing error message.

So I tried another solution like from ufw deny 6379 port and allow only for my ip address.

$ sudo systemctl restart redis

Why redis is not restarting may be because of above error.

Comment From: itamarhaber

Hello @JamesStark-wasp

Keep in mind that this issue tracker should be used for reporting bugs or proposing improvements to the Redis server. Questions should be directed to the community:

Comment From: mzw4

The error for me was the permissions to the dir and the dbfilename path and file that can be found in redis.conf. The same is mentioned here - https://stackoverflow.com/a/28686802/5805239

chown-ing the dir and dbfilename, then restarting redis fixed it for me!