【问题标题】:DocumentDB Emulator as a Windows ServiceDocumentDB 模拟器作为 Windows 服务
【发布时间】:2017-10-09 22:07:39
【问题描述】:

我正在尝试使用 sc 实用程序在不同于它尝试使用的默认端口 8081 的端口上将 DocumentDB Emulator 作为 Windows 服务运行。

sc create DocumentDBEmulatorService binPath= "path\to\exe\DocumentDB.Emulator.exe /port=8082" start= auto

服务被创建并且无法启动并出现以下错误消息

DocumentDBEmulatorService 服务因以下错误无法启动。DocumentDBEmulatorService 未及时响应启动或控制请求。 等待 DocumentDBEmulatorService 服务连接时超时(30000 毫秒)。

是否可以将可执行文件数据库模拟器作为服务运行,或者我是否正在尝试一些显然不可能的事情?

【问题讨论】:

  • DocumentDB Emulator 它似乎是我们熟悉 azure documentdb 使用的,我们可以在本地进行一些测试,无需任何费用。在我看来,它可能无法作为 Window Service 安装。

标签: azure azure-cosmosdb


【解决方案1】:

sc 只会运行一个可执行文件,它是一个适当的 Windows 服务(即实现 ServiceMain)。

您可以尝试类似NSSM 的方法。

更多选项请参见this question 中的答案(已接受的除外)。

【讨论】:

  • 我尝试使用NSSM安装documentdb Emulator,它可以安装成功但无法启动,并且无法使用命令nssm remove servicename confirm从服务列表中删除
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-05-14
  • 1970-01-01
  • 2014-09-27
  • 2013-01-31
  • 2012-01-14
相关资源
最近更新 更多