美文网首页
docker搭建gitlab服务器搭建502错误处理

docker搭建gitlab服务器搭建502错误处理

作者: maohh | 来源:发表于2021-06-08 01:25 被阅读0次

    gitlab服务器一直502

    问题:

    502 Whoops, GitLab is taking too much time to respond.

    502报错

    解决方案:

    ## 进入容器
    docker exec -it gitlab /bin/bash
    
    ## 查看状态
    cd /usr/bin
    gitlab-ctl status
    >>>>>>
    run: gitaly: (pid 466) 1041s; run: log: (pid 465) 1041s
    run: gitlab-monitor: (pid 484) 1041s; run: log: (pid 481) 1041s
    run: gitlab-workhorse: (pid 470) 1041s; run: log: (pid 469) 1041s
    run: logrotate: (pid 478) 1041s; run: log: (pid 477) 1041s
    run: nginx: (pid 474) 1041s; run: log: (pid 471) 1041s
    run: node-exporter: (pid 464) 1041s; run: log: (pid 463) 1041s
    run: postgres-exporter: (pid 476) 1041s; run: log: (pid 475) 1041s
    run: postgresql: (pid 483) 1041s; run: log: (pid 480) 1041s
    run: prometheus: (pid 473) 1041s; run: log: (pid 472) 1041s
    run: redis: (pid 482) 1041s; run: log: (pid 479) 1041s
    run: redis-exporter: (pid 468) 1041s; run: log: (pid 467) 1041s
    run: sidekiq: (pid 462) 1041s; run: log: (pid 461) 1041s
    run: sshd: (pid 20) 1092s; run: log: (pid 19) 1092s
    run: unicorn: (pid 17333) 0s; run: log: (pid 493) 1041s ## 这个运行为0秒,并且每次的pid都在增加,说明服务没有启动起来
    >>>>>>
    
    ## 查看日志
    gitlab-ctl tail unicorn
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    ==> /var/log/gitlab/unicorn/unicorn_stderr.log <==
    ArgumentError: Already running on PID:557 (or pid=/opt/gitlab/var/unicorn/unicorn.pid is stale)
      /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:195:in `pid='
      /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:127:in `start'
      /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/bin/unicorn:126:in `<top (required)>'
      /opt/gitlab/embedded/bin/unicorn:23:in `load'
      /opt/gitlab/embedded/bin/unicorn:23:in `<top (required)>'
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    
    ## 删除进程
    rm -rf /opt/gitlab/var/unicorn/unicorn.pid
    
    ## 重启容器
    docker restart gitlab
    

    相关文章

      网友评论

          本文标题:docker搭建gitlab服务器搭建502错误处理

          本文链接:https://www.haomeiwen.com/subject/mxcdeltx.html