I have installed master and slave mode redis replication but it doesnt sync with its replica and shows BUG report: I want to have 2 nodes that doesnt save its databases on the local storage(because of IO disk) this is my config file:
bind 192.168.200.19
port 6379
pidfile /var/run/redis/redis.pid
loglevel notice
logfile /var/log/redis/redis.log
appendonly no
daemonize no
supervised systemd
#repl-diskless-sync yes
#repl-timeout 6
#requirepass 123456
save ""
stop-writes-on-bgsave-error no
rdbcompression no
rdbchecksum no
dbfilename dump.rdb
dir /var/lib/redis
my slave config has this parameter more than master:
replicaof 192.168.200.19 6379
Master's Log:
*** Preparing to test memory region 7f1773bff000 (8388608 bytes)
*** Preparing to test memory region 7f1774400000 (8388608 bytes)
*** Preparing to test memory region 7f1774c00000 (8388608 bytes)
*** Preparing to test memory region 7f1775906000 (16384 bytes)
*** Preparing to test memory region 7f1775b23000 (16384 bytes)
*** Preparing to test memory region 7f1776452000 (24576 bytes)
*** Preparing to test memory region 7f1776463000 (4096 bytes)
.O.O.8204:M 18 Mar 2020 16:44:35.261 * Replica 192.168.200.18:6379 asks for synchronization
8204:M 18 Mar 2020 16:44:35.261 * Full resync requested by replica 192.168.200.18:6379
8204:M 18 Mar 2020 16:44:35.261 * Waiting for end of BGSAVE for SYNC
O.O.O.O.O.O.O.O.O
Fast memory test PASSED, however your memory can still be broken. Please run a memory test for several hours if possible.
------ DUMPING CODE AROUND EIP ------
Symbol: je_malloc_usable_size (base: 0x4e1e50)
Module: redis-rdb-bgsave 192.168.200.19:6379 (base 0x400000)
$ xxd -r -p /tmp/dump.hex /tmp/dump.bin
$ objdump --adjust-vma=0x4e1e50 -D -b binary -m i386:x86-64 /tmp/dump.bin
------
10042:C 18 Mar 2020 16:44:37.453 # dump of function (hexdump of 261 bytes):
534889fb4881ec9001000064488b042528000000488984248801000031c0803d43552c00000f848d000000488b0576e12b00648038000f858c0000004885ff747c644803042500000000488d50284889de4889d948c1ee1a4881e1000000c081e6f00000004801d6488b3e4839f90f859400000048c1eb0981e3f8ff1f004889d848034608488b1048c1ea30488b04d580d95600488b9424880100006448331425280000000f859b0100004881c4900100005bc30f1f40004885ff753331c0ebd30f1f800000000064480304250000000031f64889c7e865e105004885db74dd4885c00f8561ffffff0f1f80000000004889e7e8b8f6030031c04889e2e94cffffff660f1f
=== REDIS BUG REPORT END. Make sure to include from START to END. ===
Please report the crash by opening an issue on github:
http://github.com/antirez/redis/issues
Suspect RAM error? Use redis-server --test-memory to verify it.
8204:M 18 Mar 2020 16:44:37.881 # Background saving terminated by signal 11
8204:M 18 Mar 2020 16:44:37.881 # Connection with replica 192.168.200.17:6379 lost.
8204:M 18 Mar 2020 16:44:37.881 # SYNC failed. BGSAVE child returned an error
8204:M 18 Mar 2020 16:44:37.881 # Connection with replica 192.168.200.18:6379 lost.
8204:M 18 Mar 2020 16:44:37.882 # SYNC failed. BGSAVE child returned an error
8204:M 18 Mar 2020 16:44:38.117 * Replica 192.168.200.17:6379 asks for synchronization
8204:M 18 Mar 2020 16:44:38.117 * Full resync requested by replica 192.168.200.17:6379
8204:M 18 Mar 2020 16:44:38.117 * Starting BGSAVE for SYNC with target: disk
8204:M 18 Mar 2020 16:44:38.123 * Background saving started by pid 10049
10049:C 18 Mar 2020 16:44:38.123 # Failed opening the RDB file dump.rdb (in server root dir /var/lib/redis) for saving: Permission denied
=== REDIS BUG REPORT START: Cut & paste starting from here ===
10049:C 18 Mar 2020 16:44:38.123 # Redis 5.0.7 crashed by signal: 11
10049:C 18 Mar 2020 16:44:38.123 # Crashed running the instruction at: 0x4e1ed5
10049:C 18 Mar 2020 16:44:38.124 # Accessing address: 0xc288
10049:C 18 Mar 2020 16:44:38.124 # Failed assertion: <no assertion failed> (<no file>:0)
------ STACK TRACE ------
EIP:
redis-rdb-bgsave 192.168.200.19:6379(je_malloc_usable_size+0x85)[0x4e1ed5]
Backtrace:
redis-rdb-bgsave 192.168.200.19:6379(logStackTrace+0x45)[0x4744c5]
redis-rdb-bgsave 192.168.200.19:6379(sigsegvHandler+0xb9)[0x474c89]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7f177591b390]
redis-rdb-bgsave 192.168.200.19:6379(je_malloc_usable_size+0x85)[0x4e1ed5]
redis-rdb-bgsave 192.168.200.19:6379(zfree+0xe)[0x4376ee]
redis-rdb-bgsave 192.168.200.19:6379(rdbSave+0x266)[0x451aa6]
redis-rdb-bgsave 192.168.200.19:6379(rdbSaveBackground+0x7c)[0x451b2c]
redis-rdb-bgsave 192.168.200.19:6379(startBgsaveForReplication+0xbc)[0x44cc5c]
redis-rdb-bgsave 192.168.200.19:6379(syncCommand+0x29b)[0x44d01b]
redis-rdb-bgsave 192.168.200.19:6379(call+0xab)[0x43020b]
redis-rdb-bgsave 192.168.200.19:6379(processCommand+0x377)[0x4308e7]
redis-rdb-bgsave 192.168.200.19:6379(processInputBuffer+0x175)[0x440da5]
redis-rdb-bgsave 192.168.200.19:6379(aeProcessEvents+0x36d)[0x429e1d]
redis-rdb-bgsave 192.168.200.19:6379(aeMain+0x2b)[0x42a04b]
redis-rdb-bgsave 192.168.200.19:6379(main+0x4bf)[0x426bef]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f1775560830]
redis-rdb-bgsave 192.168.200.19:6379(_start+0x29)[0x426e69]
------ INFO OUTPUT ------
# Server
redis_version:5.0.7
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:24bfc3160578820c
redis_mode:standalone
os:Linux 4.4.0-174-generic x86_64
arch_bits:64
multiplexing_api:epoll
atomicvar_api:atomic-builtin
gcc_version:5.4.0
process_id:10049
run_id:449bf765cc5bc798fdd24f00b8e8886d77330e1a
tcp_port:6379
uptime_in_seconds:563
uptime_in_days:0
hz:10
configured_hz:10
lru_clock:7478974
executable:/usr/bin/redis-server
config_file:/etc/redis/redis.conf
# Clients
connected_clients:1
client_recent_max_input_buffer:2
client_recent_max_output_buffer:0
blocked_clients:0
# Memory
used_memory:178206416
used_memory_human:169.95M
used_memory_rss:189911040
used_memory_rss_human:181.11M
used_memory_peak:253500584
used_memory_peak_human:241.76M
used_memory_peak_perc:70.30%
used_memory_overhead:2000736
used_memory_startup:791336
used_memory_dataset:176205680
used_memory_dataset_perc:99.32%
allocator_allocated:178233880
allocator_active:184782848
allocator_resident:188129280
total_system_memory:8370368512
total_system_memory_human:7.80G
used_memory_lua:37888
used_memory_lua_human:37.00K
used_memory_scripts:0
used_memory_scripts_human:0B
number_of_cached_scripts:0
maxmemory:0
maxmemory_human:0B
maxmemory_policy:noeviction
allocator_frag_ratio:1.04
allocator_frag_bytes:6548968
allocator_rss_ratio:1.02
allocator_rss_bytes:3346432
rss_overhead_ratio:1.01
rss_overhead_bytes:1781760
mem_fragmentation_ratio:1.07
mem_fragmentation_bytes:11767656
mem_not_counted_for_evict:0
mem_replication_backlog:1048576
mem_clients_slaves:49694
mem_clients_normal:16922
mem_aof_buffer:0
mem_allocator:jemalloc-5.1.0
active_defrag_running:0
lazyfree_pending_objects:0
# Persistence
loading:0
rdb_changes_since_last_save:1536
rdb_bgsave_in_progress:0
rdb_last_save_time:1584536715
rdb_last_bgsave_status:err
rdb_last_bgsave_time_sec:2
rdb_current_bgsave_time_sec:-1
rdb_last_cow_size:0
aof_enabled:0
aof_rewrite_in_progress:0
aof_rewrite_scheduled:0
aof_last_rewrite_time_sec:-1
aof_current_rewrite_time_sec:-1
aof_last_bgrewrite_status:ok
aof_last_write_status:ok
aof_last_cow_size:0
# Stats
total_connections_received:717
total_commands_processed:4979
instantaneous_ops_per_sec:0
total_net_input_bytes:153780585
total_net_output_bytes:2267800
instantaneous_input_kbps:0.00
instantaneous_output_kbps:2.14
rejected_connections:0
sync_full:713
sync_partial_ok:0
sync_partial_err:0
expired_keys:0
expired_stale_perc:0.00
expired_time_cap_reached_count:0
evicted_keys:0
keyspace_hits:0
keyspace_misses:0
pubsub_channels:0
pubsub_patterns:0
latest_fork_usec:4933
migrate_cached_sockets:0
slave_expires_tracked_keys:0
active_defrag_hits:0
active_defrag_misses:0
active_defrag_key_hits:0
active_defrag_key_misses:0
# Replication
role:master
connected_slaves:1
slave0:ip=192.168.200.17,port=6379,state=wait_bgsave,offset=0,lag=0
master_replid:1f2f6839a9bdab2d9da92f426930f82675969eb9
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:153668956
second_repl_offset:-1
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:152620381
repl_backlog_histlen:1048576
# CPU
used_cpu_sys:0.000000
used_cpu_user:0.000000
used_cpu_sys_children:0.000000
used_cpu_user_children:0.000000
# Commandstats
cmdstat_info:calls=578,usec=63163,usec_per_call=109.28
cmdstat_keys:calls=12,usec=15800,usec_per_call=1316.67
cmdstat_psync:calls=712,usec=1139778,usec_per_call=1600.81
cmdstat_replconf:calls=1426,usec=4281,usec_per_call=3.00
cmdstat_set:calls=1536,usec=14223,usec_per_call=9.26
cmdstat_command:calls=2,usec=3142,usec_per_call=1571.00
cmdstat_ping:calls=713,usec=1336,usec_per_call=1.87
# Cluster
cluster_enabled:0
slave's log:
18727:S 18 Mar 2020 16:50:34.360 * Full resync from master: 1f2f6839a9bdab2d9da92f426930f82675969eb9:153669432
18727:S 18 Mar 2020 16:50:37.079 # I/O error reading bulk count from MASTER: Resource temporarily unavailable
18727:S 18 Mar 2020 16:50:37.369 * Connecting to MASTER 192.168.200.19:6379
18727:S 18 Mar 2020 16:50:37.369 * MASTER <-> REPLICA sync started
18727:S 18 Mar 2020 16:50:37.369 * Non blocking connect for SYNC fired the event.
18727:S 18 Mar 2020 16:50:37.370 * Master replied to PING, replication can continue...
18727:S 18 Mar 2020 16:50:37.370 * Partial resynchronization not possible (no cached master)
18727:S 18 Mar 2020 16:50:37.371 * Full resync from master: 1f2f6839a9bdab2d9da92f426930f82675969eb9:153669432