Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not connect to Redis at 127.0.0.1:6379: Connection refused #457

Closed
mapreferee opened this issue Apr 14, 2012 · 3 comments
Closed

Could not connect to Redis at 127.0.0.1:6379: Connection refused #457

mapreferee opened this issue Apr 14, 2012 · 3 comments

Comments

@mapreferee
Copy link

Hi Redis Core Team,

In order to feel the power of redis, I have already set up a security group with the port 6379 in amazon ec2.

Under the redis-stable/src directory in my ec2 instance via either putty.exe or nxclient, I have tried to start the redis console by using redis-cli , redis-cli -p 3000 -h my ip address, redis-cli -p 6379 -h my ip address, redis-cli -p 80 -h 127.0.0.1 , redis-cli -p 3000 -h 127.0.0.1 and redis-cli -p 6379 -h 127.0.0.1 , redis-cli -p 3000 and redis-cli -p 6379...

But all in vain. All I got is the message below:
Could not connect to Redis at 127.0.0.1:6379: Connection refused
not connected>

And when I use redis-cli -p 80 -h my ip address and redis-cli -p 80,
I can log in, but when I type "ping" to see if it works or not. I got the message below:
Error: Protocol error, got "<" as reply type byte

Kindly wonder what I have done wrong. Any help appreciated here please. Thanks.

@mapreferee
Copy link
Author

Refer to https://github.com/antirez/redis, I found that I need to start a redis-server instance first by typing redis-server before typing redis-cli in ANOTHER terminal.

Playing with Redis


You can use redis-cli to play with Redis. Start a redis-server instance,
then in another terminal try the following:

% cd src
% ./redis-cli
redis> ping
PONG
redis> set foo bar
OK
redis> get foo
"bar"
redis> incr mycounter
(integer) 1
redis> incr mycounter
(integer) 2
redis> 

@nevergrind
Copy link

Great. But what about on Windows?

@mgravell
Copy link

@maelfyn can you be more specific about the question? What do you mean, in terms of the conversation you have resurrected? The conclusion there was: start a redis server before you try to connect to it as a client. That applies equally on Windows. Note that the primary redis project doesn't target windows, but there are a number of ways of using redis on Windows (I do this regularly).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants