【问题标题】:Lumen Redis queue connection error. Error while reading line from the server. [tcp://xxxxxx:25061]Lumen Redis 队列连接错误。从服务器读取行时出错。 [tcp://xxxxxx:25061]
【发布时间】:2021-10-24 18:00:21
【问题描述】:

我正在尝试在 Lumen 8.0 中使用 redis 作为 QUEUE_CONNECTION。

如果我使用本地服务器 [127.0.0.1:6379] 的 redis,那么它工作正常。 但我想使用 Digital Ocean 的外部 redis 服务器。

这是我在config/queue.php中的配置

'redis' => [
   'driver' => 'redis',
   'connection' => env('QUEUE_REDIS_CONNECTION', 'default'),
   'queue' => 'default',
   'retry_after' => 90,
   'block_for' => null,
   'read_write_timeout' => -1,
]

但我收到此错误:

我已经安装了这些包:

"predis/predis": "^1.1",
"aws/aws-sdk-php": "~3.0",
"illuminate/redis": "^8.25"

同样在.env文件中这样配置:

REDIS_CLIENT=predis
REDIS_HOST="this.is.my.redis.server.ondigitalocean.com"
REDIS_PASSWORD=xxxxxxxx
REDIS_PORT=25061
REDIS_SCHEME=tls

我还有什么遗漏吗?

【问题讨论】:

    标签: php laravel redis queue lumen


    【解决方案1】:

    确保该端口在 Droplet 的防火墙上是允许的。

    【讨论】:

      猜你喜欢
      • 2016-02-09
      • 1970-01-01
      • 2020-05-01
      • 2020-10-17
      • 2011-06-06
      • 2018-07-20
      • 2020-11-27
      • 2022-11-22
      • 2013-08-07
      相关资源
      最近更新 更多