Git Product home page Git Product logo

Comments (19)

namsic6460 avatar namsic6460 commented on September 25, 2024 2

After applying the settings, I confirmed that the error has not occurred for about three weeks

from redisson.

musicallyvk avatar musicallyvk commented on September 25, 2024 1

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.

namsic6460 avatar namsic6460 commented on September 25, 2024 1

@musicallyvk Class is defined in redisson

public class SequentialDnsAddressResolverFactory implements AddressResolverGroupFactory {

from redisson.

mrniko avatar mrniko commented on September 25, 2024 1

@musicallyvk

It's better to update version

from redisson.

mrniko avatar mrniko commented on September 25, 2024

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.

namsic6460 avatar namsic6460 commented on September 25, 2024

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.

musicallyvk avatar musicallyvk commented on September 25, 2024

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.

mrniko avatar mrniko commented on September 25, 2024

@musicallyvk

addressResolverGroupFactory setting is applied to all Redis configurations.

replicatedServersConfig:
  ...
addressResolverGroupFactory: !<org.redisson.connection.SequentialDnsAddressResolverFactory> 1

from redisson.

musicallyvk avatar musicallyvk commented on September 25, 2024

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.

mrniko avatar mrniko commented on September 25, 2024

yes, just define addressResolverGroupFactory as I suggested

from redisson.

musicallyvk avatar musicallyvk commented on September 25, 2024

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.

mrniko avatar mrniko commented on September 25, 2024

@musicallyvk

Hi. Redisson doesn't support properties file. Yaml only

from redisson.

namsic6460 avatar namsic6460 commented on September 25, 2024

@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.

musicallyvk avatar musicallyvk commented on September 25, 2024

@musicallyvk

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 avatar musicallyvk commented on September 25, 2024

@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.

namsic6460 avatar namsic6460 commented on September 25, 2024

@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.

musicallyvk avatar musicallyvk commented on September 25, 2024

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.

musicallyvk avatar musicallyvk commented on September 25, 2024

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.

namsic6460 avatar namsic6460 commented on September 25, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.