我想在单独的服务器上安装GitLab运行程序,但当我尝试连接到GitLab时,我收到以下消息:
Running in system-mode.
Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/):
<URL>
Please enter the gitlab-ci token for this runner:
<TOKEN>
Please enter the gitlab-ci description for this runner:
[<url>]: <description>
Please enter the gitlab-ci tags for this runner (comma separated):
Whether to lock Runner to current project [true/false]:
[false]:
ERROR: Registering runner... failed runner=<runner-token> status=couldn't execute POST against <url>/api/v4/runners: Post <url>/api/v4/runners: dial tcp 172.17.0.2:80: getsockopt: connection refused
ERROR: Checking GitLab compatibility... not-compatible reason=GitLab Runner >= 9.0 can be used ONLY with GitLab CE/EE >= 9.0 result=-1 runner=<runner-token> statusText=couldn't execute POST against <url>/api/v4/runners/verify: Post <url>/api/v4/runners/verify: dial tcp 172.17.0.2:80: getsockopt: connection refused
PANIC: Failed to register this runner. Perhaps you are having network problems 如果我从邮递员创建POST请求,我可以创建runner,但当我从gitlab-ci尝试时,我不能。你知道哪里出了问题吗?我们的Gitlab在另一台服务器上,我想将Gitlab和Gitlab-ci分开。我希望Gitlab-CI在单独的服务器上,而不是在Gitlab所在的同一服务器上。你知道怎么做吗?
发布于 2017-06-02 23:26:46
有两种可能的原因导致您的问题:
ERROR: Checking GitLab compatibility... not-compatible reason=GitLab Runner >= 9.0 can be used ONLY with GitLab CE/EE >= 9.0 result=-1中所述。检查您的GitLab实例版本,并确保您的运行器版本与it.Runners版本9.0及更高版本兼容。使用新的v4应用程序接口,至少需要GitLab 9.0。Gitlab problem:您的GitLab Runner无法访问GitLab服务器,原因是某些网络限制或某些阻塞。发生这种情况时,将显示上述相同的错误消息。尝试从GitLab运行程序服务器卷曲<url>/api/v4/runners/verify,以了解这是否是问题所在。
发布于 2017-06-09 19:36:57
是的,我解决了我的问题。问题是什么:我已经创建了docker-compose.yml文件,它看起来像这样:
web:
image: 'gitlab/gitlab-runner:latest'
restart: always
hostname: domain
container_name: gitlab-runner
volumes:
- '/storage/gitlab-runner/gitlab-runner/config:/etc/gitlab-runner'
- '/var/run/docker.sock:/var/run/docker.sock但是,当我尝试连接gitlab和gitlab ci时,我看到了这一行:Please enter the gitlab-ci description for this runner: [<url>]: <description>我收到了[<url>],但我必须收到随机的token和url。然后,我决定删除hostname: domain,并再次启动该过程。那么所有的工作都很好。因此,我的新docker-compose.yml文件如下所示:
web:
image: 'gitlab/gitlab-runner:latest'
restart: always
container_name: gitlab-runner
volumes:
- '/storage/gitlab-runner/gitlab-runner/config:/etc/gitlab-runner'
- '/var/run/docker.sock:/var/run/docker.sock现在,一切都运行良好。
https://stackoverflow.com/questions/44329905
复制相似问题