Code Monkey home page Code Monkey logo

Comments (11)

aembke avatar aembke commented on July 19, 2024 1

@tsukit This should be fixed in 4.3.1. Apologize on the delay but the switch to CircleCI took longer than expected.

from fred.rs.

tsukit avatar tsukit commented on July 19, 2024 1

@tsukit This should be fixed in 4.3.1. Apologize on the delay but the switch to CircleCI took longer than expected.

Thank you so much! Appreciate it.

from fred.rs.

aembke avatar aembke commented on July 19, 2024

Hi @tsukit,

At the moment there isn't an easy way to do that, but I'll add a new feature to support that.

from fred.rs.

tsukit avatar tsukit commented on July 19, 2024

Thank you so much @aembke . Look forward to the enhancement.

from fred.rs.

aembke avatar aembke commented on July 19, 2024

@tsukit this should go up to crates.io today in 4.3.0 (#19).

normally this would be a breaking change because it modifies the ServerConfig enum, but I put it behind a feature flag since I'm already in the middle the next major release.

from fred.rs.

aembke avatar aembke commented on July 19, 2024

This is now on crates.io in 4.3.0. Let me know if you encounter any issues or if it doesn't help with your use case.

from fred.rs.

tsukit avatar tsukit commented on July 19, 2024

this is so awesome! Will give it a try soon.

from fred.rs.

tsukit avatar tsukit commented on July 19, 2024

@aembke I just gave it a try. The code compiled but it doesn't seem to pick up the password given in the sentinel configuration. Here's how my code looks like.

    let config = RedisConfig {
        server: ServerConfig::Sentinel {
            service_name: "shard_8".into(),
            hosts: vec![
                ("127.0.0.1".into(), 27379),
                ("127.0.0.1".into(), 27380),
                ("127.0.0.1".into(), 27381),
            ],
            username: None,
            password: Some("<sentinel-password>".into())
        },
        username: None,
        password: Some("<redis-password>".into()),
        ..Default::default()
    };
    let client = RedisClient::new(config);
    client.
    let policy = ReconnectPolicy::default();
    let _ = client.connect(Some(policy));
    match client.wait_for_connect().await {
        Ok(_) => (),
        Err(e) => eprintln!("redis error: {}", e),
    }

    match client.set("my_key", 42,None, None, false).await {
        Ok(()) => (),
        Err(e) => eprintln!("set error: {}", e),
    }
    match client.get::<i32, _>("my_key").await {
        Ok(v) => println!("value = {}", v),
        Err(e) => eprintln!("get error: {}", e),
    }

With the code above, I got this error message.

redis error: Sentinel Error: Invalid auth response Error("ERR invalid password").

I'm pretty sure the passwords are correct as I manually validated it with redis-client and auth command - to both sentinel and redis nodes. I tried putting the sentinel password in the redis password config (i.e. making both the same) but still get the same error message. I presume that it might actually succeeded at sentinel level but failed when it's connecting to redis itself.

Would you be able to double check that, when connecting to sentinel, it actually uses the password in the sentinel config? Thank you so much!

from fred.rs.

aembke avatar aembke commented on July 19, 2024

Ah ok yeah I just looked and it looks like I made some incorrect assumptions about how the test coverage here worked with respect to the sentinel auth, so it's not covering the new code as I had intended. My apologies that's a bad mistake. I'll take a look at this over the weekend and get a patch out for you next week.

from fred.rs.

tsukit avatar tsukit commented on July 19, 2024

No problem and thank you!

from fred.rs.

tsukit avatar tsukit commented on July 19, 2024

@aembke do you think this change will be available this week or the next? Thank you so much for your support.

from fred.rs.

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.