问题描述
通过Web Start启动从服务器后,我正在尝试安装Jenkins从服务器服务.尝试在Windows 10和Windows 8.1上安装时收到以下错误.
I am trying to install Jenkins slave service after starting the slave via web start.I get the following error when it tries to install on windows 10 and windows 8.1.
[JenkinsWorkDirectory]$ c:\JenkinsWorkDirectory\jenkins-slave.exe install
WMI.WmiException:AccessDenied
at WMI.WmiRoot.ClassHandler.Invoke(Object proxy, MethodInfo method, Object[] args)
at WMI.Win32ServicesProxy.Create(String, String, String, ServiceType, ErrorControl, StartMode, Boolean, String, String, String[])
at winsw.WrapperService.Run(String[]_args,ServiceDescriptor descriptor)
at winsw.WrapperService.Main(String[]args).
我可以在Win 7上安装从属服务而没有任何问题.知道为什么会发生这种情况,或者是Jenkins的某种局限性还是我缺少某种依赖性?
I can install the slave service without any issue on win 7.Any idea why is this happening or is it some limitation of Jenkins or am i missing some dependency?
我的jenkins版本是1.655,并在安装时使用chrome浏览器. Jenkins master在Windows 7上运行.谢谢,丹尼尔
My jenkins version is 1.655 and using chrome browser when installing. Jenkins master is running on windows 7.Thanks,Daniel
推荐答案
我找到了另一种方法来安装从属服务器.
I found another way to get the slave to install.
- 使用以管理员身份运行"打开命令窗口.
- 将目录更改为保存slave-agent.jnlp文件的位置.
- 在提示符下运行"slave-agent.jnlp"
- 现在,从属服务器正在运行,单击菜单项安装为服务".
诀窍是在以管理员身份运行时做到这一点.这将安装在本地系统下运行的服务.
The trick is to do it while running as an administrator. This installs the service running under localsystem.
此外,如果您和我一样,并且需要jenkins例程运行另一台计算机,则需要将服务更改为以具有权限的用户身份(网络或其他)运行,以执行您想要完成的任务.
Additionally, if you're like me and you need your jenkins routines to hit another machine, you'll need to change the service to run as a user with permission (network or otherwise) to do the task you want done.
这篇关于在Win8.1和Win10上安装Jenkins Slave as Service的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!