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】按钮,等待页面刷新即可。
相关文章
|
10月前
|
敏捷开发 测试技术 API
测试金字塔:构建高效自动化测试策略的基石
测试金字塔:构建高效自动化测试策略的基石
692 116
|
10月前
|
设计模式 前端开发 测试技术
告别脆弱:构建稳定UI自动化测试的3个核心策略
告别脆弱:构建稳定UI自动化测试的3个核心策略
872 113
|
10月前
|
测试技术 持续交付 API
测试的艺术:掌握测试金字塔,构建高效测试策略
测试的艺术:掌握测试金字塔,构建高效测试策略
517 77
|
10月前
|
人工智能 算法 Java
Java与AI驱动区块链:构建智能合约与去中心化AI应用
区块链技术和人工智能的融合正在开创去中心化智能应用的新纪元。本文深入探讨如何使用Java构建AI驱动的区块链应用,涵盖智能合约开发、去中心化AI模型训练与推理、数据隐私保护以及通证经济激励等核心主题。我们将完整展示从区块链基础集成、智能合约编写、AI模型上链到去中心化应用(DApp)开发的全流程,为构建下一代可信、透明的智能去中心化系统提供完整技术方案。
577 3
|
10月前
|
测试技术 API 数据库
测试金字塔:构建高效自动化测试策略的基石
测试金字塔:构建高效自动化测试策略的基石
688 114
|
10月前
|
设计模式 消息中间件 传感器
Java 设计模式之观察者模式:构建松耦合的事件响应系统
观察者模式是Java中常用的行为型设计模式,用于构建松耦合的事件响应系统。当一个对象状态改变时,所有依赖它的观察者将自动收到通知并更新。该模式通过抽象耦合实现发布-订阅机制,广泛应用于GUI事件处理、消息通知、数据监控等场景,具有良好的可扩展性和维护性。
684 8
|
10月前
|
机器学习/深度学习 人工智能 自然语言处理
Java与生成式AI:构建内容生成与创意辅助系统
生成式AI正在重塑内容创作、软件开发和创意设计的方式。本文深入探讨如何在Java生态中构建支持文本、图像、代码等多种生成任务的创意辅助系统。我们将完整展示集成大型生成模型(如GPT、Stable Diffusion)、处理生成任务队列、优化生成结果以及构建企业级生成式AI应用的全流程,为Java开发者提供构建下一代创意辅助系统的完整技术方案。
461 10
|
10月前
|
人工智能 自然语言处理 JavaScript
Playwright MCP在UI回归测试中的实战:构建AI自主测试智能体
Playwright MCP结合AI智能体,革新UI回归测试:通过自然语言驱动浏览器操作,降低脚本编写门槛,提升测试效率与覆盖范围。借助快照解析、智能定位与Jira等工具集成,实现从需求描述到自动化执行的闭环,推动测试迈向智能化、民主化新阶段。
|
10月前
|
人工智能 Java 物联网
Java与边缘AI:构建离线智能的物联网与移动应用
随着边缘计算和终端设备算力的飞速发展,AI推理正从云端向边缘端迁移。本文深入探讨如何在资源受限的边缘设备上使用Java构建离线智能应用,涵盖从模型优化、推理加速到资源管理的全流程。我们将完整展示在Android设备、嵌入式系统和IoT网关中部署轻量级AI模型的技术方案,为构建真正实时、隐私安全的边缘智能应用提供完整实践指南。
657 3
|
10月前
|
机器学习/深度学习 人工智能 监控
Java与AI模型部署:构建企业级模型服务与生命周期管理平台
随着企业AI模型数量的快速增长,模型部署与生命周期管理成为确保AI应用稳定运行的关键。本文深入探讨如何使用Java生态构建一个企业级的模型服务平台,实现模型的版本控制、A/B测试、灰度发布、监控与回滚。通过集成Spring Boot、Kubernetes、MLflow和监控工具,我们将展示如何构建一个高可用、可扩展的模型服务架构,为大规模AI应用提供坚实的运维基础。
699 0

推荐镜像

更多