记一次gitlab–500故障处理

打开gitlab首页一个大大的500展示在首页

2、在百度等查看了各种攻略一一尝试均失败了

比如:重置并启动GitLab

gitlab-ctl reconfigure

gitlab-ctl restart

Redis仍然无法正常运行

3、查看production.log日志

tail -f /var/log/gitlab/gitlab-rails/production.log

出现如下错误日志

Started GET "/-/metrics" for 127.0.0.1 at 2021-10-08 09:32:10 +0800

Errno::EAGAIN (Resource temporarily unavailable – connect(2) for /var/opt/gitlab/redis/redis.socket):

config/initializers/rack_attack_git_basic_auth.rb:7:in block in <top (required)>'</p><p style="margin-top: 1.4em; margin-bottom: 1.4em; color: rgb(18, 18, 18); font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", "WenQuanYi Micro Hei", sans-serif; font-size: medium; white-space: normal; background-color: rgb(255, 255, 255);">lib/gitlab/request_context.rb:18:in call'

lib/gitlab/metrics/requests_rack_middleware.rb:27:in `call'

4、查看Redis的进程,ps -ef|grep redis出现如下错误

root 1075 1 0 Aug11 ? 00:07:17 runsvdir -P /opt/gitlab/service log: ies. svlogd: warning: unable to lock directory: /var/log/gitlab/redis: temporary failure svlogd: fatal: no functional log directories. svlogd: warning: unable to lock directory: /var/log/gitlab/redis: temporary failure svlogd: fatal: no functional log directories. svlogd: warning: unable to lock directory: /var/log/gitlab/redis: temporary failure svlogd: fatal: no functional log directories.

5、用试一试的态度,杀死异常的Redis进程然后重启试试

kill -9 1075

gitlab-ctl start redis

竟然成功了

6、然后重置和重启gitlab

gitlab-ctl reconfigure

gitlab-ctl restart

7、成功

参考文档:

gitlab启动后页面报500,redis出现timeout(Redis::CannotConnectError)_新进java程序猿的博客-CSDN博客

暂无评论

发送评论 编辑评论


				
上一篇
下一篇