Skip to content

Predis v1.1.5 with Redis Sentinels - No sentinel server available for autodiscovery. #658

@booooza

Description

@booooza

Describe the bug
After updating to Predis v1.1.5 we were unable to connect to Redis Sentinels (v3.2.3)

To Reproduce

$sentinels = [
    'tcp://host0:port',
    'tcp://host1:port',
    'tcp://host2:port',
];
$options = [
    'replication' => 'sentinel',
    'service' => 'myservice',
    'parameters' => [
        'password' => 'password',
        'database' => 0,
    ],
];

$client = new Predis\Client($sentinels, $options);
$client->set('foo', 'bar');
$value = $client->get('foo');

Gives us No sentinel server available for autodiscovery. After reverting to Predis v1.1.4 everything is working again.
Using tcp://host0:port?password=secret without using the password in global parameters client option does not work on our Redis server: Predis\Connection\ConnectionException: AUTH failed: ERR unknown command 'AUTH'.

Versions:

  • Predis: 1.1.5
  • PHP 7.2.32
  • Redis Server 3.2.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions