Artifactory 服务未在 Windows 开始
Artifactory service not starting on Windows
我正在尝试 运行 Windows 服务器上的 Artifactory,但 Artifactory 服务无法启动。我在 Hyper-V 的 VM 中 运行ning Windows Server 2016 Datacenter。我已经尝试过使用和不使用 Windows GUI 的服务器安装。 Artifactory 通过 Chocolatey 安装:
choco install Artifactory -y
当我尝试使用 PowerShell 启动服务时:
Start-Service Artifactory
我在 PowerShell 中立即收到此错误:
Service 'artifactory (Artifactory)' cannot be started due to the following error: Cannot start service Artifactory on computer '.'.
Windows 事件日志按以下顺序显示这两个错误:
- A timeout was reached (30000 milliseconds) while waiting for the Artifactory service to connect.
- The Artifactory service failed to start due to the following error:
The service did not respond to the start or control request in a timely fashion.
同样,这些错误会立即发生,因此超时错误是完全错误的。
但我可以手动启动 Artifactory 进程:
C:\Program Files\artifactory\bin\artifactory.bat
Artifactory 日志
commons-daemon.2017-08-10.log
[2017-08-10 10:02:53] [info] [ 2344] Commons Daemon procrun (1.0.11.0 64-bit) started
[2017-08-10 10:02:53] [info] [ 2344] Service Artifactory name Artifactory
[2017-08-10 10:02:53] [info] [ 2344] Service 'Artifactory' installed
[2017-08-10 10:02:53] [info] [ 2344] Commons Daemon procrun finished
[2017-08-10 10:02:54] [info] [ 3420] Commons Daemon procrun (1.0.11.0 64-bit) started
[2017-08-10 10:02:54] [info] [ 3420] Updating service...
[2017-08-10 10:02:54] [info] [ 3420] Service 'Artifactory' updated
[2017-08-10 10:02:54] [info] [ 3420] Update service finished.
[2017-08-10 10:02:54] [info] [ 3420] Commons Daemon procrun finished
[2017-08-10 10:02:54] [info] [ 1468] Commons Daemon procrun (1.0.11.0 64-bit) started
[2017-08-10 10:02:54] [info] [ 1468] Updating service...
[2017-08-10 10:02:54] [info] [ 1468] Service 'Artifactory' updated
[2017-08-10 10:02:54] [info] [ 1468] Update service finished.
[2017-08-10 10:02:54] [info] [ 1468] Commons Daemon procrun finished
[2017-08-10 10:02:54] [info] [ 1000] Commons Daemon procrun (1.0.11.0 64-bit) started
[2017-08-10 10:02:54] [info] [ 1000] Updating service...
[2017-08-10 10:02:54] [info] [ 1000] Service 'Artifactory' updated
[2017-08-10 10:02:54] [info] [ 1000] Update service finished.
[2017-08-10 10:02:54] [info] [ 1000] Commons Daemon procrun finished
[2017-08-10 10:02:54] [info] [ 5016] Commons Daemon procrun (1.0.11.0 64-bit) started
[2017-08-10 10:02:55] [info] [ 5016] Updating service...
[2017-08-10 10:02:55] [info] [ 5016] Service 'Artifactory' updated
[2017-08-10 10:02:55] [info] [ 5016] Update service finished.
[2017-08-10 10:02:55] [info] [ 5016] Commons Daemon procrun finished
[2017-08-10 10:02:55] [info] [ 4308] Commons Daemon procrun (1.0.11.0 64-bit) started
[2017-08-10 10:02:55] [info] [ 4308] Updating service...
[2017-08-10 10:02:55] [info] [ 4308] Service 'Artifactory' updated
[2017-08-10 10:02:55] [info] [ 4308] Update service finished.
[2017-08-10 10:02:55] [info] [ 4308] Commons Daemon procrun finished
[2017-08-10 10:02:55] [info] [ 1168] Commons Daemon procrun (1.0.11.0 64-bit) started
[2017-08-10 10:02:55] [info] [ 1168] Updating service...
[2017-08-10 10:02:55] [info] [ 1168] Service 'Artifactory' updated
[2017-08-10 10:02:55] [info] [ 1168] Update service finished.
[2017-08-10 10:02:55] [info] [ 1168] Commons Daemon procrun finished
artifactory-services.2017-08-10.log
[2017-08-10 10:02:56] [info] [ 3172] Commons Daemon procrun (1.0.11.0 64-bit) started
[2017-08-10 10:02:56] [info] [ 3172] Updating service...
[2017-08-10 10:02:56] [info] [ 3172] Service 'Artifactory' updated
[2017-08-10 10:02:56] [info] [ 3172] Update service finished.
[2017-08-10 10:02:56] [info] [ 3172] Commons Daemon procrun finished
[2017-08-10 10:02:56] [info] [ 540] Commons Daemon procrun (1.0.11.0 64-bit) started
[2017-08-10 10:02:56] [info] [ 540] Updating service...
[2017-08-10 10:02:56] [info] [ 540] Service 'Artifactory' updated
[2017-08-10 10:02:56] [info] [ 540] Update service finished.
[2017-08-10 10:02:56] [info] [ 540] Commons Daemon procrun finished
更新
使用 procmon 我注意到当我尝试启动 'artifactory' 服务时它正在启动 'artifactory-service.exe'。我自己直接 运行 该程序导致了以下错误:
The system cannot find the Registry key for service 'artifactory-service'
Load configuration failed
The system cannot find the file specified.
Commons Daemon procrun failed with exit value: 2 (Failed to load configuration)
The system cannot find the file specified.
再次检查 procmon 显示当我启动时 'artifactory-service.exe' 它正在尝试访问注册表项 'HKLM\SOFTWARE\WOW6432Node\Apache Software Foundation\Procrun 2.0\artifactory-service' 但没有找到它。我用 regedit 确认此注册表项不存在。我倾向于认为这是服务无法启动的部分原因。
这似乎是由人工制品引起的-service.exe 导致在服务定义中使用不寻常的字符。在 运行 installService.bat 之后,当我检查服务时 "Path to executable" 有
...\artifactory-pro-5.5.1\bin\artifactory-service.exe //RS//Artifactory
异常字符是一些奇怪的 unicode 字符,例如:
http://www.fileformat.info/info/unicode/char/0cf4/index.htm
这似乎是由 artifactory-service.exe 引起的,它只是 "Commons Daemon Service Runner" prunsrv.exe v1.0.11.0 的旧版本。我找不到此错误的文档,所以我不知道根本原因。
我解决这个问题的方法是从 Tomcat 8 安装 (tomcat8.exe) 中获取最新版本的 prunsrv.exe v1.0.15.0 并将其重命名为 artifactory-service.exe 并将其放回 %ARTIFACTORY_HOME%\bin 安装文件夹中。这允许它安装并开始 运行 没有问题。
太棒了!你的程序对我有用,非常感谢。 gremlin 是我们在安装后在服务完整路径上看到的非法字符。我很困惑,因为人工服务在 Windows 10 下工作正常,但拒绝在 Windows 2016 下工作。试图延长 PipeServiceTimeout 无济于事。
如果有些人不清楚,只需要将 tomcat8.exe 从最新的 tomcat 8.5.23 下载重命名为 artifactory -service.exe。检查文件 属性 允许查看原始文件 prunsrv.exe v1.0.11.0 或 prunsrv.exe v1.0.15.0 .
File Property Snapshot -- click here
我正在尝试 运行 Windows 服务器上的 Artifactory,但 Artifactory 服务无法启动。我在 Hyper-V 的 VM 中 运行ning Windows Server 2016 Datacenter。我已经尝试过使用和不使用 Windows GUI 的服务器安装。 Artifactory 通过 Chocolatey 安装:
choco install Artifactory -y
当我尝试使用 PowerShell 启动服务时:
Start-Service Artifactory
我在 PowerShell 中立即收到此错误:
Service 'artifactory (Artifactory)' cannot be started due to the following error: Cannot start service Artifactory on computer '.'.
Windows 事件日志按以下顺序显示这两个错误:
- A timeout was reached (30000 milliseconds) while waiting for the Artifactory service to connect.
- The Artifactory service failed to start due to the following error: The service did not respond to the start or control request in a timely fashion.
同样,这些错误会立即发生,因此超时错误是完全错误的。
但我可以手动启动 Artifactory 进程:
C:\Program Files\artifactory\bin\artifactory.bat
Artifactory 日志
commons-daemon.2017-08-10.log
[2017-08-10 10:02:53] [info] [ 2344] Commons Daemon procrun (1.0.11.0 64-bit) started
[2017-08-10 10:02:53] [info] [ 2344] Service Artifactory name Artifactory
[2017-08-10 10:02:53] [info] [ 2344] Service 'Artifactory' installed
[2017-08-10 10:02:53] [info] [ 2344] Commons Daemon procrun finished
[2017-08-10 10:02:54] [info] [ 3420] Commons Daemon procrun (1.0.11.0 64-bit) started
[2017-08-10 10:02:54] [info] [ 3420] Updating service...
[2017-08-10 10:02:54] [info] [ 3420] Service 'Artifactory' updated
[2017-08-10 10:02:54] [info] [ 3420] Update service finished.
[2017-08-10 10:02:54] [info] [ 3420] Commons Daemon procrun finished
[2017-08-10 10:02:54] [info] [ 1468] Commons Daemon procrun (1.0.11.0 64-bit) started
[2017-08-10 10:02:54] [info] [ 1468] Updating service...
[2017-08-10 10:02:54] [info] [ 1468] Service 'Artifactory' updated
[2017-08-10 10:02:54] [info] [ 1468] Update service finished.
[2017-08-10 10:02:54] [info] [ 1468] Commons Daemon procrun finished
[2017-08-10 10:02:54] [info] [ 1000] Commons Daemon procrun (1.0.11.0 64-bit) started
[2017-08-10 10:02:54] [info] [ 1000] Updating service...
[2017-08-10 10:02:54] [info] [ 1000] Service 'Artifactory' updated
[2017-08-10 10:02:54] [info] [ 1000] Update service finished.
[2017-08-10 10:02:54] [info] [ 1000] Commons Daemon procrun finished
[2017-08-10 10:02:54] [info] [ 5016] Commons Daemon procrun (1.0.11.0 64-bit) started
[2017-08-10 10:02:55] [info] [ 5016] Updating service...
[2017-08-10 10:02:55] [info] [ 5016] Service 'Artifactory' updated
[2017-08-10 10:02:55] [info] [ 5016] Update service finished.
[2017-08-10 10:02:55] [info] [ 5016] Commons Daemon procrun finished
[2017-08-10 10:02:55] [info] [ 4308] Commons Daemon procrun (1.0.11.0 64-bit) started
[2017-08-10 10:02:55] [info] [ 4308] Updating service...
[2017-08-10 10:02:55] [info] [ 4308] Service 'Artifactory' updated
[2017-08-10 10:02:55] [info] [ 4308] Update service finished.
[2017-08-10 10:02:55] [info] [ 4308] Commons Daemon procrun finished
[2017-08-10 10:02:55] [info] [ 1168] Commons Daemon procrun (1.0.11.0 64-bit) started
[2017-08-10 10:02:55] [info] [ 1168] Updating service...
[2017-08-10 10:02:55] [info] [ 1168] Service 'Artifactory' updated
[2017-08-10 10:02:55] [info] [ 1168] Update service finished.
[2017-08-10 10:02:55] [info] [ 1168] Commons Daemon procrun finished
artifactory-services.2017-08-10.log
[2017-08-10 10:02:56] [info] [ 3172] Commons Daemon procrun (1.0.11.0 64-bit) started
[2017-08-10 10:02:56] [info] [ 3172] Updating service...
[2017-08-10 10:02:56] [info] [ 3172] Service 'Artifactory' updated
[2017-08-10 10:02:56] [info] [ 3172] Update service finished.
[2017-08-10 10:02:56] [info] [ 3172] Commons Daemon procrun finished
[2017-08-10 10:02:56] [info] [ 540] Commons Daemon procrun (1.0.11.0 64-bit) started
[2017-08-10 10:02:56] [info] [ 540] Updating service...
[2017-08-10 10:02:56] [info] [ 540] Service 'Artifactory' updated
[2017-08-10 10:02:56] [info] [ 540] Update service finished.
[2017-08-10 10:02:56] [info] [ 540] Commons Daemon procrun finished
更新
使用 procmon 我注意到当我尝试启动 'artifactory' 服务时它正在启动 'artifactory-service.exe'。我自己直接 运行 该程序导致了以下错误:
The system cannot find the Registry key for service 'artifactory-service' Load configuration failed The system cannot find the file specified. Commons Daemon procrun failed with exit value: 2 (Failed to load configuration) The system cannot find the file specified.
再次检查 procmon 显示当我启动时 'artifactory-service.exe' 它正在尝试访问注册表项 'HKLM\SOFTWARE\WOW6432Node\Apache Software Foundation\Procrun 2.0\artifactory-service' 但没有找到它。我用 regedit 确认此注册表项不存在。我倾向于认为这是服务无法启动的部分原因。
这似乎是由人工制品引起的-service.exe 导致在服务定义中使用不寻常的字符。在 运行 installService.bat 之后,当我检查服务时 "Path to executable" 有
...\artifactory-pro-5.5.1\bin\artifactory-service.exe //RS//Artifactory
异常字符是一些奇怪的 unicode 字符,例如: http://www.fileformat.info/info/unicode/char/0cf4/index.htm
这似乎是由 artifactory-service.exe 引起的,它只是 "Commons Daemon Service Runner" prunsrv.exe v1.0.11.0 的旧版本。我找不到此错误的文档,所以我不知道根本原因。
我解决这个问题的方法是从 Tomcat 8 安装 (tomcat8.exe) 中获取最新版本的 prunsrv.exe v1.0.15.0 并将其重命名为 artifactory-service.exe 并将其放回 %ARTIFACTORY_HOME%\bin 安装文件夹中。这允许它安装并开始 运行 没有问题。
太棒了!你的程序对我有用,非常感谢。 gremlin 是我们在安装后在服务完整路径上看到的非法字符。我很困惑,因为人工服务在 Windows 10 下工作正常,但拒绝在 Windows 2016 下工作。试图延长 PipeServiceTimeout 无济于事。
如果有些人不清楚,只需要将 tomcat8.exe 从最新的 tomcat 8.5.23 下载重命名为 artifactory -service.exe。检查文件 属性 允许查看原始文件 prunsrv.exe v1.0.11.0 或 prunsrv.exe v1.0.15.0 .
File Property Snapshot -- click here