fatal: The remote end hung up unexpectedlyfatal: early EOFfatal: 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), killingE, [2014-12-06T09:13:10.336186 #11074] ERROR -- : reaped #<Process::Status: pid 11091 SIGKILL (signal 9)>worker=0I, [2014-12-06T09:13:10.340379 #11183] INFO -- : worker=0 spawned pid=11183I, [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 secondstimeout 30
改为
# What the timeout for killing busy workers is, in secondstimeout 60
最后,运行
sudo systemctl restart gitlab-runsvdir.service
重启Gitlab。
之后客户端就可以正常Git pull或者clone了