在 Windows Server 2012上安装了Jenkins 1.651主服务器和从服务器.
slave专门用于运行Selenium测试,但大部分时间它都处于脱机状态:
Build step 'Execute Windows batch command' marked build as failure
ERROR: slave-tester is offline; cannot locate jdk7

Apr 20,2016 2:20:05 PM INFO jenkins.slaves.DefaultJnlpSlaveReceiver handle
disconnecting slave-tester as we are reconnected from the current peer
Apr 20,2016 2:20:17 PM WARNING org.jenkinsci.remoting.nio.NioChannelHub run
Communication problem
java.io.IOException: An existing connection was forcibly closed by the remote host
    at sun.nio.ch.socketdispatcher.read0(Native Method)
    at sun.nio.ch.socketdispatcher.read(UnkNown Source)
    at sun.nio.ch.IoUtil.readIntoNativeBuffer(UnkNown Source)
    at sun.nio.ch.IoUtil.read(UnkNown Source)
    at sun.nio.ch.socketChannelImpl.read(UnkNown Source)
    at org.jenkinsci.remoting.nio.FifoBuffer$Pointer.receive(FifoBuffer.java:136)
    at org.jenkinsci.remoting.nio.FifoBuffer.receive(FifoBuffer.java:306)
    at org.jenkinsci.remoting.nio.NioChannelHub.run(NioChannelHub.java:561)
    at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
    at java.util.concurrent.Executors$RunnableAdapter.call(UnkNown Source)
    at java.util.concurrent.FutureTask.run(UnkNown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(UnkNown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(UnkNown Source)
    at java.lang.Thread.run(UnkNown Source)

Apr 20,2016 2:20:17 PM WARNING jenkins.slaves.JnlpSlaveAgentProtocol$Handler$1 onClosed
NioChannelHub keys=2 gen=88003: Computer.threadPoolForRemoting [#2] for slave-tester terminated
java.io.IOException: Connection aborted: org.jenkinsci.remoting.nio.NioChannelHub$MonoNioTransport@17d0b4b[name=xxx]
    at org.jenkinsci.remoting.nio.NioChannelHub$NioTransport.abort(NioChannelHub.java:208)
    at org.jenkinsci.remoting.nio.NioChannelHub.run(NioChannelHub.java:628)
    at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
    at java.util.concurrent.Executors$RunnableAdapter.call(UnkNown Source)
    at java.util.concurrent.FutureTask.run(UnkNown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(UnkNown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(UnkNown Source)
    at java.lang.Thread.run(UnkNown Source)
Caused by: java.io.IOException: An existing connection was forcibly closed by the remote host
    at sun.nio.ch.socketdispatcher.read0(Native Method)
    at sun.nio.ch.socketdispatcher.read(UnkNown Source)
    at sun.nio.ch.IoUtil.readIntoNativeBuffer(UnkNown Source)
    at sun.nio.ch.IoUtil.read(UnkNown Source)
    at sun.nio.ch.socketChannelImpl.read(UnkNown Source)
    at org.jenkinsci.remoting.nio.FifoBuffer$Pointer.receive(FifoBuffer.java:136)
    at org.jenkinsci.remoting.nio.FifoBuffer.receive(FifoBuffer.java:306)
    at org.jenkinsci.remoting.nio.NioChannelHub.run(NioChannelHub.java:561)
    ... 6 more

奴隶日志:

<===[JENKINS REMOTING CAPACITY]===>Slave.jar version: 2.53.3
Slave.jar version: 2.53.3
This is a Windows slave
This is a Windows slave
Connection terminated
Connection terminated
ERROR: Failed to install restarter
hudson.remoting.RequestAbortedException: hudson.remoting.Channel$OrderlyShutdown
    at hudson.remoting.Request.abort(Request.java:297)
    at hudson.remoting.Channel.terminate(Channel.java:847)
    at hudson.remoting.Channel$CloseCommand.execute(Channel.java:1080)
    at hudson.remoting.Channel$1.handle(Channel.java:501)
    at hudson.remoting.AbstractByteArrayCommandTransport$1.handle(AbstractByteArrayCommandTransport.java:61)
    at org.jenkinsci.remoting.nio.NioChannelHub$2.run(NioChannelHub.java:594)
    at java.util.concurrent.Executors$RunnableAdapter.call(UnkNown Source)
    at java.util.concurrent.FutureTask.run(UnkNown Source)
    at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
    at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
    at java.util.concurrent.Executors$RunnableAdapter.call(UnkNown Source)
    at java.util.concurrent.FutureTask.run(UnkNown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(UnkNown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(UnkNown Source)
    at java.lang.Thread.run(UnkNown Source)
    at ......remote call to slave-tester(Native Method)
    at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416)
    at hudson.remoting.Request.call(Request.java:172)
    at hudson.remoting.Channel.call(Channel.java:780)
    at jenkins.slaves.restarter.JnlpSlaveRestarterInstaller.install(JnlpSlaveRestarterInstaller.java:52)
    at jenkins.slaves.restarter.JnlpSlaveRestarterInstaller.access$000(JnlpSlaveRestarterInstaller.java:33)
    at jenkins.slaves.restarter.JnlpSlaveRestarterInstaller$1.call(JnlpSlaveRestarterInstaller.java:39)
    at jenkins.slaves.restarter.JnlpSlaveRestarterInstaller$1.call(JnlpSlaveRestarterInstaller.java:36)
    at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
    at java.util.concurrent.FutureTask.run(UnkNown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(UnkNown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(UnkNown Source)
    at java.lang.Thread.run(UnkNown Source)
Caused by: hudson.remoting.Channel$OrderlyShutdown
    at hudson.remoting.Channel$CloseCommand.execute(Channel.java:1080)
    at hudson.remoting.Channel$1.handle(Channel.java:501)
    at hudson.remoting.AbstractByteArrayCommandTransport$1.handle(AbstractByteArrayCommandTransport.java:61)
    at org.jenkinsci.remoting.nio.NioChannelHub$2.run(NioChannelHub.java:594)
    at java.util.concurrent.Executors$RunnableAdapter.call(UnkNown Source)
    at java.util.concurrent.FutureTask.run(UnkNown Source)
    at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
    at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
    at java.util.concurrent.Executors$RunnableAdapter.call(UnkNown Source)
    ... 4 more
Caused by: Command close created at
    at hudson.remoting.Command.<init>(Command.java:56)
    at hudson.remoting.Channel$CloseCommand.<init>(Channel.java:1074)
    at hudson.remoting.Channel$CloseCommand.<init>(Channel.java:1072)
    at hudson.remoting.Channel.close(Channel.java:1156)
    at hudson.remoting.Channel.close(Channel.java:1138)
    at hudson.remoting.Channel$CloseCommand.execute(Channel.java:1079)
    at hudson.remoting.Channel$1.handle(Channel.java:501)
    at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:60)

造成这个问题的原因是什么以及如何解决?

类似的问题

> https://issues.jenkins-ci.org/browse/JENKINS-27251
> https://issues.jenkins-ci.org/browse/JENKINS-6817
> https://issues.jenkins-ci.org/browse/JENKINS-28155
> https://issues.jenkins-ci.org/browse/JENKINS-28826
> https://issues.jenkins-ci.org/browse/JENKINS-22932
> https://bugreports.qt.io/browse/QTQAINFRA-928
> https://stackoverflow.com/questions/36743908/jenkins-slave-connection-aborted
> https://mailman.owncloud.org/pipermail/jenkins/2015-July/006091.html
> https://mailman.boum.org/pipermail/tails-dev/2014-December/007732.htm

可能的方案

基于this source,堆栈跟踪的一部分:

at java.util.concurrent.Executors$RunnableAdapter.call(UnkNown Source)
at java.util.concurrent.FutureTask.run(UnkNown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(UnkNown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(UnkNown Source)
at java.lang.Thread.run(UnkNown Source)

并在办公室遇到同样的问题将jdk7升级到最新的oracle-jdk8可以解决这个问题.

如果问题仍然存在:

>请准确说明问题何时发生,以便重现问题>请添加导致问题的构建的Jenkins构建日志.也许由导致问题的作业执行特定任务.>在构建作业时查看Windows任务管理器>请添加其中一个成功构建的日志和其中一个失败构建的日志

windows-server-2012 – Jenkins Slave在构建期间脱机的更多相关文章

  1. 无法在iOS设备上首次安装企业内部分发应用程序

    我有一个可以通过S3Bucket使用Enterprisedistribution下载的应用程序,它第一次失败并显示加载但是当我通过将设备连接到计算机使用配置实用程序手动安装证书时,相同的网站链接开始工作.我正在使用Jenkins来创建构建.证书没有自动安装,我按照苹果标准使用清单.我的清单文件内容如下:解决方法我通过检查设备日志来解决问题,它说未找到嵌入式配置.我刚刚打开了使用Jenkins创建的

  2. ios – 使用Jenkins和altool自动上传IPA失败,并找不到“Transporter not found”错误

    我正在使用Jenkins和altool验证iOS包并自动将其上传到我的iTunes帐户.虽然验证工作正常,我没有收到任何错误,但上传不起作用.‘/Applications/Xcode.app/Contents/Applications/ApplicationLoader.app/Contents/Frameworks/ITunesSoftwareService.framework/Versions

  3. ios – Jenkins无法从项目文件夹运行xcodebuild

    我是Jenkins的新手,但是我尽力用GoogleFu回答这个问题无济于事.我最初是通过手动安装Jenkins遇到了这个问题,但最近使用了OSX安装程序并导致了同样的错误.我猜这与Unix/Linux/OSX权限有关,而不是Jenkins/Xcode,但没有足够的专业知识来确定.编辑项目目录权限设置为775.我也尝试将所有权更改为Jenkins运行的用户.这是我尝试将xcodebuild作为守护程序用户运行时的输出:解决方法确保运行Jenkins的用户具有正确的权限.转到http://[jenkins_s

  4. xcode – 为什么Jenkins在我的Mac上运行不会连接到本地的git repo?

    我正在尝试使用Jenkins实现自动化构建,用于我的iOS项目.我添加了Git插件,但是一旦我尝试将git的URL放在项目的git配置中,它会在下面的屏幕截图中显示错误.这里Jenkins不能从repo克隆到其工作空间.解决方法在大多数情况下,gitbarerepo有扩展名.git我的意思是(其他)/test1看起来不正确,我认为应该是(其他)/test1.git在我的mac上有同样的错误.

  5. xcode – 可以用两个不同的iOS sdks运行jenkins

    我们正在使用Jenkins在MacMini服务器上运行我们的xcodebuilds.在最近几周,我们开始开发iOS7应用程序,并在MacMini上安装了Xcode5DP版本.当安装新的Xcode版本并配置Xcode的xcodebuild,xcode-选择这个新版本也用于构建我们的旧iOS6应用程序–这打破了它们的UI.有没有办法告诉Jenkins哪个xcodebuild应该用来构建一个项目?

  6. Android Jenkins构建因崩溃而失败

    每次我尝试使用Jenkins构建时,都会出现以下错误Failedtoapplyplugin[id‘io.fabric’]Couldnotcreatepluginoftype‘CrashlyticsPlugin’.从Gradle中删除Crashlytics可以解决此问题解决方法这些是您需要遵循的最终命令:以下是此案例的相关调试日志:

  7. android – 每个构建的Jenkins电子邮件工件

    我正在使用Jenkins构建我的Android应用程序.一旦创建了工件,我希望apk能够通过电子邮件发送给一组用户.我已经知道Testflight等,但我只需要Jenkins将签名的apk通过电子邮件发送给一组用户.我怎样才能做到这一点?

  8. 如何设置Android应用程序版本的数量建立在jenkins?

    成功推送后,应用程序由jenkins自动建立,但版本始终为1.0.而不是“0”,我想在jenkins中插入相应的编号:1.119,1.120,1.121…那是我的build.gradle文件build.sh我的gradle.properities只包含评论.解决方法通过将这两个字符串插入到build.gradle的defaultConfig中解决问题:代替

  9. Pytest+Request+Allure+Jenkins实现接口自动化

    这篇文章介绍了Pytest+Request+Allure+Jenkins实现接口自动化的方法,文中通过示例代码介绍的非常详细。对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下

  10. 用node.js写一个jenkins发版脚本

    这篇文章主要介绍了用node.js写一个jenkins发版脚本,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧

随机推荐

  1. static – 在页面之间共享数据的最佳实践

    我想知道在UWP的页面之间发送像’selectedItem’等变量的最佳做法是什么?创建一个每个页面都知道的静态全局变量类是一个好主意吗?

  2. .net – 为Windows窗体控件提供百分比宽度/高度

    WindowsForm开发的新手,但在Web开发方面经验丰富.有没有办法为Windows窗体控件指定百分比宽度/高度,以便在用户调整窗口大小时扩展/缩小?当窗口调整大小时,可以编写代码来改变控件的宽度/高度,但我希望有更好的方法,比如在HTML/CSS中.在那儿?

  3. 使用Windows Azure查询表存储数据

    我需要使用特定帐户吗?>将应用程序部署到Azure服务后,如何查询数据?GoogleAppEngine有一个数据查看器/查询工具,Azure有类似的东西吗?>您可以看到的sqlExpressintance仅在开发结构中,并且一旦您表示没有等效,所以请小心使用它.>您可以尝试使用Linqpad查询表格.看看JamieThomson的thispost.

  4. windows – SetupDiGetClassDevs是否与文档中的设备实例ID一起使用?

    有没有更好的方法可以使用DBT_DEVICEARRIVAL事件中的数据获取设备的更多信息?您似乎必须指定DIGCF_ALLCLASSES标志以查找与给定设备实例ID匹配的所有类,或者指定ClassGuid并使用DIGCF_DEFAULT标志.这对我有用:带输出:

  5. Windows Live ID是OpenID提供商吗?

    不,WindowsLiveID不是OpenID提供商.他们使用专有协议.自从他们的“测试版”期结束以来,他们从未宣布计划继续它.

  6. 如果我在代码中进行了更改,是否需要重新安装Windows服务?

    我写了一个Windows服务并安装它.现在我对代码进行了一些更改并重新构建了解决方案.我还应该重新安装服务吗?不,只需停止它,替换文件,然后重新启动它.

  7. 带有双引号的字符串回显使用Windows批处理输出文件

    我正在尝试使用Windows批处理文件重写配置文件.我循环遍历文件的行并查找我想要用指定的新行替换的行.我有一个’函数’将行写入文件问题是%Text%是一个嵌入双引号的字符串.然后失败了.可能还有其他角色也会导致失败.如何才能使用配置文件中的所有文本?尝试将所有“在文本中替换为^”.^是转义字符,因此“将被视为常规字符你可以尝试以下方法:其他可能导致错误的字符是:

  8. .net – 将控制台应用程序转换为服务?

    我正在寻找不同的优势/劣势,将我们长期使用的控制台应用程序转换为Windows服务.我们为ActiveMQ使用了一个叫做java服务包装器的东西,我相信人们告诉我你可以用它包装任何东西.这并不是说你应该用它包装任何东西;我们遇到了这个问题.控制台应用程序是一个.NET控制台应用程序,默认情况下会将大量信息记录到控制台,尽管这是可配置的.任何推荐?我们应该在VisualStudio中将其重建为服务吗?我使用“-install”/“-uninstall”开关执行此操作.例如,seehere.

  9. windows – 捕获外部程序的STDOUT和STDERR *同时*它正在执行(Ruby)

    哦,我在Windows上:-(实际上,它比我想象的要简单,这看起来很完美:…是的,它适用于Windows!

  10. windows – 当我试图批量打印变量时,为什么我得到“Echo is on”

    我想要执行一个简单的批处理文件脚本:当我在XP中运行时,它给了我预期的输出,但是当我在Vista或Windows7中运行它时,我在尝试打印值时得到“EchoisOn”.以下是程序的输出:摆脱集合表达式中的空格.等号(=)的两侧可以并且应该没有空格BTW:我通常在@echo关闭的情况下启动所有批处理文件,并以@echo结束它们,所以我可以避免将代码与批处理文件的输出混合.它只是使您的批处理文件输出更好,更清洁.

返回
顶部