首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >Jenkins Pipeline在触发远程作业时失败,并启用了选项"Block Build is“

Jenkins Pipeline在触发远程作业时失败,并启用了选项"Block Build is“
EN

Stack Overflow用户
提问于 2019-04-25 17:56:55
回答 1查看 1.6K关注 0票数 0

我创建了一个管道,它应该在不同的Jenkinsserver上触发一个作业。我使用远程触发器插件,并且能够使用以下语句触发Job (目前这是我的管道中唯一的语句):

代码语言:javascript
复制
triggerRemoteJob enhancedLogging: true, job: 'myJob', maxConn: 1,     remoteJenkinsName: 'MyJenkins'

但是,在Job被触发之后,管道尝试连接运行在localhost上的作业中的作业,这显然是失败的。

我试着禁用了一些选项,发现如果我禁用了blockBuildUntilComplete,它就可以工作了。

在启用了选项的情况下,我从日志中获得了以下内容:

代码语言:javascript
复制
##############################################################################    ##################################

  Parameterized Remote Trigger Configuration:

    - job:                     myJob 

    - remoteJenkinsName:       myJenkins

    - parameters:              

    - blockBuildUntilComplete: true

    - connectionRetryLimit:    5

################################################################################################################

Triggering non-parameterized remote job 'http://x.x.x.x:8080/job/myJob'

  Using globally defined 'Credentials Authentication' as user 'myUser' (Credentials ID 'myCredentials')

Triggering remote job now.

CSRF protection is disabled on the remote server.

  Remote job queue number: 47

Remote build started!

  Remote build URL: http://localhost:8080/job/myJob /8/

  Remote build number: 8

Blocking local job until remote job completes.

calling remote without locking...

Connection to remote server failed , waiting for to retry - 10 seconds until next attempt. URL: http://localhost:8080/job/myJob /8/api/json/, parameters: 

Retry attempt #1 out of 5

Connection to remote server failed , waiting for to retry - 10 seconds until next attempt. URL: http://localhost:8080/job/myJob /8/api/json/, parameters: 

Retry attempt #2 out of 5

Connection to remote server failed , waiting for to retry - 10 seconds until next attempt. URL: http://localhost:8080/job/myJob /8/api/json/, parameters: 

Retry attempt #3 out of 5

Connection to remote server failed , waiting for to retry - 10 seconds until next attempt. URL: http://localhost:8080/job/myJob /8/api/json/, parameters: 

Retry attempt #4 out of 5

Connection to remote server failed , waiting for to retry - 10 seconds until next attempt. URL: http://localhost:8080/job/myJob /8/api/json/, parameters: 

Retry attempt #5 out of 5

Max number of connection retries have been exeeded.

我更改了我的Jenkins-Server的名称和IP地址。

我必须在我的远程作业完成后执行一些步骤,这取决于它的结果。所以我必须等到这项工作完成。

有没有办法在没有block-option的情况下做到这一点,或者我必须做些什么才能让这个选项正常工作?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-04-29 15:41:50

我检查了插件的发布,我发现了3.0.8版本的一个改进,叫做“扩展POST超时和避免超时后重新发布”。我检查了这个变化,因为它看起来很好,就我们的问题而言,我更新了我们的插件(v3.0.7)到当前版本。现在错误不再出现。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/55846561

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档