Jenkins 构建报错:index-pack died of signal 15

坦白背景

主要看到的报错内容是这一块

error: index-pack died of signal 15
11:18:19  fatal: index-pack failed
11:18:19  
11:18:19  	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2174)
11:18:19  	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1866)
11:18:19  	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:78)
11:18:19  	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:547)
11:18:19  	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:760)
11:18:19  	at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1152)
11:18:19  	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1192)
11:18:19  	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:124)
11:18:19  	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:93)
11:18:19  	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:80)
11:18:19  	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
11:18:19  	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
11:18:19  	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
11:18:19  	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
11:18:19  	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
11:18:19  	at java.lang.Thread.run(Thread.java:748)
11:18:19  [Pipeline] }
11:18:19  [Pipeline] // stage
11:18:19  [Pipeline] stage
11:18:19  [Pipeline] { (Deploy)
11:18:19  Stage "Deploy" skipped due to earlier failure(s)
11:18:19  [Pipeline] }
11:18:19  [Pipeline] // stage
11:18:19  [Pipeline] }
11:18:19  ERROR: Error cloning remote repo 'origin'

其实往上面翻一翻就可以看到精准的报错,是 clone 仓库的时候超时导致的

11:18:19  ERROR: Timeout after 10 minutes
11:18:19  ERROR: Error cloning remote repo 'origin'

去 gitlab 查看,发现这个仓库有 1.8G 那么大,git 和 jenkins 不在同一个公有云,带宽(只有1MB,实际均值在 500KiB/s)的限制,导致 10分钟根本拉不完

解决方案

方案一

让开发整理自己的 git 仓库,把仓库缩小

方案二

增加超时时间

pipeline - checkout scm

增加 extensions: [[$class: 'CloneOption', timeout: 60]] 指定超时时间,单位是分钟,默认是 10分钟

checkout scm: [$class: 'GitSCM', extensions: [[$class: 'CloneOption', timeout: 60]], userRemoteConfigs: [[credentialsId: 'deploy', url: "${GIT_URL}"]],  branches: [[name: "${GIT_BRANCH}"]]], poll: false
页面配置
  • jenkins项目 -> 配置(configure) -> git -> Additional Behaviours -> add -> advanced clone behaviours
    在这里插入图片描述
posted @   月巴左耳东  阅读(32)  评论(0编辑  收藏  举报  
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· AI与.NET技术实操系列(六):基于图像分类模型对图像进行分类
历史上的今天:
2021-04-23 Elasticsearch 7.12 启用 x-pack 组件
点击右上角即可分享
微信分享提示