You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have created a sentinel cluster with docker compose made of 3 sentinels (ports 5000, 5001, 5002), 1 master (port 6385) and 2 slaves (6386 and 6387); then I connect a client to sentinel node 5000 and start to execute the following steps:
time
action
t0
delete key 'mykey'
t1
sleep 3 seconds
t2(+3 sec)
set mykey=myvalue
t3
sleep_t3 3 seconds
t4(+6 sec)
dispatch sleep command 30 seconds to redis 6385 (using a separate connection)
t5
sleep_t5 7 seconds
t6(+13 sec)
set mykey=newvalue
t7
sleep_t7 50 seconds
t8(+63 sec)
get new master config (using a separate connection)
dispatch sleep command 3000 seconds to new redis master (using a separate connection)
t9
sleep_t9 5 seconds
t10(+70sec)
set mykey=newvalue
so at time t4 master on port 6385 enters debug mode for 30 seconds and sentinels elect a new master (everything works fine), but at time t8 the new master enters debug mode for 3000 seconds and sentinels are unable to elect a new master; if a separate client tries to connect it either hangs or connects but cannot modify data (receice error message: readonly, you can't write against a read only replica)
extract the attached file master-slave-sentinel.zip in a folder and start the sentinel cluster: docker compose -f docker-compose-sentinel.yml up -d
add the entry 127.0.01 host.docker.internal in your hosts file
copy the attached file test-lettuce-0.0.1-SNAPSHOT-jar-with-dependencies.jar and run with the following command: java -jar test-lettuce-0.0.1-SNAPSHOT-jar-with-dependencies.jar (the source files can be found in attachment test-lettuce-0.0.1-SNAPSHOT-sources.jar)
alternatively, perform the previously described steps manually
see the attachement for the console logs
tools used: redis 7.2.5-alpine, docker desktop 4.28.0 (windows)
for the client: java jre 17, lettuce-core 6.3.1
tested on :
windows 10 - Intel(R) Core(TM) i7-10510U
windows 10 - Intel(R) Core(TM) i7-1260P
Expected behavior
the expected behaviour is that a new master is elected correctly after the second elected master stop working
Additional information
Any additional information that is relevant to the problem.
The text was updated successfully, but these errors were encountered:
Describe the bug
I have created a sentinel cluster with docker compose made of 3 sentinels (ports 5000, 5001, 5002), 1 master (port 6385) and 2 slaves (6386 and 6387); then I connect a client to sentinel node 5000 and start to execute the following steps:
so at time t4 master on port 6385 enters debug mode for 30 seconds and sentinels elect a new master (everything works fine), but at time t8 the new master enters debug mode for 3000 seconds and sentinels are unable to elect a new master; if a separate client tries to connect it either hangs or connects but cannot modify data (receice error message: readonly, you can't write against a read only replica)
To reproduce
docker compose -f docker-compose-sentinel.yml up -d
java -jar test-lettuce-0.0.1-SNAPSHOT-jar-with-dependencies.jar
(the source files can be found in attachment test-lettuce-0.0.1-SNAPSHOT-sources.jar)see the attachement for the console logs
tools used: redis 7.2.5-alpine, docker desktop 4.28.0 (windows)
for the client: java jre 17, lettuce-core 6.3.1
tested on :
Expected behavior
the expected behaviour is that a new master is elected correctly after the second elected master stop working
Additional information
Any additional information that is relevant to the problem.
![readonly_error](https://private-user-images.githubusercontent.com/171339258/335622873-c7ccbcfd-a189-4bc9-b2cf-65af57c65911.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkzNjQ3MDAsIm5iZiI6MTcxOTM2NDQwMCwicGF0aCI6Ii8xNzEzMzkyNTgvMzM1NjIyODczLWM3Y2NiY2ZkLWExODktNGJjOS1iMmNmLTY1YWY1N2M2NTkxMS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjI2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDYyNlQwMTEzMjBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jOTk2OWUyMjE1ZWFlYWNkYzZjMDM2NWE1MzYwMjI4OTQxZTVhNTRmOGIyMWM0OWYxNmY4NjI3MjM5ODZhYzQzJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.eGyA0yp1U4DFFP4kqsAbAx7rc-fwAVL59FQzlIojYKg)
![client_java_logs](https://private-user-images.githubusercontent.com/171339258/335624429-ba50ef54-4c53-40ae-8f18-77f7cc214131.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkzNjQ3MDAsIm5iZiI6MTcxOTM2NDQwMCwicGF0aCI6Ii8xNzEzMzkyNTgvMzM1NjI0NDI5LWJhNTBlZjU0LTRjNTMtNDBhZS04ZjE4LTc3ZjdjYzIxNDEzMS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjI2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDYyNlQwMTEzMjBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT05NGJkZWE0ZmQ3NTlmZWM1NTk3MDczYjc3ODM1NjM5ODkzYWE2ZDQ5MjE0YTEwM2Q5ZDRkMzVjYzg4MTU4OTZjJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.g2OfG0TN7I0DmYVJSNyP3mkcJeNPxPHsDCTR7IWJZ4M)
![sentinel_logs](https://private-user-images.githubusercontent.com/171339258/335624434-aecf5d68-93c0-4baf-9f5f-4a03dda327e3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkzNjQ3MDAsIm5iZiI6MTcxOTM2NDQwMCwicGF0aCI6Ii8xNzEzMzkyNTgvMzM1NjI0NDM0LWFlY2Y1ZDY4LTkzYzAtNGJhZi05ZjVmLTRhMDNkZGEzMjdlMy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjI2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDYyNlQwMTEzMjBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0yNzY2YzQ4OGNjZjI4NjY3OGZiNTBiMzVkYmRkM2JjNGVjYjljMWFhNzAyZDczYjE3MGI0ZjJhZWM4YjYwY2Y1JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.IIDrXRgozXTIqqfg7VWyezKC-6eI3eCWDcbc0bhbyis)
The text was updated successfully, but these errors were encountered: