首页 新闻 会员 周边 捐助

gitlab从8.5.7升级至8.6.1后出现500错误

0
悬赏园豆:10 [已解决问题] 解决于 2016-03-24 11:58

将gitlab从8.5.7升级至8.6.1之后,方法有些页面出现500错误。

用 gitlab-rake db:migrate:status 命令查看,发现以下数据库迁移未成功:

  down    20160226114608  Add trigram indexes for searching
  down    20160229193553  Add main language to repository
  down    20160301124843  Add visibility level to groups
  down    20160305220806  Remove expires at from snippets
  down    20160307221555  Disallow blank line code on note
  down    20160308212903  Add default group visibility to application settings
  down    20160310185910  Add external flag to users
  down    20160314143402  Projects add pushes since gc
  down    20160316123110  Ci runners token index
  down    20160316192622  Change target id to null on todos
  down    20160316204731  Add commit id to todos
  down    20160317092222  Add moved to to issue
  down    20160320204112  Index namespaces on visibility level
dudu的主页 dudu | 高人七级 | 园豆:30585
提问于:2016-03-24 11:38
< >
分享
最佳答案
0

运行  gitlab-rake db:migrate 出现如下的错误:

== 20160226114608 AddTrigramIndexesForSearching: migrating ====================
-- execute("SELECT true AS enabled FROM pg_available_extensions WHERE name = 'pg_trgm' AND installed_version IS NOT NULL;")
   -> 0.0042s
rake aborted!
StandardError: An error has occurred, all later migrations canceled:

You must enable the pg_trgm extension. You can do so by running "CREATE EXTENSION pg_trgm;" as a PostgreSQL super user, this must be done for every GitLab database.

原来是需要安装给 PostgreSQL 安装 pg_trgm 扩展。

我们的 PostgreSQL 数据库用的是阿里云的RDS,于是登录到RDS的DMS管理控制台,在命令窗口执行  CREATE EXTENSION pg_trgm; 命令。

然后回到gitlab服务器,执行 gitlab-rake db:migrate 命令成功,问题解决。

dudu | 高人七级 |园豆:30585 | 2016-03-24 11:57
其他回答(1)
0

dudu 问下 PostgreSQL怎么样啊, 相比mysql  总感觉弱了些 。

花儿笑弯了腰 | 园豆:264 (菜鸟二级) | 2016-03-24 17:34

目前只是简单使用,不太了解

支持(0) 反对(0) dudu | 园豆:30585 (高人七级) | 2016-03-24 17:41

@dudu: 额额

支持(0) 反对(0) 花儿笑弯了腰 | 园豆:264 (菜鸟二级) | 2016-03-24 17:42
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册