0

Computer B wants key-value from computer A. Redis-server is on computer A with ip address 192.16.0.2, port 6379. Computer B with ip address 192.16.0.3 tries to get data from computer A. I tried

redis-cli -h 192.168.0.2 -h 6379.

But there is no response. To check connection, ping 192.168.0.2 gets response within 1msec. However telnet 192.168.0.2 6379 does not get response.

How should I solve this problem?

Corion
  • 3,855
  • 1
  • 17
  • 27
ingyu koh
  • 1
  • 1

1 Answers1

2

It looks like you are using the wrong flag to specify the port.

Try using the -p flag for the port:

redis-cli -h 192.168.0.2 -p 6379
  • Looks like that's just a typo in question. Otherwise, OP will get error message such as "Could not connect to Redis at 6379:6379: Can't create socket: No route to host", not "there is no response" – shaochuancs Feb 27 '19 at 15:11