【问题标题】:Socket.io-redis gives error when added as adapter to Socket.io instanceSocket.io-redis 作为适配器添加到 Socket.io 实例时出错
【发布时间】:2020-06-18 14:57:26
【问题描述】:

我正在尝试使用 Socket.io 和 Socket.Io-redis。 我已经启动并运行了我的 Redis 服务器。 启动 Socket.Io 服务器时出现的错误是: 回复错误:ERR 未知命令 'pubsub' 我完全不知道为什么会出现这个错误。

我使用的 Redis 版本是 2.4.5

io.adapter(redisIO({host: 'localhost', port: 6379}));
io.of('/').adapter.clients((err, clients) => {
            if(err){
                console.log('error!!')
                throw err;
            }

【问题讨论】:

    标签: node.js redis windows-10 node-cluster socket.io-redis


    【解决方案1】:

    我通过安装最新版本的 Redis 来修复它! :)

    【讨论】:

      猜你喜欢
      • 2021-03-13
      • 2021-06-04
      • 2014-09-25
      • 2012-10-23
      • 1970-01-01
      • 2015-08-17
      • 2013-05-30
      • 2016-11-11
      • 1970-01-01
      相关资源
      最近更新 更多