跑步者不健康,将被禁用

Posted

技术标签:

【中文标题】跑步者不健康,将被禁用【英文标题】:Runner is not healthy and will be disabled 【发布时间】:2019-08-07 05:35:54 【问题描述】:

我使用gitlab.com 托管我的存储库,并在DigitalOcean 中安装runner。它运行良好,直到今天 16March2019 14:24 泰国时间。

# gitlab-runner status
Runtime platform                                    arch=amd64 os=linux pid=16937 revision=4745a6f3 version=11.8.0
gitlab-runner: Service is running!
# gitlab-runner unregister --all-runners
Runtime platform                                    arch=amd64 os=linux pid=16299 revision=4745a6f3 version=11.8.0
Running in system-mode.

WARNING: Unregistering all runners
ERROR: Unregistering runner from GitLab forbidden   runner=2bcd7af4
ERROR: Failed to unregister runner HerrRunner
# gitlab-runner list
Runtime platform                                    arch=amd64 os=linux pid=16346 revision=4745a6f3 version=11.8.0
Listing configured runners                          ConfigFile=/etc/gitlab-runner/config.toml
HerrRunner                                          Executor=shell Token=2bcd7af455f866ede7991992a68780 URL=https://gitlab.com/
# gitlab-runner --debug run
Runtime platform                                    arch=amd64 os=linux pid=16395 revision=4745a6f3 version=11.8.0
Starting multi-runner from /etc/gitlab-runner/config.toml ...  builds=0
Checking runtime mode                               GOOS=linux uid=0
Running in system-mode.

Configuration loaded                                builds=0
listenaddress: ""
sessionserver:
  listenaddress: ""
  advertiseaddress: ""
  sessiontimeout: 1800
metricsserveraddress: ""
concurrent: 1
checkinterval: 0
loglevel: null
logformat: null
user: ""
runners:
- name: HerrRunner
  limit: 0
  outputlimit: 0
  requestconcurrency: 0
  runnercredentials:
    url: https://gitlab.com/
    token: 2bcd7af455f866ede7991992a68780
    tlscafile: ""
    tlscertfile: ""
    tlskeyfile: ""
  runnersettings:
    executor: shell
    buildsdir: ""
    cachedir: ""
    cloneurl: ""
    environment: []
    preclonescript: ""
    prebuildscript: ""
    postbuildscript: ""
    shell: ""
    ssh: null
    docker: null
    parallels: null
    virtualbox: null
    cache:
      type: ""
      path: ""
      shared: false
      s3: null
      gcs: null
      s3cachepath: ""
      cacheshared: false
      serveraddress: ""
      accesskey: ""
      secretkey: ""
      bucketname: ""
      bucketlocation: ""
      insecure: false
    machine: null
    kubernetes: null
sentrydsn: null
modtime: 2018-08-12T18:07:07.963445119Z
loaded: true
  builds=0
Waiting for stop signal                             builds=0
Listen address not defined, metrics server disabled  builds=0
Listen address not defined, session server disabled  builds=0
Starting worker                                     builds=0 worker=0
Feeding runners to channel                          builds=0
Dialing: tcp gitlab.com:443 ...
ERROR: Checking for jobs... forbidden               runner=2bcd7af4
Feeding runners to channel                          builds=0
ERROR: Checking for jobs... forbidden               runner=2bcd7af4
Feeding runners to channel                          builds=0
ERROR: Checking for jobs... forbidden               runner=2bcd7af4
ERROR: Runner https://gitlab.com/2bcd7af455f866ede7991992a68780 is not healthy and will be disabled!
Feeding runners to channel                          builds=0
Feeding runners to channel                          builds=0
Feeding runners to channel                          builds=0
^CWARNING: Requested service stop: interrupt          builds=0
All workers stopped. Can exit now                   builds=0

终极目标

让我的亚军再次跑起来

问题:

    not healthy 是什么意思?

    我无法取消注册我的跑步者。如何解决这个问题?

【问题讨论】:

【参考方案1】:

不知道。但似乎gitlab.com 删除了我的跑步者令牌。因此,我必须删除我的跑步者,注册并再次运行它。

【讨论】:

【参考方案2】:

我是第一次集成我的跑步者,任何熟悉 gitlab 的人都会知道这绝不会是在公园里散步。我花了很多时间追查这个错误信息,却发现我完全看错了方向。

ERROR: Checking for jobs... forbidden               runner=s3xBVnW8
ERROR: Checking for jobs... forbidden               runner=s3xBVnW8
ERROR: Checking for jobs... forbidden               runner=s3xBVnW8
ERROR: Runner https://gitlab.com/s3xBVnW8JZPTaocALN3i is not healthy and will be disabled!

我现在相信我的跑步者告诉我 gitlab.com 上的“跑步者”不健康并且已被拒绝(被我的跑步者)。当我让它运行并放入管道作业时,它处理得很好,最后没有问题,我花了几个小时寻找任何东西!

【讨论】:

我也遇到了同样的问题,找到答案了吗?【参考方案3】:

我遇到了同样的问题。按照安装说明中的说明注册您的跑步者。转到admin/runners 并单击Show runner installation instructions 按钮。最重要的是Register runner 会话,您必须在其中运行register 命令来解决所描述的问题。比如linux:

sudo gitlab-runner register --url YOUR_GITLAB_SERVER_URL --registration-token TOKEN

# YOUR_GITLAB_SERVER_URL like http://localhost:8100/ or https://mygitlabserver.com/

按照说明进行操作即可。

一旦您的跑步者设置并运行,您可以向配置文件添加修改,在配置更改后停止并重新启动它。

您可能会发现重复的[[runners]] 部分,如果您尝试自己配置它然后使用register 命令会发生这种情况。没关系,只留下一个最新的。

【讨论】:

以上是关于跑步者不健康,将被禁用的主要内容,如果未能解决你的问题,请参考以下文章

关爱程序猿健康,从跑步做起

从地球到月球 蒙牛“跑步”助推大健康战略

#打卡不停更#家庭健康管理平台

Google Health将被解散,谷歌为何折戟于医疗健康?

Google Health将被解散,谷歌为何折戟于医疗健康?

达到分数后如何增加健康