Jenkins CICD过程常见异常

news2025/5/22 23:36:18

1 Status [126]

Exception when publishing, exception message [Exec exit status not zero. Status [126]

1.1 报错日志

SSH: EXEC: STDOUT/STDERR from command [/app/***/publish.sh] ...
bash: /app/***/publish.sh: Permission denied
SSH: EXEC: completed after 200 ms
SSH: Disconnecting configuration [***] ...
ERROR: Exception when publishing, exception message [Exec exit status not zero. Status [126]]
Build step 'Send build artifacts over SSH' changed build result to UNSTABLE
Finished: UNSTABLE

1.2 原因

Jenkins调用的脚本文件权限不够

1.3 解决方案

chmod增加权限

chmod 777 publish.sh

2 Status [127]

Exception when publishing, exception message [Exec exit status not zero. Status [127]]

2.1 报错日志

SSH: EXEC: STDOUT/STDERR from command [/app/***/publish.sh] ...
bash: /app/***/publish.sh: No such file or directory
SSH: EXEC: completed after 200 ms
SSH: Disconnecting configuration [***] ...
ERROR: Exception when publishing, exception message [Exec exit status not zero. Status [127]]
Build step 'Send build artifacts over SSH' changed build result to UNSTABLE
Finished: UNSTABLE

2.2 原因

脚本文件目录错误

2.3 解决方案

将Jenkins配置中的脚本目录地址改正确。

当 SSH Server 中配置Remote Directory后:

  • Remote directory 填写相对地址
  • Exec command 填写绝对地址

3 ERROR: Error cloning remote repo ‘origin’

3.1 报错日志

Cloning the remote Git repository
Cloning repository http://****:3000/***/***.git

 > /usr/bin/git init /home/jenkins/workspace/*** # timeout=10
 > Fetching upstream changes from http://****:3000/***/***.git
 > /usr/bin/git --version # timeout=10
 > using GIT_ASKPASS to set credentials 
 > /usr/bin/git fetch --tags --progress http://****:3000/***/***.git +refs/heads/*:refs/remotes/origin/*
 > ERROR: Error cloning remote repo 'origin'
 > hudson.plugins.git.GitException: Command "/usr/bin/git fetch --tags --progress http://****:3000/***/***.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
 > stdout: 
 > stderr: fatal: unable to access 'http://****:3000/***/***.git/': The requested URL returned error: 500

	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2042)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1761)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$400(CliGitAPIImpl.java:72)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:442)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:655)
	at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1152)
	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1192)
	at hudson.scm.SCM.checkout(SCM.java:504)
	at hudson.model.AbstractProject.checkout(AbstractProject.java:1208)
	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)
	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
	at hudson.model.Run.execute(Run.java:1810)
	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:429)

ERROR: Error cloning remote repo 'origin'
SSH: Current build result is [FAILURE], not going to run.
Finished: FAILURE

3.2 原因

从描述信息来看,是无法拉取远程代码,之前明明是好正常的,怎么突然一下就不行了呢?那你想想,是不是最近负责这个项目的人离职了,O(∩_∩)O哈哈~
这个原因主要是 Git 用户被注销了,无法通过该用户获取 Git 代码。

3.3 解决方案

从【配置】中,找到配置 Git 远程地址的地方,下图中会报红,将【Credentials】改成自己的用户就可以了。

4 ERROR: Exception when publishing, exception message [Failure]

4.1 报错日志

Waiting for Jenkins to finish collecting data
[JENKINS] Archiving /home/jenkins/workspace/***/pom.xml to ***/***/0.0.1-SNAPSHOT/***-0.0.1-SNAPSHOT.pom
[JENKINS] Archiving /home/jenkins/workspace/***/target/***-0.0.1-SNAPSHOT.jar to ***/***/0.0.1-SNAPSHOT/***-0.0.1-SNAPSHOT.jar
channel stopped
SSH: Connecting from host [****]
SSH: Connecting with configuration [****] ...
SSH: Disconnecting configuration [] ...
ERROR: Exception when publishing, exception message [Failure]
Build step 'Send build artifacts over SSH' changed build result to UNSTABLE
Finished: UNSTABLE

4.2 原因

发生这个错误,一般是磁盘空间不足了,这种情况在测试环境比较常见(毕竟生产环境会有监控提醒的)!

4.3 解决

查询磁盘使用情况命令:

df -h

使用删除文件命令,删掉多余日志:

rm -rf file

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1192446.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

【ElasticSearch系列-06】Es集群架构的搭建以及集群的核心概念

ElasticSearch系列整体栏目 内容链接地址【一】ElasticSearch下载和安装https://zhenghuisheng.blog.csdn.net/article/details/129260827【二】ElasticSearch概念和基本操作https://blog.csdn.net/zhenghuishengq/article/details/134121631【三】ElasticSearch的高级查询Quer…

uniapp vue2 vuex 持久化

1.vuex的使用 一、uniapp中有自带vuex插件,直接引用即可 二、在项目中新建文件夹store,在main.js中导入 在根目录下新建文件夹store,在此目录下新建index.js文件 index.js import Vue from vueimport Vuex from vuexVue.use(Vuex)const store new Vuex.Store(…

客户服务质量提升的三种思路

客户服务质量是企业在市场竞争中立于不败之地的重要因素之一,优秀的客户服务不仅可以提高客户满意度,还可以提高客户黏度和回头率。随着经济的发展,客户服务行业也在不断发展壮大。在这个竞争激烈的行业中,企业如何提高客户服务质…

如何自己实现一个丝滑的流程图绘制工具(九) 自定义连接线

背景 产品又有更近的想法了,bpmn-js的连接线你用的时候是看不到的,也就是你从左侧点击连接线的没有线随鼠标移动. 但是产品想要看得见的连接线移动拖拽。 咩有办法,不能换框架,那就只能自己实现啦! 思路: …

多维详述MediaBox互动直播AUI Kit低代码开发方案

本专栏将分享阿里云视频云MediaBox系列技术文章,深度剖析音视频开发利器的技术架构、技术性能、开发能效和最佳实践,一起开启音视频的开发之旅。本文为MediaBox最佳实践篇,重点从互动直播AUI Kit的核心能力、技术架构、快速集成等方面&#x…

【Word自定义配置,超简单,图文并茂】自定义Word中的默认配置,比如标题大小与颜色(参考科研作图配色),正文字体等

▚ 01 自定义样式Styles中的默认标题模板 📢自定义标题的显示效果,如下图所示: 1.1 自定义标题的模板Normal.dotm 1.1.1 选择所需修改的标题 新建一个空白Word文档,依次选择菜单栏的开始Home,样式Styles,…

2023最新版本 FreeRTOS教程 -10-事件组(通过5种情况快速上手)

事件组对应单个事件触发或多个事件同时触发的场景 创建事件组函数 EventGroupHandle_t xEventGroupCreate( void );删除事件组函数 void vEventGroupDelete( EventGroupHandle_t xEventGroup )设置事件 在任务中使用xEventGroupSetBits() 在中断中使用xEventGroupSetBits…

注解和反射实现Excel导入导出

目录 使用实例 定义三个注解 /*** 设置允许导出*/ @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) public @interface EnableExport {String fileName();} /*** 设置该字段允许导出* 并且可以设置宽度*/ @Target(ElementType.FIELD) @Retention(RetentionP…

高级算法复习

时间代价 主定理 递归树 排序 贪心算法 贪心选择性(Greedy-choice property): 通过做出局部最优(贪婪)选择,可以得出全局最优解——这是贪心算法可行的第一个基本要素,也是贪心算法与动态规划…

使用Nginx和Spring Gateway为SkyWalking的增加登录认证功能

文章目录 1、使用Nginx增加认证。2、使用Spring Gateway增加认证 SkyWalking的可视化后台是没有用户认证功能的,默认下所有知道地址的用户都能访问,官网是建议通过网关增加认证。 本文介绍通过Nginx和Spring Gateway两种方式 1、使用Nginx增加认证。 生…

用 winget 在 Windows 上安装 kubectl

目录 kubectl 是什么? 安装 kubectl 以管理员身份打开 PowerShell 使用 winget 安装 kubectl 测试一下,确保安装的是最新版本 导航到你的 home 目录: 验证 kubectl 配置 kubectl 是什么? kubectl 是 Kubernetes 的命令行工…

【C#】Mapster对象映射的使用

系列文章 【C#】编号生成器(定义单号规则、固定字符、流水号、业务单号) 本文链接:https://blog.csdn.net/youcheng_ge/article/details/129129787 【C#】日期范围生成器(开始日期、结束日期) 本文链接:h…

Sectigo SSL

Sectigo(前身为ComodoCA)是全球在线安全解决方案提供商和全球最大的证书颁发机构。为了强调其在SSL产品之外的扩张,Comodo在2018年更名为Sectigo。新名称减少了市场混乱,标志着公司向创新的全方位网络安全解决方案提供商过渡。 S…

openEuler 系统使用 Docker Compose 容器化部署 Redis Cluster 集群

openEuler 系统使用 Docker Compose 容器化部署 Redis Cluster 集群 Redis 的多种模式Redis-Alone 单机模式Redis 单机模式的优缺点 Redis 高可用集群模式Redis-Master/Slaver 主从模式Redis-Master/Slaver 哨兵模式哨兵模式监控的原理Redis 节点主客观下线标记Redis 节点主客观…

UnoCSS框架常用语法

文章目录 🍉vscode 开发插件🍉设置边框颜色🍉设置宽、高、背景色、外边距🍉设置flex🍉设置元素在滚动时固定在指定区域内🍉vscode 开发插件 vscode 开发建议安装 UnoCSS插件 🍉设置边框颜色 border-[color]: 设置边框的颜色,[color]可以是预设的颜色名称(如…

自学考试到底难不难?

自学考试难度谈不上大,其难度系数本身并不高,然而有几个难点,需要克服。 #自学#首先,要具备较强的信息搜集能力。zbb990101 从报名到毕业,考生需要主动关注各类考试动态,如专业选择、报名流程、采购教材、…

React【axios、全局处理、 antd UI库、更改主题、使用css module的情况下修改第三方库的样式、支持sass less】(十三)

文件目录 Proxying in Development http-proxy-middleware fetch_get fetch 是否成功 axios 全局处理 antd UI库 更改主题 使用css module的情况下修改第三方库的样式 支持sass & less Proxying in Development 在开发模式下,如果客户端所在服务器跟后…

Java poi给docx中的关键字标记颜色

Java poi给docx中的关键字标记颜色 <dependency><groupId>org.apache.poi</groupId><artifactId>poi</artifactId><version>4.1.2</version></dependency><dependency><groupId>org.apache.poi</groupId>&l…

k8s 部署mqtt —— 筑梦之路

mqtt是干嘛的&#xff0c;网上有很多资料&#xff0c;这里就不再赘述。 --- apiVersion: apps/v1 kind: Deployment metadata:labels:app: mqttname: mqttnamespace: default spec:replicas: 1selector:matchLabels:app: mqttstrategy:rollingUpdate:maxSurge: 25%maxUnavaila…

鲁大师10月新机性能/流畅/久用榜:骁龙8 Gen3一鸣惊人,双十一“6系”处理器成井喷状态

刚刚过去的10月份手机圈可谓是热闹纷呈,要数量有数量,要新品有新品,要旗舰有旗舰,要走量也有走量。10月份的大部分光芒,毫无疑问都将被骁龙8 Gen3以及重夺骁龙旗舰首发的小米 14系列身上。 骁龙8 Gen3毫无疑问,代表着骁龙旗舰处理器的又一个巅峰,从目前鲁大师后台抓取到的数据…