windows - 如何将 Redis Sentinel 安装为 Windows 服务?

标签 windows azure redis sentinel iaas

我正在尝试将 Redis 哨兵设置为 Azure VM (IaaS) 上的 Windows 服务。

我正在使用 Windows 版 Redis 的 MS OpenTech 端口并运行以下命令...

redis-server --service-install --service-name rdsent redis.sentinel.conf --sentinel

此命令在我的系统上安装该服务,但是当我尝试通过服务控制面板或通过以下命令启动此服务时...

redis-server --service-run --service-name rdsent redis.sentinel.conf --sentinel

然后服务无法启动并出现以下错误...

HandleServiceCommands:捕获系统错误。错误代码 = 1063,消息 = StartServiceCtrlDispatcherA 失败:未知错误

我在这里遗漏了什么吗? 请有人帮助我启动这项服务,使其正常工作。

最佳答案

我也遇到了同样的问题,我的问题与我的哨兵配置有关。我发现很多文章都有一些不正确的示例,因此在配置正确之前我的服务安装将无法工作。无论如何,您的哨兵配置至少需要以下内容(对于 Windows Redis 2.8.17):

    sentinel monitor <name of redis cache>  <server IP> <port> 2
    sentinel down-after-milliseconds <name of redis cache> 4000
    sentinel failover-timeout <name of redis cache> 180000
    sentinel parallel-syncs <name of redis cache> 1

完成该设置后,上面的原始 Redis 服务命令将起作用。

关于windows - 如何将 Redis Sentinel 安装为 Windows 服务?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27171970/

相关文章:

windows - 调用Thread.Abort时finally不执行

c# - 将 Azure Cosmos DB for Mongo-DB-API 连接字符串放入 Xamarin 应用程序中是否安全?

azure - 如何使用 json/csv 文件中的数据创建 Azure DevOps 库变量组?

redis - 使用 python-rq (redis) 在多个服务器上进行远程工作

php - 使用 Predis 使用 Laravel-5.4.32 配置 AWS ElasticCache redis Cluster-3.2.4

c# - Web 服务器上的 System.Net.Http.HttpRequestException

node.js - 无法使用 'winston' 和 's3-streamlogger' 在 aws S3 存储桶中创建日志

windows - 在系统启动时依次启动 cmd-scripts

java - Azure 函数、azureFunctionsPackage 任务因 java.lang.NullPointerException 失败

redis-cluster - 从永远挂起的远程机器向现有集群添加节点从属