首页 > 其他分享 >Git runner 返回报错: status=couldn't execute POST against dial tcp: lookup gitlab on xxxx:53: serve

Git runner 返回报错: status=couldn't execute POST against dial tcp: lookup gitlab on xxxx:53: serve

时间:2024-04-25 11:45:35浏览次数:12  
标签:status execute runner gitlab 53 server 报错 DNS

当发现Gitlab 上的runner显示出runner offline的问题时

1 查一下git runner的报错

runner=xxxx status=couldn't execute POST against https://gitlab/api/v4/jobs/request: Post https://gitlab/api/v4/jobs/request: dial tcp: lookup git on x.x.x.x:53: server misbehaving

根据报错server misbehaving 我们可以了解到,git runner尝试向GitLab的API发送POST请求时,DNS查询失败,或者找到的服务器行为异常。
这种情况一般是在本机的DNS客户机配置文件:/etc/resolv.conf中添加过配置导致的,有可能是DNS服务器地址有变动。
也有可能是/etc/hosts文件中的地址配置导致的,本报错是因为DNS服务器地址有变动。

2 查看本机的DNS设置

查看gitlab的DNS记录的准确地址,确认DNS记录是否准确。

nslookup gitlab
Server:     o.o.o.o
Address:    o.o.o.o#53

如果x.x.x.x与o.o.o.o不一致,可以到/etc/resolv.conf里修改

search  xxxxx //search : 定义域名的搜索列表
nameserver      o.o.o.o  // nameserver: 定义DNS服务器的IP地址

更改后重启git runner, 报错消失。

标签:status,execute,runner,gitlab,53,server,报错,DNS
From: https://www.cnblogs.com/rinya09/p/18157266

相关文章