【发布时间】:2018-01-18 23:24:30
【问题描述】:
我正在尝试在 Windows Server 上运行 Artifactory,但 Artifactory 服务无法启动。我在 Hyper-V 的 VM 中运行 Windows Server 2016 Datacenter。我尝试过使用和不使用 Windows GUI 的服务器安装。 Artifactory 是通过 Chocolatey 安装的:
choco install Artifactory -y
当我尝试使用 PowerShell 启动服务时:
Start-Service Artifactory
我立即在 PowerShell 中收到此错误:
由于以下错误无法启动服务“artifactory (Artifactory)”:无法在计算机“.”上启动服务 Artifactory。
Windows 事件日志按以下顺序显示这两个错误:
- 等待 Artifactory 服务连接时超时(30000 毫秒)。
- 由于以下错误,Artifactory 服务无法启动: 服务未及时响应启动或控制请求。
同样,这些错误会立即发生,因此超时错误是完全错误的。
但我可以手动启动 Artifactory 进程:
C:\Program Files\artifactory\bin\artifactory.bat
人工记录
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”。尝试自己直接运行该程序导致以下错误:
系统找不到服务“artifactory-service”的注册表项 加载配置失败 该系统找不到指定的文件。 Commons Daemon procrun 失败,退出值:2(无法加载配置) 系统找不到指定的文件。
再次检查 procmon 显示,当我启动 'artifactory-service.exe' 时,它正在尝试访问注册表项 'HKLM\SOFTWARE\WOW6432Node\Apache Software Foundation\Procrun 2.0\artifactory-service' 并没有找到它。我用 regedit 确认此注册表项不存在。我倾向于认为这是服务无法启动的部分原因。
【问题讨论】:
-
您在 Tomcat 和 Artifactory 日志中看到了什么?
-
Artifactory 日志包含一些看起来与安装相关的内容。
Start-Service Artifactory不会在日志中添加任何新内容。如果有帮助,我会在问题中添加内容。 Tomcat 日志为空。 -
我指的是 Tomcat 日志:'catalina.out' & 'localhost.log' 文件和 Artifactory 日志:'artifactory.log' 文件。
-
@Ariel 那些文件不存在。
-
你能找到 Artifactory 的主文件夹,看看里面是否有日志文件夹吗?
标签: windows-services artifactory windows-server-2016