6

I have installed Ubuntu Bash on Windows 10 PC. After that installed Redis using apt-get install command I could connect to redis using redis-cli command the info showed details

# Server
redis_version:2.8.4
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:a44a05d76f06a5d9
redis_mode:standalone

After that I created a replica I could connect to that also

Post that I started the Sentinel using the default configuration file that get installed from /etc/redis/ folder.

The command I used to start redis is sudo redis-server /etc/redis/sentinel1.conf --sentinel

But if I try to connect using redis-cli -p 26379 command I get this error

laptop:~$ redis-cli -p 26379
Could not connect to Redis at 127.0.0.1:26379: Connection refused
not connected>

I checked the sentinel.conf file there the port specified is 26379

I even tried starting sentinel with redis-sentinel /path/to/sentinel.conf But same error.

The same setup works fine on Ubuntu running on Virtual Machine

Edit

I am running Ubuntu on WIndows 10 Bash So the netstat -tunlpa command shows this

vipresh@VIPRESHJH:/etc/redis$ sudo netstat -tunlpa
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name

And the ps aux| grep redis command output is this

vipresh@VIPRESHJH:/etc/redis$ ps aux| grep redis
redis       24  0.0  0.0      0     0 ?        Ssl   2432   0:00 /usr/bin/redis-server 127.0.0.1:6379
root        57  0.0  0.0      0     0 ?        Ssl   2432   0:00 redis-server *:26379
vipresh     61  0.0  0.0      0     0 ?        S     2432   0:00 grep --color=auto redis

It shows Sentinel is running on Port 26379

Re Captcha
  • 3,125
  • 2
  • 22
  • 34
Vipresh
  • 1,250
  • 15
  • 31

1 Answers1

0

Check if the service is listening

# netstat -tunlpa | grep redis
tcp        0      0 0.0.0.0:6379        0.0.0.0:*         LISTEN      xxxx
0/redis-server 
YakovL
  • 7,557
  • 12
  • 62
  • 102
Vijay
  • 56
  • 3
  • @Vijay I am running Ubuntu on WIndows 10 Bash So the netstat -tunlpa command shows this ` vipresh@VIPRESHJH:/etc/redis$ ps aux| grep redis redis 24 0.0 0.0 0 0 ? Ssl 2432 0:00 /usr/bin/redis-server 127.0.0.1:6379 root 57 0.0 0.0 0 0 ? Ssl 2432 0:00 redis-server *:26379 vipresh 61 0.0 0.0 0 0 ? S 2432 0:00 grep --color=auto redis ` It shows Sentinel is running on Port 26379 – Vipresh Sep 30 '16 at 10:39
  • Tried your same exact steps on Ubuntu 16.04.1 and works as expected. But I am not sure how this is behaving differently on windows. ~# netstat -tunlpa |grep redis tcp 0 0 0.0.0.0:26379 0.0.0.0:* LISTEN 3826/redis-server * tcp 0 0 127.0.0.1:6379 0.0.0.0:* LISTEN 3683/redis-server 1 # redis-cli -p 26379 127.0.0.1:26379> I suspect something with the bind address. Give a try with the IP ( -h) – Vijay Sep 30 '16 at 20:55