Connectivity Troubleshooting

I'm trying to connect to my Redis instance using `redis-cli`, but I keep getting: "Could not connect to Redis at 127.0.0.1:6379: Connection refused"

This error tells us that you're trying to connect to a local (127.0.0.1) Redis instance on port 6379, but there isn't a server listening there.

If you're trying to test against a local Redis server, the problem is probably just that you haven't started the server yet. Running `redis-server` in a dedicated terminal window will start a local test server.

If you're trying to connect to a remote server like RedisGreen, you'll need to specify the complete address of your server, like this:

redis-cli -h spiderman.redisgreen.net -p 5033 -a ABCDEFG

This says: "connect to host 'spiderman.redisgreen.net', on port '5033', with password 'ABCDEFG'." If you're using RedisGreen, you can copy and paste the full `redis-cli` invocation line by clicking the *Connect* button on your dashboard. If you use RedisGreen through Heroku, you can also access the CLI directly by installing the Heroku Redisgreen plugin.


Explore Your Redis Memory Usage with an Interactive Map

RedisMonitor from RedisGreen shows you large keys, memory leaks, old keys, and other potential problems quickly. Try it now, no credit card required!

← Back to docs