Comments (19)
After applying the settings, I confirmed that the error has not occurred for about three weeks
from redisson.
config.setAddressResolverGroupFactory(new SequentialDnsAddressResolverFactory(1));
@namsic6460
at this line config.setAddressResolverGroupFactory(new SequentialDnsAddressResolverFactory(1));
i am getting an error, this new SequentialDnsAddressResolverFactory(1), where are you importing this from ? is there any library you added for this or created a class or what , because this new SequentialDnsAddressResolverFactory(1) is giving me not specified.
please Help!
from redisson.
@musicallyvk Class is defined in redisson
from redisson.
It's better to update version
from redisson.
It happens due to network or DNS servers query amount limitations.
Did you try to define SequentialDnsAddressResolverFactory with concurrencyLevel = 1
Yaml config example:
singleServerConfig:
address: "redis://xxx:xxx"
addressResolverGroupFactory: !<org.redisson.connection.SequentialDnsAddressResolverFactory> 1
from redisson.
If the limit on DNS query counts is the issue, then this could be a fundamental solution.
I will try with the above settings and let you know!
from redisson.
Hi,
thanks for replying again,
firstly it is using replicatedServersConfig .
secondly on AWS it is only using primary endpoint and reader endpoint ( it has 4 nodes with 1 primary and 3 replica, also i do not know if this info helps you ), Configuration endpoint
colum is empty on aws redis cache cluster.
so what do you suggest , what should i change.
from redisson.
addressResolverGroupFactory
setting is applied to all Redis configurations.
replicatedServersConfig:
...
addressResolverGroupFactory: !<org.redisson.connection.SequentialDnsAddressResolverFactory> 1
from redisson.
value for addressResolverGroupFactory : will remain the same which is given below or do i have to change it according to my code ?
!<org.redisson.connection.SequentialDnsAddressResolverFactory> 1
from redisson.
yes, just define addressResolverGroupFactory as I suggested
from redisson.
Hey @mrniko
Hope You are having a good time,
just wanted to ask , i am using .properties file , and i am not sure if it will take 1 as a value,
my .properties file will look like below
"addressResolverGroupFactory" : "!<org.redisson.connection.SequentialDnsAddressResolverFactory>"
what to do with this 1.
will this cause any error issue, or is it fine if i write 1 also inside inverted commas in the value part ?
thanks a Ton!
from redisson.
Hi. Redisson doesn't support properties file. Yaml only
from redisson.
@musicallyvk Below is a part of my code. After applying this setting, the error mentioned occurred only once in about two months. I hope this helps.
private final RedisProperties redisProperties;
@Bean
public RedissonClient redissonClient() {
String prefix = "redis";
if (BooleanUtils.isTrue(this.redisProperties.getSsl())) {
prefix += "s";
}
Config config = new Config();
config.setAddressResolverGroupFactory(new SequentialDnsAddressResolverFactory(1));
config.useSingleServer()
.setAddress(prefix + "://" + this.redisProperties.getHost() + ":" + this.redisProperties.getPort())
.setPassword(this.redisProperties.getPassword())
.setDatabase(this.redisProperties.getDatabase());
return Redisson.create(config);
}
from redisson.
Hi. Redisson doesn't support properties file. Yaml only
as per your reply, my project is using .properties files only for redission, and it is working
from redisson.
@musicallyvk Below is a part of my code. After applying this setting, the error mentioned occurred only once in about two months. I hope this helps.
private final RedisProperties redisProperties; @Bean public RedissonClient redissonClient() { String prefix = "redis"; if (BooleanUtils.isTrue(this.redisProperties.getSsl())) { prefix += "s"; } Config config = new Config(); config.setAddressResolverGroupFactory(new SequentialDnsAddressResolverFactory(1)); config.useSingleServer() .setAddress(prefix + "://" + this.redisProperties.getHost() + ":" + this.redisProperties.getPort()) .setPassword(this.redisProperties.getPassword()) .setDatabase(this.redisProperties.getDatabase()); return Redisson.create(config); }
Hi @namsic6460 Thank You Very Much For Replying . i am using replicated server config and also i am using .properties file and yaml both files are there, i do not understand because @mrniko said that redission only uses yaml.
I am very new to this , can you please help @namsic6460 as it is already working for you.
also i need the config or yaml file of yours if you dont mind please.
or else i have already shared my config file above somewhere already, please check that what is wrong in this.
thak you very much
from redisson.
@musicallyvk
I did not use .yml or .properties files for these settings. The code I posted is all there is, and it is configured through a bean.
from redisson.
Hi @namsic6460 Thanks Man, i think My Redisson version does not have this class
so do i need to update redisson or can i add something else here like DnsAddressResolverGroupFactory or RoundRobinDnsAddressResolverGroupFactory
from redisson.
SequentialDnsAddressResolverFactory
shall i change it to the latest version which is 3.30.0. or to some specific version,
i am little afraid because my project is so huge , i wonder if it impacts any other stuff.
but still what version would be better guys?
from redisson.
@musicallyvk
It is generally advisable to use the latest version. Of course, there will be many changes to review, but the initial verification is the responsibility of the developers of this project, and the final verification is up to you. Since it's open-source project
from redisson.
Related Issues (20)
- Configure Redis to authentication using IAM authentication in a Quarkus application HOT 8
- How to get delayed queue on the reactive client
- Why RedisClient.addr.hostName returns IP, not a hostName?
- fix wiki 14. Integration with frameworks (markdown)
- Locks not working with NameMapper HOT 9
- Is it possible to configure Redisson to connect to only _some_ Redis instances (in sentinel mode) HOT 5
- graalvm: java.lang.NullPointerException HOT 2
- "Unable to connect" to Sentinel Redis HOT 5
- RMultimapCacheReactive returns Rx Single instead of Reactor Mono HOT 1
- Will fencedLock be added to the redisson-spring-boot-starter module? HOT 3
- Observing "Unable to send PING command over channel" even after upgrading the redisson to 3.26.1 HOT 13
- How to configure failedSlaveNodeDetector with org.redisson.client.FailedCommandsTimeoutDetector in yaml? HOT 1
- Add redisson-spring parent module
- org.redisson.client.WriteRedisConnectionException: Unable to write command into connection! Check CPU usage of the JVM. Try to increase nettyThreads setting. HOT 1
- What's the difference of LocalCachedMap between open source version and pro version? HOT 3
- Redisson client failed to successfully reconnect, After the Redis service went down and then recovered HOT 2
- Transaction was discarded due to timeout 5000 milliseconds
- redisson-spring-data-27 raise NoSuchMethodError under jdk1.8 HOT 1
- LocalCacheView.toCacheKey Method Optimization HOT 1
- Support for RBatch.getMap variants that accept MapOptions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redisson.