【问题标题】:Jenkins BUILD FAILED/CANCELLED on openshiftJenkins在openshift上构建失败/取消
【发布时间】:2015-11-28 03:36:11
【问题描述】:

我在使用 jenkins 将新代码推送到我的 openshift 应用程序时遇到问题。我已经从 Web 控制台管理员启用了 jenkins,它可以工作(没有自定义设置)。但是,在将新更改推送到我的应用程序之前,我必须至少推送 2 次。
我有青铜计划。我使用 3 个应用程序(主应用程序、数据库应用程序、jenkins),在推送时,jenkins 创建了第 4 个应用程序。
推送新版本的应用程序需要很长时间,因为每次推送后我都会升级搜索索引。当我第一次推送时,这就是我得到的:

git push origin
Counting objects: 38, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (18/18), done.
Writing objects: 100% (20/20), 2.33 KiB | 0 bytes/s, done.
Total 20 (delta 15), reused 0 (delta 0)
remote: Syncing git content to other proxy gears
remote: Executing Jenkins build.
remote: 
remote: You can track your build at https://jenkins-myapp.rhcloud.com/job/digrin-build
remote: 
remote: Waiting for build to schedule.....................................................................
remote: **BUILD FAILED/CANCELLED**
remote: Please see the Jenkins log for more details via 'rhc tail'
remote: !!!!!!!!
remote: Deployment Halted!
remote: If the build failed before the deploy step, your previous
remote: build is still running.  Otherwise, your application may be
remote: partially deployed or inaccessible.
remote: Fix the build and try again.
remote: !!!!!!!!
remote: An error occurred executing 'gear postreceive' (exit code: 1)
remote: Error message: CLIENT_ERROR: Failed to execute: 'control post-receive' for /var/lib/openshift/55a0310e4...4/jenkins-client
remote: 
remote: For more details about the problem, try running the command again with the '--trace' option.

这是我的第二次推送:

$ git push origin
Counting objects: 11, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 481 bytes | 0 bytes/s, done.
Total 6 (delta 5), reused 0 (delta 0)
remote: Syncing git content to other proxy gears
remote: Executing Jenkins build.
remote: 
remote: You can track your build at https://jenkins-myapp.rhcloud.com/job/digrin-build
remote: 
remote: Waiting for build to schedule......Done
remote: Waiting for job to complete.............................................................................................................................................................................Retrying job 3 lookup....Done.
remote: .................................Retrying job 3 lookup....Done.
remote: ............................................................................................Retrying job 3 lookup....Done.
remote: ..................................................Retrying job 3 lookup....Done.
remote: ................................................................Retrying job 3 lookup....Done.
remote: ........................................Retrying job 3 lookup....Done.
remote: ........Retrying job 3 lookup....Done.
remote: ..................................Retrying job 3 lookup....Done.
remote: .........................................................................................................Retrying job 3 lookup....Done.
remote: .....Retrying job 3 lookup....Done.
remote: ...............................................................................................................Done
remote: SUCCESS
remote: New build has been deployed.
remote: -------------------------
remote: Git Post-Receive Result: success
remote: Deployment completed with status: success
To ssh://55a000094@digrin-myapp.rhcloud.com/~/git/digrin.git/
   af390d4..f47120e  master -> master

为什么我的第一次推送总是失败?我在 rhc tail myapp 中没有看到任何关于 jenkins 的错误

【问题讨论】:

  • 尝试登录到您的 Jenkins Web 控制台并查看构建日志以查看是否有任何更有用的信息可用于确定问题,或在此处发布以供其他人尝试帮助您.
  • 我只看到了 4 个构建并且都成功了。我会在下次推送时检查控制台日志。也许詹金斯完成了工作,但 git 引发错误?
  • 我尝试再次将新版本推送到 openshift。第一次推送同样的错误。 Jenkins 日志为空,我在 jenkins Web 控制台的任何地方都看不到新版本。

标签: jenkins openshift


【解决方案1】:

当我push first提交时,它会大喊BUILD FAILED/CANCELLED。在第二次推动它是成功的。如果我在第二次之后立即进行第三次推动,这也是成功的。几乎就像詹金斯应用程序会休眠,但它不能。我有青铜计划,我尝试加载 jenkins url,所以我确定 jenkins 应用程序正在运行。
我能想到的第一次推送失败的唯一可能原因是我有 16 个应用程序中的 3 个,并且可能第 4 个应用程序创建时间太长,并且 Jenkins 没有等待并以错误结束。

所以每次我想要推送我的应用的新版本时,我都会继续推送两次而不是一次。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-02-24
    • 2018-02-22
    • 1970-01-01
    相关资源
    最近更新 更多