Multiple ports on localhost



I’m trying to create a redis client inside my workspace, and I do not get it, I’ve tried it on multiple ports:

events.js: 160
       throw er; // Unhandled 'error' event

Error: Redis connection to localhost: 9000 failed - connect ECONNREFUSED
     at Object.exports._errnoException (util.js: 1020: 11)
     at exports._exceptionWithHostPort (util.js: 1043: 20)
     at TCPConnectWrap.afterConnect [as oncomplete] (net.js: 1086: 14)

I already have a redis client active on localhost, I do not know if it is possible, but I wonder, would I need to create multiple clients using ports connected in localhost, Is it possible or am I trying something not allowed?


Do you have the Redis server on localhost listening to port 9000 that you are trying to connect to?


I have a redis server on port 6379, can I connect multiple clients on that same port?


This error messages shows that you are trying to connect to port 9000 not 6379, so you will need to correct that first.

Depending on your Redis server configuration, you can connect multiple clients. Take a look at the Redis configuration documentation for more information on configuring your Redis server.