Describe the bug dead lock while create cluster on windows
To reproduce
1. Create cluster config file with port: 6379/6380/6381/6382/6383/6384
port 6379
bind 0.0.0.0
protected-mode no
daemonize no
maxclients 1000
appendonly yes
cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 15000
cluster-announce-ip 127.0.0.1
cluster-announce-port 6379
cluster-announce-bus-port 16379
2. start redis-server
3. create cluster with command
./redis-cli --cluster create 127.0.0.1:6379 127.0.0.1:6380 127.0.0.1:6381 127.0.0.1:6382 127.0.0.1:6383 127.0.0.1:6384 --cluster-replicas 1
Expected behavior Create cluster successfully.
Additional information
1026:C 10 Jul 2025 11:07:28.344 # WARNING: Changing databases number from 16 to 1 since we are in cluster mode
1026:C 10 Jul 2025 11:07:28.344 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1026:C 10 Jul 2025 11:07:28.344 * Redis version=8.0.3, bits=64, commit=00000000, modified=0, pid=1026, just started
1026:C 10 Jul 2025 11:07:28.344 * Configuration loaded
1026:M 10 Jul 2025 11:07:28.346 * monotonic clock: POSIX clock_gettime
1026:M 10 Jul 2025 11:07:28.347 * Running mode=cluster, port=6380.
1026:M 10 Jul 2025 11:07:28.347 * Node configuration loaded, I'm 64acc6a4fdf15edba6bde42e17acb8fb04f2648a
1026:M 10 Jul 2025 11:07:28.350 * Server initialized
1698:C 10 Jul 2025 11:07:28.350 # WARNING: Changing databases number from 16 to 1 since we are in cluster mode
1698:C 10 Jul 2025 11:07:28.351 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1698:C 10 Jul 2025 11:07:28.351 * Redis version=8.0.3, bits=64, commit=00000000, modified=0, pid=1698, just started
1698:C 10 Jul 2025 11:07:28.351 * Configuration loaded
1026:M 10 Jul 2025 11:07:28.351 * Reading RDB base file on AOF loading...
1026:M 10 Jul 2025 11:07:28.351 * Loading RDB produced by version 8.0.3
1026:M 10 Jul 2025 11:07:28.351 * RDB age 1999 seconds
1026:M 10 Jul 2025 11:07:28.351 * RDB memory usage when created 1.61 Mb
1026:M 10 Jul 2025 11:07:28.351 * RDB is base AOF
1026:M 10 Jul 2025 11:07:28.351 * Done loading RDB, keys loaded: 0, keys expired: 0.
1026:M 10 Jul 2025 11:07:28.351 * DB loaded from base file appendonly.aof.1.base.rdb: 0.000 seconds
1026:M 10 Jul 2025 11:07:28.351 * DB loaded from append only file: 0.001 seconds
1026:M 10 Jul 2025 11:07:28.352 * Opening AOF incr file appendonly.aof.1.incr.aof on server start
1026:M 10 Jul 2025 11:07:28.352 * Ready to accept connections tcp
1698:M 10 Jul 2025 11:07:28.352 * monotonic clock: POSIX clock_gettime
1698:M 10 Jul 2025 11:07:28.353 * Running mode=cluster, port=6381.
1698:M 10 Jul 2025 11:07:28.354 * Node configuration loaded, I'm eac040b5753fec0b5643fc1174d401882c6e89a0
1698:M 10 Jul 2025 11:07:28.357 * Server initialized
1698:M 10 Jul 2025 11:07:28.359 * Reading RDB base file on AOF loading...
1698:M 10 Jul 2025 11:07:28.359 * Loading RDB produced by version 8.0.3
1698:M 10 Jul 2025 11:07:28.359 * RDB age 1999 seconds
1698:M 10 Jul 2025 11:07:28.359 * RDB memory usage when created 1.61 Mb
1698:M 10 Jul 2025 11:07:28.359 * RDB is base AOF
1698:M 10 Jul 2025 11:07:28.359 * Done loading RDB, keys loaded: 0, keys expired: 0.
1698:M 10 Jul 2025 11:07:28.359 * DB loaded from base file appendonly.aof.1.base.rdb: 0.001 seconds
1698:M 10 Jul 2025 11:07:28.360 * DB loaded from append only file: 0.001 seconds
1698:M 10 Jul 2025 11:07:28.360 * Opening AOF incr file appendonly.aof.1.incr.aof on server start
1698:M 10 Jul 2025 11:07:28.360 * Ready to accept connections tcp
873:C 10 Jul 2025 11:07:28.362 # WARNING: Changing databases number from 16 to 1 since we are in cluster mode
873:C 10 Jul 2025 11:07:28.362 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
873:C 10 Jul 2025 11:07:28.362 * Redis version=8.0.3, bits=64, commit=00000000, modified=0, pid=873, just started
873:C 10 Jul 2025 11:07:28.362 * Configuration loaded
873:M 10 Jul 2025 11:07:28.364 * monotonic clock: POSIX clock_gettime
873:M 10 Jul 2025 11:07:28.365 * Running mode=cluster, port=6382.
873:M 10 Jul 2025 11:07:28.365 * Node configuration loaded, I'm 24ca11d377119ebb97ac4846f64160eaf0d8b8d3
873:M 10 Jul 2025 11:07:28.368 * Server initialized
1992:C 10 Jul 2025 11:07:28.369 # WARNING: Changing databases number from 16 to 1 since we are in cluster mode
1992:C 10 Jul 2025 11:07:28.369 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1992:C 10 Jul 2025 11:07:28.369 * Redis version=8.0.3, bits=64, commit=00000000, modified=0, pid=1992, just started
1992:C 10 Jul 2025 11:07:28.369 * Configuration loaded
873:M 10 Jul 2025 11:07:28.369 * Reading RDB base file on AOF loading...
873:M 10 Jul 2025 11:07:28.369 * Loading RDB produced by version 8.0.3
873:M 10 Jul 2025 11:07:28.369 * RDB age 1999 seconds
873:M 10 Jul 2025 11:07:28.369 * RDB memory usage when created 1.61 Mb
873:M 10 Jul 2025 11:07:28.369 * RDB is base AOF
873:M 10 Jul 2025 11:07:28.369 * Done loading RDB, keys loaded: 0, keys expired: 0.
873:M 10 Jul 2025 11:07:28.369 * DB loaded from base file appendonly.aof.1.base.rdb: 0.000 seconds
873:M 10 Jul 2025 11:07:28.369 * DB loaded from append only file: 0.001 seconds
873:M 10 Jul 2025 11:07:28.370 * Opening AOF incr file appendonly.aof.1.incr.aof on server start
873:M 10 Jul 2025 11:07:28.370 * Ready to accept connections tcp
1992:M 10 Jul 2025 11:07:28.371 * monotonic clock: POSIX clock_gettime
1992:M 10 Jul 2025 11:07:28.371 * Running mode=cluster, port=6383.
1992:M 10 Jul 2025 11:07:28.372 * Node configuration loaded, I'm 75ce75ba91415889d522150807adb0555f5d0dfa
1992:M 10 Jul 2025 11:07:28.374 * Server initialized
1992:M 10 Jul 2025 11:07:28.375 * Reading RDB base file on AOF loading...
1992:M 10 Jul 2025 11:07:28.375 * Loading RDB produced by version 8.0.3
1992:M 10 Jul 2025 11:07:28.375 * RDB age 1999 seconds
1992:M 10 Jul 2025 11:07:28.375 * RDB memory usage when created 1.61 Mb
1992:M 10 Jul 2025 11:07:28.375 * RDB is base AOF
1992:M 10 Jul 2025 11:07:28.375 * Done loading RDB, keys loaded: 0, keys expired: 0.
1992:M 10 Jul 2025 11:07:28.375 * DB loaded from base file appendonly.aof.1.base.rdb: 0.000 seconds
1992:M 10 Jul 2025 11:07:28.375 * DB loaded from append only file: 0.001 seconds
1992:M 10 Jul 2025 11:07:28.375 * Opening AOF incr file appendonly.aof.1.incr.aof on server start
1992:M 10 Jul 2025 11:07:28.375 * Ready to accept connections tcp
1374:C 10 Jul 2025 11:07:28.379 # WARNING: Changing databases number from 16 to 1 since we are in cluster mode
1374:C 10 Jul 2025 11:07:28.379 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1374:C 10 Jul 2025 11:07:28.379 * Redis version=8.0.3, bits=64, commit=00000000, modified=0, pid=1374, just started
1374:C 10 Jul 2025 11:07:28.379 * Configuration loaded
1374:M 10 Jul 2025 11:07:28.381 * monotonic clock: POSIX clock_gettime
1374:M 10 Jul 2025 11:07:28.382 * Running mode=cluster, port=6384.
1374:M 10 Jul 2025 11:07:28.382 * Node configuration loaded, I'm 35ffbf4408a3f92f24000911a490b35cf25dfe4d
1374:M 10 Jul 2025 11:07:28.384 * Server initialized
1374:M 10 Jul 2025 11:07:28.385 * Reading RDB base file on AOF loading...
1374:M 10 Jul 2025 11:07:28.385 * Loading RDB produced by version 8.0.3
1374:M 10 Jul 2025 11:07:28.385 * RDB age 1999 seconds
1374:M 10 Jul 2025 11:07:28.385 * RDB memory usage when created 1.61 Mb
1374:M 10 Jul 2025 11:07:28.385 * RDB is base AOF
1374:M 10 Jul 2025 11:07:28.385 * Done loading RDB, keys loaded: 0, keys expired: 0.
1374:M 10 Jul 2025 11:07:28.385 * DB loaded from base file appendonly.aof.1.base.rdb: 0.000 seconds
1374:M 10 Jul 2025 11:07:28.385 * DB loaded from append only file: 0.001 seconds
1374:M 10 Jul 2025 11:07:28.385 * Opening AOF incr file appendonly.aof.1.incr.aof on server start
1374:M 10 Jul 2025 11:07:28.385 * Ready to accept connections tcp
1275:C 10 Jul 2025 11:07:29.402 # WARNING: Changing databases number from 16 to 1 since we are in cluster mode
1275:C 10 Jul 2025 11:07:29.402 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1275:C 10 Jul 2025 11:07:29.402 * Redis version=8.0.3, bits=64, commit=00000000, modified=0, pid=1275, just started
1275:C 10 Jul 2025 11:07:29.402 * Configuration loaded
1275:M 10 Jul 2025 11:07:29.403 * monotonic clock: POSIX clock_gettime
1275:M 10 Jul 2025 11:07:29.403 * Running mode=cluster, port=6379.
1275:M 10 Jul 2025 11:07:29.404 * Node configuration loaded, I'm 3013ce6d498e1cfc3396f2590f71b861e51dd45b
1275:M 10 Jul 2025 11:07:29.406 * Server initialized
1275:M 10 Jul 2025 11:07:29.406 * Reading RDB base file on AOF loading...
1275:M 10 Jul 2025 11:07:29.406 * Loading RDB produced by version 8.0.3
1275:M 10 Jul 2025 11:07:29.406 * RDB age 2000 seconds
1275:M 10 Jul 2025 11:07:29.406 * RDB memory usage when created 1.61 Mb
1275:M 10 Jul 2025 11:07:29.406 * RDB is base AOF
1275:M 10 Jul 2025 11:07:29.406 * Done loading RDB, keys loaded: 0, keys expired: 0.
1275:M 10 Jul 2025 11:07:29.406 * DB loaded from base file appendonly.aof.1.base.rdb: 0.000 seconds
1275:M 10 Jul 2025 11:07:29.407 * DB loaded from append only file: 0.000 seconds
1275:M 10 Jul 2025 11:07:29.407 * Opening AOF incr file appendonly.aof.1.incr.aof on server start
1275:M 10 Jul 2025 11:07:29.407 * Ready to accept connections tcp
>>> Performing hash slots allocation on 6 nodes...
Master[0] -> Slots 0 - 5460
Master[1] -> Slots 5461 - 10922
Master[2] -> Slots 10923 - 16383
Adding replica 127.0.0.1:6383 to 127.0.0.1:6379
Adding replica 127.0.0.1:6384 to 127.0.0.1:6380
Adding replica 127.0.0.1:6382 to 127.0.0.1:6381
>>> Trying to optimize slaves allocation for anti-affinity
[WARNING] Some slaves are in the same host as their master
M: 3013ce6d498e1cfc3396f2590f71b861e51dd45b 127.0.0.1:6379
slots:[0-5460] (5461 slots) master
M: 64acc6a4fdf15edba6bde42e17acb8fb04f2648a 127.0.0.1:6380
slots:[5461-10922] (5462 slots) master
M: eac040b5753fec0b5643fc1174d401882c6e89a0 127.0.0.1:6381
slots:[10923-16383] (5461 slots) master
S: 24ca11d377119ebb97ac4846f64160eaf0d8b8d3 127.0.0.1:6382
replicates 64acc6a4fdf15edba6bde42e17acb8fb04f2648a
S: 75ce75ba91415889d522150807adb0555f5d0dfa 127.0.0.1:6383
replicates eac040b5753fec0b5643fc1174d401882c6e89a0
S: 35ffbf4408a3f92f24000911a490b35cf25dfe4d 127.0.0.1:6384
replicates 3013ce6d498e1cfc3396f2590f71b861e51dd45b
Can I set the above configuration? (type 'yes' to accept): yes
Comment From: taozuhong
https://github.com/redis/redis/issues/5818
Comment From: sundb
@taozuhong do you mean running in WSL rather than Windows version?