升级时在运行 gitlab-ctl reconfigure 之后,运行 gitlab-ctl restart 时出现重启 nginx 失败的提示:
timeout: down: nginx: 0s, normally up, want up
用 gitlab-ctl status 命令查看运行状态:
down: nginx: 0s, normally up, want up; run: log: (pid 720) 13756261s
nginx 的确没有启动起来。
查看 /var/log/gitlab/nginx/current 日志,日志中记录如下的错误:
[emerg] 18843#0: socket() [::]:80 failed (97: Address family not supported by protocol)
在 after 8.14 upgrade, system no longer accessable (ipv6?) 中找到了解决方法,在 /etc/gitlab/gitlab.rb 配置文件中添加下面的配置:
nginx['listen_addresses'] = ['*'] registry_nginx['listen_addresses'] = ['*']
添加之后需要重新运行 gitlab-ctl reconfigure 命令。