skip to Main Content

I’m new to Redis.

I’ve started a Redis server on an EC2 instance and can connect using the command:

$ redis6-cli -h localhost
localhost:6379>

However, when I try to connect using the public IP address from the same machine, the connection times out:

redis6-cli -h x.x.x.x -p 6379
Could not connect to Redis at x.x.x.x:6379: Connection timed out

I’ve already allowed access to port 6379 in security group for this instance for all ip addresses.

2

Answers


  1. you can use ‘ping x.x.x.x’, successful?
    after, user ‘talnet x.x.x.x 6379’, successful?

    Login or Signup to reply.
  2. A few settings would affect this: bind and protected mode.

    Find bind in your redis.conf file and change as follows:

    bind 127.0.0.1 <your IP>
    

    if you are not using password security, you’ll have to turn off protected mode by changing:

    protected-mode yes
    

    To:

    protected-mode no
    

    Then restart redis.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search