LoginSignup
4
2

More than 5 years have passed since last update.

Gitlab-ceをVer10台にあげたら「502-Whoops, GitLab is taking too much time to respond」が出て困った

Last updated at Posted at 2017-11-28

GitlabをVer9系列からVer10系列にyumでアップデートしたら「502-Whoops, GitLab is taking too much time to respond」と出て先に進まないよ、助けてと言われたので調査してみました

前提

  • OSはRedHat7.4
  • Gitlab-ceはyumでインストール
  • ドキュメント類は読まないと豪語された _:(´ཀ`」 ∠):
    • 何もやっていません : やってないとなりません(๑╹ω╹๑ )
    • ちゃんとメッセージ出すべきだ : Webサイトに書いてるよ(☝︎ ՞ਊ ՞)☝︎

まずは状況確認

※sudo もしくは rootになって作業

  • Gitlabの各プロセス動作状況確認
   gitlab-ctl status

   Postgresqlがダウンしているとのこと

  • 各プロセスのログを確認
   gitlab-ctl tail

postgresql.confとruntime.confにエラーがあるとのご報告

  • confの中身を見てみる

別にエラーではないと思われる。
再度postgresqlのみ再起動してみるとsocketがつくれねぇぇぇとのたまわれて死亡

gitlabのWebサイトを漁るとGitlab10.0以降はpostgresql9.2系はサポートしないよとの情報発見
これかなと思ってgitlab embededのpostgresqlバージョンを確認すると9.6系列....
しかも9.2のpostgresは残ってない(T ^ T)

  • 一旦confのエラー行をコメントアウトしてみる

その後、postgresを起動してみると

DETAIL:  The data directory was initialized by PostgreSQL version 9.2, which is not compatible with this version 9.6.5.

やっぱり、これでした

復旧作業(別の名を正しいアップデート手順)

  1. yumで9系列のgitlab-ceのバージョンダウン
  2. postgresqlを9.2系から9.6系にバージョンアップ
  3. 10系列のgitlab-ceにバージョンアップ

1. yumで9系列のgitlab-ceのバージョンダウン

yumでインストール可能なバージョン全て表示するには--showduplicatesオプションを利用

yum list --showduplicates |grep gitlab

gitlab-ce.x86_64 9.5.10-ce.0.el7 gitlab_gitlab-ceが9系列最後の模様
よってこれをインストールすることでバージョンダウン

yum install gitlab-ce-9.5.10-ce.0.el7

postgresqlは何が入ってるかなぁと見てみると9.2系と9.6系両方準備されている!!素晴らしい

2. postgresqlを9.2系から9.6系にバージョンアップ

  • gitlabの各サービスを停止
gitlab-ctl stop
  • gitlabのpostgresをアップデート
gitlab-ctl pg-upgrade
  • gitlabが正しく起動するか確認
gitlab-ctl start

元気にpostgresqlが動いている事を確認して、gitlabのwebにアクセス。ログインしデータも残っていることを確認

3. 10系列のgitlab-ceにバージョンアップ

yum update
gitlab preinstall: 
gitlab preinstall: Backup failed! If you want to skip this backup, run the following command and
gitlab preinstall: try again:
gitlab preinstall: 
gitlab preinstall:   sudo touch /etc/gitlab/skip-auto-migrations
gitlab preinstall: 

こういうエラーが出る場合は表示されてるとおり

sudo touch /etc/gitlab/skip-auto-migrations

した後に

yum update

でOKです。終わったら/etc/gitlab/skip-auto-migrationsは消しておきましょう

上手くいって良かった(๑╹ω╹๑ )
困る方は、そんなに居ないと思いますがご参考まで

参照情報

4
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
2