服务无法启动错误1920

问题描述 投票:0回答:3

在某些机器上,我们在安装服务时出现以下错误: “服务...无法启动。请验证您是否有足够的权限来启动系统服务。”

服务安装得很好,只是它无法从 Services.msc 作为网络服务启动。 如果从控制台启动,服务可以启动并运行良好,它是可执行的...

作为本地系统启动的另一个服务也会发生同样的情况。

在其他机器上一切正常。服务作为网络服务启动,没有任何问题。

我们认为是Windows权限的问题,就像错误所说的那样,但是如何检查?又该做什么呢?

谢谢, 阿德里亚

windows windows-services installation rights
3个回答
1
投票

刚刚在 2016 年服务器上安装了一个非常旧的应用程序。我们遇到了两个障碍 - 确保我们启动服务的帐户在本地组策略中具有“作为服务登录”权限。

另一个 - 我们已经在这个新应用程序的 config.xml 中的默认端口上运行另一个应用程序,因此我们只是更改为不同的端口并保存配置文件,而安装程序仍然显示错误,然后单击重试和成功。


0
投票

经过更多调查,我们发现在服务配置文件中添加此内容可以解决问题:

<runtime>
    <generatePublisherEvidence enabled="false"/>
</runtime>

http://msdn.microsoft.com/en-us/library/bb629393.aspx

我们建议服务使用

<generatePublisherEvidence>
元素来提高启动性能。使用此元素还可以帮助避免可能导致超时和服务启动取消的延迟。


0
投票

只是想添加我的解决方案,以防有人像我一样遇到这个问题......

我有一个 .msi 文件,一旦我为其生成了日志:

msiexec -i package.msi /L*V package.log

日志文件中有这个:

Error 1920. Service 'Controller 01' (Controller01) failed to start. Verify that you have sufficient privileges to start system services.
MSI (s) (04:5C) [12:23:11:831]: I/O on thread 2052 could not be cancelled. Error: 1168
MSI (s) (04:5C) [12:23:11:831]: I/O on thread 5396 could not be cancelled. Error: 1168
MSI (s) (04:5C) [12:23:11:831]: I/O on thread 5404 could not be cancelled. Error: 1168
MSI (s) (04:5C) [12:23:11:831]: I/O on thread 1448 could not be cancelled. Error: 1168
MSI (s) (04:5C) [12:23:11:831]: I/O on thread 1904 could not be cancelled. Error: 1168
MSI (s) (04:5C) [12:23:11:831]: I/O on thread 1088 could not be cancelled. Error: 1168
MSI (s) (04:5C) [12:23:11:831]: I/O on thread 6952 could not be cancelled. Error: 1168
MSI (s) (04:5C) [12:23:11:831]: I/O on thread 6956 could not be cancelled. Error: 1168

查看事件查看器没有任何帮助,因此在安装程序上单击“取消”之前,我转到硬盘驱动器上的服务位置并尝试以管理员身份运行它。这时,我得到了一条线索,最终解决了这个问题:

MSVCR120.dll was not found

此时,我进入 c:\windows\system32 并查找 DLL...,它就在那里。于是,我直接将其复制到.exe所在的目录中,然后尝试再次运行。这次我收到了不同的错误消息:

The application was unable to start correctly (0xc000007b)

搜索“0xc000007b”的含义,我发现here它的含义:“错误0xc000007b意味着STATUS_INVALID_IMAGE_FORMAT。这意味着应用程序尝试加载具有错误CPU架构的DLL。因此32位应用程序尝试加载64位DLL或相反(64 位应用程序尝试加载 32 位 DLL)。”

因此,就我而言,安装程序的发布者未能包含 Visual Studio 2013 的 x86 Visual C++ Redistributable Package。安装并重新启动后,我重新运行安装程序并且它起作用了。

© www.soinside.com 2019 - 2024. All rights reserved.