webman 不知道如何使用redis 的哨兵模式

tanhongbin

问题描述

直接连接哨兵的ip和端口加上密码 启动报错连接不上
RuntimeException: ERR unknown command ZREVRANGEBYSCORE, with args beginning with: {redis-queue}-delayed, 1706664021, -inf, LIMIT, 0, 128, in E:\phpstudy_pro\WWW\api_process\vendor\workerman\redis-queue\src\Client.php:177
Stack trace:

0 E:\phpstudy_pro\WWW\api_process\vendor\workerman\redis\src\Client.php(422): Workerman\RedisQueue\Client->Workerman\RedisQueue{closure}(false, Object(Workerman\Redis\Client))

1 E:\phpstudy_pro\WWW\api_process\vendor\workerman\workerman\Connection\TcpConnection.php(646): Workerman\Redis\Client->Workerman\Redis{closure}(Object(Workerman\Connection\AsyncTcpConnection), Array)

2 E:\phpstudy_pro\WWW\api_process\vendor\workerman\workerman\Events\Select.php(311): Workerman\Connection\TcpConnection->baseRead(Resource id #326)

3 E:\phpstudy_pro\WWW\api_process\vendor\workerman\workerman\Worker.php(1479): Workerman\Events\Select->loop()

4 E:\phpstudy_pro\WWW\api_process\vendor\workerman\workerman\Worker.php(1399): Workerman\Worker::forkWorkersForWindows()

5 E:\phpstudy_pro\WWW\api_process\vendor\workerman\workerman\Worker.php(560): Workerman\Worker::forkWorkers()

6 E:\phpstudy_pro\WWW\api_process\runtime\windows\start_plugin.webman.redis-queue.aim_add_ressing_address.php(23): Workerman\Worker::runAll()

7 {main}

为此你搜索到了哪些方案及不适用的原因

难道只能连接主机嘛?

820 1 0
1个回答

walkor 打赏

redis队列不支持哨兵模式

  • tanhongbin 2024-01-31

    好的,老大,我看源码了redis队列的确不支持,redis缓存是支持的

  • tanhongbin 2024-01-31

    老大,webman redis哨兵怎么配置呀

  • walkor 2024-02-01

    应该不用做什么特殊配制,如果不行看下 symfony/cache 文档或者网上找下 symfony/cache的文章

  • tanhongbin 2024-02-02

    好的,老大

  • yemaozi999 2024-07-12

    兄弟, redis缓存怎么使用哨兵模式

  • tanhongbin 2024-07-12

    参照laravel 配置即可 ,队列是不支持的

  • yemaozi999 2024-07-12

    return [
    'default' => [
    'host' => '127.0.0.1',
    'password' => null,
    'port' => 6379,
    'database' => 0,
    ],
    'consume' => [
    'host' => '127.0.0.1',
    'password' => null,
    'port' => 6379,
    'database' => 1,
    ],

    'sbredis'=>[
        'tcp://120.78.149.146:26379',
        'tcp://47.106.70.241:26379',
        'options'=>[
            'replication' => 'sentinel',
            'service'     => 'testmaster',    //sentinel
            'parameters'  => [
                'password' => 'ymyx123',    //redis的密码,没有时写null
                'database' => 10,
            ],
        ]
    ]

    ]; 我试了 不太行.. 你配置能给我参考一下吗

  • tanhongbin 2024-07-15

    我记得当时测试了一下是可以的 我也没配置

×
🔝