简体   繁体   中英

Socket.io-redis gives error when added as adapter to Socket.io instance

Im experimenting abit with Socket.io and Socket.Io-redis. I have my Redis server up and running. The error i get when starting the Socket.Io server is: ReplyError: ERR unknown command 'pubsub' I dont know why i get this error at all.

The Redis version i'm using is 2.4.5

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

I fixed it by installing latest version of Redis! :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM