Jenkins Windows Slave服务无法与桌面交互 [英] Jenkins windows slave service does not interact with desktop

查看:361
本文介绍了Jenkins Windows Slave服务无法与桌面交互的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已按照本指南在Windows 8上将jenkins从站安装为服务:

https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+as+a+Windows+service#InstallingJenkinsasaWindowsservice-InstallSlaveasaWindowsservice%28require.NET2.0framework%29

我需要运行与台式机交互的作业(运行打开浏览器等的应用程序).因此,在将从站安装为服务(运行从主站下载的jnlp)之后,我将服务登录"更改为允许与显示交互".

由于某种原因,即使建议以指定用户身份运行服务,也只能为本地系统帐户"启用此功能.詹金斯.

但是当我执行作业时什么也没发生,浏览器没有打开.如果我改为停止服务,而只是通过jnlp文件启动从属服务器,则该作业运行良好-已打开浏览器.

将jenkins Windows Slave作为服务运行时,有人与桌面交互有运气吗?

解决方案

自Vista在会话0开始运行服务,而第一个用户现在在会话1开始运行.因此,您不能再进行交互.这称为会话0隔离.

Microsoft对此此处此处.您必须使用第二个程序,该程序使用 IPC与服务进行通信.

I have followed this guide to install a jenkins slave on windows 8 as a service:

https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+as+a+Windows+service#InstallingJenkinsasaWindowsservice-InstallSlaveasaWindowsservice%28require.NET2.0framework%29

I need to run a job that interact with the desktop (run an application that opens a browser etc.). So after I have installed the slave as a service (running jnlp downloaded from the master) I have changed the service "Log on" to "Allow to interact with display".

For some reason its only possible to enable this for the "Local System account" even though its recommended to run the service as a specified user, eg. jenkins.

But nothing happens when I execute the job, the browser is not opened. If I instead stop the service and just launch the slave through the jnlp file the job runs fine - the browser is opened.

Anybody had any luck interacting with the desktop when running a jenkins windows slave as a service?

解决方案

Services run since Vista in Session 0 and the first user is now in Session 1. So you can't interact any longer. This is called Session 0 Isolation.

Microsoft explains this here and here. You have to use 2nd Program which uses IPC to communicate to the Service.

这篇关于Jenkins Windows Slave服务无法与桌面交互的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆