詹金斯&标签越来越:待处理-尝试在非主节点上执行时,主服务器处于脱机状态 [英] jenkins & labels getting : pending—master is offline while trying to execute on non-master nodes

查看:421
本文介绍了詹金斯&标签越来越:待处理-尝试在非主节点上执行时,主服务器处于脱机状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Jenkins实例,在该实例中我无法使用标签,触发了构建,但是卡在了待定-主机离线"状态.我已禁用了主服务器(执行程序编号:0),因为我不想使用它.

I have a Jenkins instance where I am not able to use labels, builds are triggered but get stuck at "pending—master is offline". I have disabled the master (executor # : 0) as I do not wish to use it.

相反,我希望构建可以转到管道中提到的带有标签的下一个可用节点.

Instead I would expect the build to go to the next available node with the label mentioned in the pipeline.

node("mylabel"){
    echo " jenkins pipeline for mylabel nodes" 
 }

这可以在jenkins的全新安装中起作用,所以我只能假定这是我的主实例上的配置/兼容性问题.

This works in a clean install of jenkins so I can only assume this is a configuration/compatibility issue on my master instance.

可能是权限问题?

有关我的主实例的更多信息:

more info about my master instance :

  • 我过去曾经使用过nodeLabel(带有自由式作业),并已将其删除(并通过管理视图删除了作业中所有多余的指令).
  • 我正在使用基于角色的授权策略,并在jenkins中为每个项目定义了角色.
  • 请注意,我使用Jenkins 2.73.2位于防火墙后面(执行期间无法访问互联网)

另一种语法-观察到相同的问题.

EDIT 1: another syntax - same issue observed.

pipeline {
  agent{
         label "mylabel"
         echo " jenkins pipeline for mylabel node"
      }
}

推荐答案

我发现了发生此问题的原因,因为我无法使用上述管道绕过主节点.我了解在选择标签之前,需要有一个默认节点可用于运行指令.

I found the issue occurred because I am not able to bypass the master node using the above pipeline. I understand that before the label selection there is a need for a default node to be available to run instructions.

这篇关于詹金斯&标签越来越:待处理-尝试在非主节点上执行时,主服务器处于脱机状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆