Jenkins从节点上构建自动化测试项目时报错:java.io.IOException: Unexpected termination of the channel

简介: 在mac电脑上配置了Jenkins从节点,在该从节点上构建app UI 自动化测试项目,运行一些用例后报如下错误:


java.io.EOFException
  at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2638)
  at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:3113)
  at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:853)
  at java.io.ObjectInputStream.<init>(ObjectInputStream.java:349)
  at hudson.remoting.ObjectInputStreamEx.<init>(ObjectInputStreamEx.java:49)
  at hudson.remoting.Command.readFrom(Command.java:140)
  at hudson.remoting.Command.readFrom(Command.java:126)
  at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:36)
  at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:63)
Caused: java.io.IOException: Unexpected termination of the channel
  at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:77)
Caused: java.io.IOException: Backing channel 'app-ui-test' is disconnected.
  at hudson.remoting.RemoteInvocationHandler.channelOrFail(RemoteInvocationHandler.java:214)
  at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:283)
  at com.sun.proxy.$Proxy129.isAlive(Unknown Source)
  at hudson.Launcher$RemoteLauncher$ProcImpl.isAlive(Launcher.java:1150)
  at hudson.Launcher$RemoteLauncher$ProcImpl.join(Launcher.java:1142)
  at hudson.tasks.CommandInterpreter.join(CommandInterpreter.java:155)
  at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:109)
  at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:66)
  at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
  at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
  at hudson.model.Build$BuildExecution.build(Build.java:206)
  at hudson.model.Build$BuildExecution.doRun(Build.java:163)
  at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
  at hudson.model.Run.execute(Run.java:1818)
  at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
  at hudson.model.ResourceController.execute(ResourceController.java:97)
  at hudson.model.Executor.run(Executor.java:429)
FATAL: Unable to delete script file /var/folders/__/x9pk6npn47g1g4t_n7t6h_t80000gn/T/jenkins5263477407196692208.sh
java.io.EOFException
  at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2638)
  at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:3113)
  at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:853)
  at java.io.ObjectInputStream.<init>(ObjectInputStream.java:349)
  at hudson.remoting.ObjectInputStreamEx.<init>(ObjectInputStreamEx.java:49)
  at hudson.remoting.Command.readFrom(Command.java:140)
  at hudson.remoting.Command.readFrom(Command.java:126)
  at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:36)
  at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:63)
Caused: java.io.IOException: Unexpected termination of the channel
  at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:77)
Caused: hudson.remoting.ChannelClosedException: Channel "unknown": Remote call on app-ui-test failed. The channel is closing down or has closed down
  at hudson.remoting.Channel.call(Channel.java:950)
  at hudson.FilePath.act(FilePath.java:1070)
  at hudson.FilePath.act(FilePath.java:1059)
  at hudson.FilePath.delete(FilePath.java:1540)
  at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:123)
  at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:66)
  at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
  at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
  at hudson.model.Build$BuildExecution.build(Build.java:206)
  at hudson.model.Build$BuildExecution.doRun(Build.java:163)
  at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
  at hudson.model.Run.execute(Run.java:1818)
  at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
  at hudson.model.ResourceController.execute(ResourceController.java:97)
  at hudson.model.Executor.run(Executor.java:429)
Build step 'Execute shell' marked build as failure
Checking console output
[BFA] Scanning build for known causes...
[BFA] No failure causes found
[BFA] Done. 0s
Finished: FAILURE


原因:暂未知。因为是执行了一些用例之后才报错,所以从节点配置应该是没什么问题。

解决方法:重启Jenkins。重新启动Jenkins后再次构建项目,不报该错误。

重启Jenkins方法:

  • 登陆Jenkins的web管理页面,在页面网址后面加上/restart,回车;
  • 点击【是】或【Yes】按钮,等待页面刷新即可。
相关文章
|
28天前
|
敏捷开发 测试技术 API
测试金字塔:构建高效自动化测试策略的基石
测试金字塔:构建高效自动化测试策略的基石
224 116
|
28天前
|
设计模式 前端开发 测试技术
告别脆弱:构建稳定UI自动化测试的3个核心策略
告别脆弱:构建稳定UI自动化测试的3个核心策略
269 113
|
28天前
|
测试技术 持续交付 API
测试的艺术:掌握测试金字塔,构建高效测试策略
测试的艺术:掌握测试金字塔,构建高效测试策略
194 77
|
28天前
|
测试技术 API 数据库
测试金字塔:构建高效自动化测试策略的基石
测试金字塔:构建高效自动化测试策略的基石
245 114
|
1月前
|
人工智能 自然语言处理 JavaScript
Playwright MCP在UI回归测试中的实战:构建AI自主测试智能体
Playwright MCP结合AI智能体,革新UI回归测试:通过自然语言驱动浏览器操作,降低脚本编写门槛,提升测试效率与覆盖范围。借助快照解析、智能定位与Jira等工具集成,实现从需求描述到自动化执行的闭环,推动测试迈向智能化、民主化新阶段。
|
6月前
|
边缘计算 安全 5G
高精度时钟同步测试仪:构建全场景时间同步生态
在数字化转型中,时间同步至关重要。西安同步电子科技的 SYN5106 高精度时钟测试仪,具备±20ns 时差测量精度与 GPS/北斗双模授时能力,广泛应用于电力、通信、金融和科研领域。它解决变电站时间偏差、5G 基站同步误差及高频交易延迟等问题,助力智能电网、5G 网络和科研实验。产品便携可靠,支持多协议,满足国家安全要求,为各行业提供精准时间同步解决方案。未来将探索量子通信与深空探测等领域,持续推动技术创新。
|
3月前
|
存储 人工智能 文字识别
从零开始打造AI测试平台:文档解析与知识库构建详解
AI时代构建高效测试平台面临新挑战。本文聚焦AI问答系统知识库建设,重点解析文档解析关键环节,为测试工程师提供实用技术指导和测试方法论
|
存储 Java
【IO面试题 四】、介绍一下Java的序列化与反序列化
Java的序列化与反序列化允许对象通过实现Serializable接口转换成字节序列并存储或传输,之后可以通过ObjectInputStream和ObjectOutputStream的方法将这些字节序列恢复成对象。
|
1月前
|
Java Unix Go
【Java】(8)Stream流、文件File相关操作,IO的含义与运用
Java 为 I/O 提供了强大的而灵活的支持,使其更广泛地应用到文件传输和网络编程中。!但本节讲述最基本的和流与 I/O 相关的功能。我们将通过一个个例子来学习这些功能。
159 1
|
Java 大数据
解析Java中的NIO与传统IO的区别与应用
解析Java中的NIO与传统IO的区别与应用

推荐镜像

更多