阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

解决Gitlab的The remote end hung up unexpectedly错误

116次阅读
没有评论

共计 1269 个字符,预计需要花费 4 分钟才能阅读完成。

Gitlab 服务器环境是 CentOS7+Gitlab7.2.1,最近发现在开发机上使用 git pull 更新文件时,会报如下错误。

fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: unpack-objects failed

使用 git clone 重新 checkout 源也受到影响,长时间 checkout 不出来,

Google 了半天也没找到个好办法,最后还是查错误日志定位到了问题

在 /var/log/gitlab/unicorn/unicorn_stderr.log 中,发现如下的错误信息

E, [2014-12-06T09:13:10.319216 #11074] ERROR — : worker=0 PID:11091 timeout (31s > 30s), killing
E, [2014-12-06T09:13:10.336186 #11074] ERROR — : reaped #<Process::Status: pid 11091 SIGKILL (signal 9)> worker=0
I, [2014-12-06T09:13:10.340379 #11183]  INFO — : worker=0 spawned pid=11183
I, [2014-12-06T09:13:10.340848 #11183]  INFO — : worker=0 read

看来是被 Ruby 误认为超时中断了。解决办法就是调大 unicorn 的 timeout 值。

修改 /var/opt/gitlab/gitlab-rails/etc/unicorn.rb,将

# What the timeout for killing busy workers is, in seconds
timeout 30

改为

# What the timeout for killing busy workers is, in seconds
timeout 60

最后,运行

sudo systemctl restart gitlab-runsvdir.service

重启 Gitlab。

之后客户端就可以正常 Git pull 或者 clone 了

在 Ubuntu 12.04 上安装 GitLab http://www.linuxidc.com/Linux/2012-12/75249.htm

GitLab 5.3 升级注意事项 http://www.linuxidc.com/Linux/2013-06/86473.htm

在 CentOS 上部署 GitLab (自托管的 Git 项目仓库) http://www.linuxidc.com/Linux/2013-06/85754.htm

在 RHEL6/CentOS6/ScientificLinux6 上安装 GitLab 6.0.2 http://www.linuxidc.com/Linux/2014-03/97831.htm

CentOS 6.5 安装 GitLab 教程及相关问题解决 http://www.linuxidc.com/Linux/2014-05/101526.htm

GitLab 的详细介绍 :请点这里
GitLab 的下载地址 :请点这里

正文完
星哥说事-微信公众号
post-qrcode
 
星锅
版权声明:本站原创文章,由 星锅 2022-01-20发表,共计1269字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中