question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Set Redisson config using AWS ElastiCache as Clustered Mode

See original GitHub issue

Hey there!

What is the proper way to configure Redisson when you have a AWS ElastiCache Redis running as Clustered Mode? I have tried to set using it as follows:

    val nodeAddress = "redis://test-rest-encryption-0001-001.p0vefj.0001.use1.cache.amazonaws.com:6379" 
    val config = Config()
    val configCluster = config.useClusterServers().addNodeAddress(nodeAddress)
    val client = Redisson.create(config)

Node endpoint: test-rest-encryption-0001-001.p0vefj.0001.use1.cache.amazonaws.com Configuration endpoint: test-rest-encryption.p0vefj.clustercfg.use1.cache.amazonaws.com

For nodeAddress, I have tried to use configuration endpoint and node endpoint but fails in both case (connection timed out):

21:04:39.542 [main] WARN  o.r.cluster.ClusterConnectionManager - connection timed out: test-rest-encryption-0001-001.p0vefj.0001.use1.cache.amazonaws.com/172.31.19.41:6379
Exception in thread "main" org.redisson.client.RedisConnectionException: Can't connect to servers!
	at org.redisson.cluster.ClusterConnectionManager.<init>(ClusterConnectionManager.java:144)
	at org.redisson.config.ConfigSupport.createConnectionManager(ConfigSupport.java:237)
	at org.redisson.Redisson.<init>(Redisson.java:117)
	at org.redisson.Redisson.create(Redisson.java:156)
	at aus.web.SessionManagerApplicationKt.main(SessionManagerApplication.kt:23)
Caused by: io.netty.channel.ConnectTimeoutException: connection timed out: test-rest-encryption-0001-001.p0vefj.0001.use1.cache.amazonaws.com/172.31.19.41:6379
	at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe$1.run(AbstractNioChannel.java:261)
	at io.netty.util.concurrent.PromiseTask.runTask(PromiseTask.java:98)
	at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:170)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:834)

Am I missing something?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
daviddeluccacommented, Jul 3, 2020

Solved! It was the prefix!

0reactions
mrnikocommented, Jul 3, 2020

use rediss:// prefix for SSL connection. And select latest Redisson version for new projects.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to work with Cluster Mode on Amazon ElastiCache for ...
Under “Advanced Redis settings,” we can control the distribution of the key space in our cluster. By default, ElastiCache will equally ...
Read more >
Redis Java client for AWS ElastiCache - Redisson
Amazon ElastiCache is capable of working with two caching systems: Redis and ... AWS Elasticache Cluster config Config config = new Config(); config....
Read more >
How do I configure Redisson to read from Elasticache slave ...
I'm using Redisson ( redisson-all-3.5.5.jar )to connect to AWS Elasticache running in Cluster mode disabled. The cluster has 1 primary and 2 ...
Read more >
A Guide to Redis with Redisson - Baeldung
Redisson supports Amazon Web Services (AWS) ElastiCache Cluster and ... Here, we use its setAddress method to configure the address setting.
Read more >
mrniko/redisson - Gitter
@mrniko We are using Elasticache Redis in cluster mode with 3 shards. For the configuration, we are providing the node addresses of the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found