Installing Redis Sentinel As Windows Service

3,375 views
Skip to first unread message

Rushdeep Singh

unread,
Jul 14, 2014, 2:38:52 PM7/14/14
to redi...@googlegroups.com
I want to automate the installation of redis as windows service and also for sentinel.

I found out that redis can now be installed as windows service using this command ---> redis-server --service-install –service-name redisService1 –port 10001

what I am really after is, that is there a command to install redis sentinel as a windows service ? the reason is that I dont want to run command prompts on my production servers. more over windows services are much better than running user tasks (in this case) running sentinel as part of command prompts.

Jonathan Pickett

unread,
Jul 15, 2014, 1:30:30 AM7/15/14
to redi...@googlegroups.com
Hi Rushdeep,

Everything other than the --service-install and --service-name arguments are passed to the instance of Redis that is launched as a service. You could use the following command line to install a sentinel instance as a service:
 
    redis-server --service-install --service-name Sentinel1 sentinel.1.conf --sentinel

In this case the arguments passed to the service instance will be "sentinel.1.conf --sentinel".

-- Jonathan (MSOPENTECH)

abhijit damle

unread,
Jun 11, 2015, 1:33:43 AM6/11/15
to redi...@googlegroups.com
Hi Jonathan,

               I am using MSOPENTECH Redis with 1 master and 2 slaves on windows 2012 server machines. On each machine I run redis-server.exe as Windows service as Redis server and as sentinel. if there is problem with master I can see one of the slave being promoted as master. Any idea how my application will come to know of this switch over? I am using Servicestack.redis c# client api. Previously I was using solution mentioned on this link <<http://www.codedisqus.com/CJVkUPeVgU/getting-redis-master-address-from-sentinel-c.html>> but it has stopped working. Any code sample would be helpful.

Yatin Likhite

unread,
Oct 23, 2015, 9:52:36 AM10/23/15
to Redis DB
Hello Jonathan,

I tried the above command mentioned by you:

redis-server --service-install --service-name Sentinel1 sentinel.1.conf --sentinel

Though, it keeps on throwing error: "Invalid argument during startup: unknown conf file parameter :"

Not sure what needs to be done to install Sentinel for Windows Redis. and the essential settings to be kept under sentinel.1.conf. Could you please elaborate on the same.

Thanks,
Yatin Likhite

newgu...@gmail.com

unread,
Dec 10, 2015, 7:07:47 AM12/10/15
to Redis DB
I'm new to Redis, I'm trying configure Redis environment for high-availablity as below,

Machine 1 : Redis Master & a Sentinel (monitoring Redis master)
Machine 2 : Redis Slave & a Sentinel (monitoring Redis master)
Machine 3 : Redis Slave & a Sentinel (monitoring Redis master)

From application client (StackExchange.Redis), I'm able to connect Redis Master with below config

<redisCacheClient allowAdmin="true" ssl="false" connectTimeout="5000" database="0">
<hosts>
<add host="<Machine 1_IP>" cachePort="6379" />
</hosts>

Now, When my Machine 1 goes down, Sentinels switches the master to either Machine 2 or Machine 3.

1. How will my Application client know that Redis master has been switched?
2. Should I provide all Redis-server IP in Application client's app.config section? 

Please advise.

Thanks.
Reply all
Reply to author
Forward
0 new messages