Continuous integration Gitlab CI-注册运行程序失败
我已经从源代码安装了gitlab安装,使用letsencrypt保护它,并在Continuous integration Gitlab CI-注册运行程序失败,continuous-integration,gitlab,gitlab-ci,gitlab-ci-runner,gitlab-8,Continuous Integration,Gitlab,Gitlab Ci,Gitlab Ci Runner,Gitlab 8,我已经从源代码安装了gitlab安装,使用letsencrypt保护它,并在https://gitlab.mydomain.com。我可以访问该网站并创建存储库等,但我找不到为安装注册gitlab ci runner的方法 Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/ci): https://gitlab.mydomain.com/ci Please enter the gitlab-ci token f
https://gitlab.mydomain.com
。我可以访问该网站并创建存储库等,但我找不到为安装注册gitlab ci runner的方法
Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/ci):
https://gitlab.mydomain.com/ci
Please enter the gitlab-ci token for this runner:
xxxxxxxx-xxxxxxxx
Please enter the gitlab-ci description for this runner:
[server]: test
Please enter the gitlab-ci tags for this runner (comma separated):
test
ERROR: Registering runner... failed runner=xxxxxxx
status=couldn't execute POST against https://gitlab.mydomain.com/ci/api/v1/runners/register.json:
Post https://gitlab.mydomain.com/ci/api/v1/runners/register.json:
read tcp [ipv6address]:33518->[ipv6address]:443: read: connection reset by peer
PANIC: Failed to register this runner. Perhaps you are having network problems
我的gitlab系统工作正常,我真的没有解释为什么会有一个连接被对等方重置。当我试图直接从错误消息中卷曲地址时,它会返回正确的响应
curl -v https://gitlab.mydomain.com/ci/api/v1/runners/register.json
* Trying ipv6address...
* Connected to gitlab.mydomain.com (ipv6address) port 443 (#0)
* found 174 certificates in /etc/ssl/certs/ca-certificates.crt
* found 700 certificates in /etc/ssl/certs
* ALPN, offering h2
* ALPN, offering http/1.1
* SSL connection using TLS1.2 / ECDHE_RSA_AES_256_GCM_SHA384
* server certificate verification OK
* server certificate status verification SKIPPED
* common name: mydomain.com (matched)
* server certificate expiration date OK
* server certificate activation date OK
* certificate public key: RSA
* certificate version: #3
* subject: CN=mydomain.com
* start date: Wed, 18 May 2016 14:35:00 GMT
* expire date: Tue, 16 Aug 2016 14:35:00 GMT
* issuer: C=US,O=Let's Encrypt,CN=Let's Encrypt Authority X3
* compression: NULL
* ALPN, server did not agree to a protocol
> GET /ci/api/v1/runners/register.json HTTP/1.1
> Host: gitlab.mydomain.com
> User-Agent: curl/7.47.0
> Accept: */*
>
< HTTP/1.1 405 Method Not Allowed
< Server: nginx
< Date: Sun, 29 May 2016 09:14:09 GMT
< Content-Type: application/json
< Content-Length: 2
< Connection: keep-alive
< Allow: OPTIONS, POST
< Cache-Control: no-cache
< Status: 405 Method Not Allowed
curl-vhttps://gitlab.mydomain.com/ci/api/v1/runners/register.json
*正在尝试IPv6地址。。。
*已连接到gitlab.mydomain.com(ipv6address)端口443(#0)
*在/etc/ssl/certs/ca-certificates.crt中找到174个证书
*在/etc/ssl/certs中找到700个证书
*阿尔卑斯山,提供h2
*ALPN,提供http/1.1
*使用TLS1.2/ECDHE_RSA_AES_256_GCM_SHA384的SSL连接
*服务器证书验证正常
*已跳过服务器证书状态验证
*通用名称:mydomain.com(匹配)
*服务器证书到期日期确定
*服务器证书激活日期确定
*证书公钥:RSA
*证书版本:#3
*主题:CN=mydomain.com
*开始日期:2016年5月18日星期三14:35:00 GMT
*到期日期:2016年8月16日星期二14:35:00 GMT
*发卡机构:C=US,O=Let's Encrypt,CN=Let's Encrypt Authority X3
*压缩:空
*ALPN,服务器不同意协议
>GET/ci/api/v1/runners/register.json HTTP/1.1
>主机:gitlab.mydomain.com
>用户代理:curl/7.47.0
>接受:*/*
>
将gitlab更新为8.8.3
并将gitlab multi-ci runner
更新为最新版本后,问题消失了
我还从头开始了gitlab nginx配置文件
最后,我不知道哪一个更改准确地解决了问题。到目前为止,我有很多错误和问题,从错误404、403开始,以post请求问题结束 对我来说,问题似乎是 解决方案(发布后相同)是安装旧版本的ci runner:
sudo apt install gitlab ci multi-runner=1.11.1
我通过安装gitlab ci multi-runner=1.11.1
解决了这个问题。如果运行程序和gitlab运行在同一台主机上,您可以输入第一个问题,而不是文档中给出的问题:
http://gitlab:port
其中,gitlab是容器名称,port是容器的左端口号。如果您使用的是gitlab内部ssl证书,请指定https而不是http。当我得到它时,这总能解决这个问题。对于使用docker的用户: 这个问题是关于docker网络的 如果你尝试
"$docker container inspect $id"
您将看到gitlab容器的IP地址
指向第一个问题上的ip地址就可以了。你能发布你的跑步者配置吗?@HuiWang-它只有一行
concurrent=1
。我认为这是因为创建配置的过程失败,出现了上述错误。请查看此链接@HuiWang-我不知道我必须将letsencrypt的哪个证书存储在请求的位置。我尝试将我的fullchain.pem
复制到/etc/gitlab runner/gitlab.mydomain.com.crt
,但仍然出现错误。当我使用--debug
时,它说正在尝试加载/etc/gitlab runner/certs/gitlab.mydomain.com.crt代码>但没有更多。我尝试了,但对我无效。仍然收到错误错误:注册跑步者。。。失败的运行程序=pcT3WTf5状态=无法对执行POSThttp://gitlab.com/api/v4/runners: 邮递https://gitlab.com:443/api/v4/runners: x509:由未知权限签署的证书:注册此运行程序失败。可能您有网络问题
,在您的情况下,它看起来像HTTPS和证书问题。使用某些受信任的机构(如Lets encrypt)或手动添加用于将证书签名为受信任的CA。这应该是有帮助的