On Windows Server 2019, under WSL I ran by mistake redis-server
a 2nd time, and it didn't report a failure in binding the listening socket. Here's the output of netstat
:
C:\Users\Administrator>netstat -ano | grep 6379 | grep LISTEN
TCP 0.0.0.0:6379 0.0.0.0:0 LISTENING 11080
TCP 127.0.0.1:6379 0.0.0.0:0 LISTENING 13292
TCP [::]:6379 [::]:0 LISTENING 11080
TCP [::1]:6379 [::]:0 LISTENING 13292
Two questions:
- How is that even possible?
- How can I select which instance to connect to using
redis-cli
?
Thanks.
EDIT
I ran it a 3rd time just to check, and here's the netstat
output:
C:\Users\Administrator>netstat -ano | grep 6379 | grep LISTEN
TCP 0.0.0.0:6379 0.0.0.0:0 LISTENING 13916
TCP 0.0.0.0:6379 0.0.0.0:0 LISTENING 11080
TCP 127.0.0.1:6379 0.0.0.0:0 LISTENING 13292
TCP [::]:6379 [::]:0 LISTENING 11080
TCP [::]:6379 [::]:0 LISTENING 13916
TCP [::1]:6379 [::]:0 LISTENING 13292
netstat
's-o
argument to see the Process IDs