Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve: add the node ip and port for cluster exception #3470

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

yangbodong22011
Copy link
Collaborator

@yangbodong22011 yangbodong22011 commented Jun 16, 2023

fixes #3466

before:

redis.clients.jedis.exceptions.JedisClusterOperationException: No more cluster attempts left.
	at redis.clients.jedis.executors.ClusterCommandExecutor.executeCommand(ClusterCommandExecutor.java:129)
	at redis.clients.jedis.UnifiedJedis.executeCommand(UnifiedJedis.java:183)
	at redis.clients.jedis.UnifiedJedis.set(UnifiedJedis.java:651)
	at redis.clients.jedis.fanche.JedisClusterTest.main(JedisClusterTest.java:50)
	Suppressed: redis.clients.jedis.exceptions.JedisConnectionException: Failed to connect to any host resolved for DNS name.
		at redis.clients.jedis.DefaultJedisSocketFactory.connectToFirstSuccessfulHost(DefaultJedisSocketFactory.java:63)
		at redis.clients.jedis.DefaultJedisSocketFactory.createSocket(DefaultJedisSocketFactory.java:87)
		at redis.clients.jedis.Connection.connect(Connection.java:188)
		at redis.clients.jedis.Connection.initializeFromClientConfig(Connection.java:357)
		at redis.clients.jedis.Connection.<init>(Connection.java:61)
		at redis.clients.jedis.ConnectionFactory.makeObject(ConnectionFactory.java:68)
		at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:571)
		at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:298)
		at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:223)
		at redis.clients.jedis.util.Pool.getResource(Pool.java:38)
		at redis.clients.jedis.ConnectionPool.getResource(ConnectionPool.java:29)
		at redis.clients.jedis.providers.ClusterConnectionProvider.getConnectionFromSlot(ClusterConnectionProvider.java:134)
		at redis.clients.jedis.providers.ClusterConnectionProvider.getConnection(ClusterConnectionProvider.java:90)
		at redis.clients.jedis.executors.ClusterCommandExecutor.executeCommand(ClusterCommandExecutor.java:91)
		... 3 more

after:

redis.clients.jedis.exceptions.JedisClusterOperationException: No more cluster attempts left.
	at redis.clients.jedis.executors.ClusterCommandExecutor.executeCommand(ClusterCommandExecutor.java:132)
	at redis.clients.jedis.UnifiedJedis.executeCommand(UnifiedJedis.java:183)
	at redis.clients.jedis.UnifiedJedis.set(UnifiedJedis.java:651)
	at redis.clients.jedis.fanche.JedisClusterTest.main(JedisClusterTest.java:50)
	Suppressed: redis.clients.jedis.exceptions.JedisConnectionException: Cluster retry failed to 127.0.0.1:30003
		at redis.clients.jedis.executors.ClusterCommandExecutor.executeCommand(ClusterCommandExecutor.java:100)
		... 3 more
	Caused by: redis.clients.jedis.exceptions.JedisConnectionException: Unexpected end of stream.
		at redis.clients.jedis.util.RedisInputStream.ensureFill(RedisInputStream.java:205)
		at redis.clients.jedis.util.RedisInputStream.readByte(RedisInputStream.java:46)
		at redis.clients.jedis.Protocol.process(Protocol.java:126)
		at redis.clients.jedis.Protocol.read(Protocol.java:192)
		at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:335)
		at redis.clients.jedis.Connection.getOne(Connection.java:317)
		at redis.clients.jedis.Connection.executeCommand(Connection.java:131)
		at redis.clients.jedis.executors.ClusterCommandExecutor.execute(ClusterCommandExecutor.java:143)
		at redis.clients.jedis.executors.ClusterCommandExecutor.executeCommand(ClusterCommandExecutor.java:94)
		... 3 more

This PR also changed Failed to connect to any host resolved for DNS name. error refer by #3298

@yangbodong22011 yangbodong22011 force-pushed the imporve-cluster-exception-message branch from 4098aad to f955473 Compare June 16, 2023 08:08
@yangbodong22011
Copy link
Collaborator Author

yangbodong22011 commented Jun 16, 2023

seems RedisModuleTest will fail when use resp3

Error:  Tests run: 3, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 0.186 s <<< FAILURE! -- in redis.clients.jedis.modules.RedisModulesPipelineTest
Error:  redis.clients.jedis.modules.RedisModulesPipelineTest.jsonV1 -- Time elapsed: 0.056 s <<< ERROR!
java.lang.ClassCastException: java.util.ArrayList cannot be cast to [B
	at redis.clients.jedis.BuilderFactory$17.build(BuilderFactory.java:256)
	at redis.clients.jedis.BuilderFactory$17.build(BuilderFactory.java:253)
	at redis.clients.jedis.CommandObjects$JsonObjectBuilder.build(CommandObjects.java:4225)
	at redis.clients.jedis.Response.build(Response.java:[62](https://github.com/redis/jedis/actions/runs/5320541611/jobs/9635249313?pr=3470#step:15:63))
	at redis.clients.jedis.Response.get(Response.java:38)
	at redis.clients.jedis.modules.RedisModulesPipelineTest.jsonV1(RedisModulesPipelineTest.java:149)

@yangbodong22011 yangbodong22011 force-pushed the imporve-cluster-exception-message branch from 3973e6d to 9a4a9bc Compare June 20, 2023 08:55
@yangbodong22011 yangbodong22011 force-pushed the imporve-cluster-exception-message branch from 9a4a9bc to 323d37b Compare August 22, 2023 02:18
@codecov-commenter
Copy link

Codecov Report

Patch coverage: 50.00% and project coverage change: -0.01% ⚠️

Comparison is base (71204c5) 71.15% compared to head (0fcdb98) 71.15%.

❗ Current head 0fcdb98 differs from pull request most recent head 323d37b. Consider uploading reports for the commit 323d37b to get more accurate results

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3470      +/-   ##
============================================
- Coverage     71.15%   71.15%   -0.01%     
- Complexity     4763     4765       +2     
============================================
  Files           278      278              
  Lines         15014    15017       +3     
  Branches       1057     1061       +4     
============================================
+ Hits          10683    10685       +2     
+ Misses         3864     3863       -1     
- Partials        467      469       +2     
Files Changed Coverage Δ
...ents/jedis/executors/RetryableCommandExecutor.java 0.00% <0.00%> (ø)
...lients/jedis/executors/ClusterCommandExecutor.java 79.34% <75.00%> (-0.66%) ⬇️
...redis/clients/jedis/DefaultJedisSocketFactory.java 97.36% <100.00%> (+1.31%) ⬆️

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sazzad16 sazzad16 added this to the 5.2.0 milestone Nov 15, 2023
@sazzad16 sazzad16 removed this from the 5.2.0 milestone Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants