在backup & restore后,gitlab打开group组的子项目页面,报错500

Posted Locutus

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了在backup & restore后,gitlab打开group组的子项目页面,报错500相关的知识,希望对你有一定的参考价值。

发现问题

在backup & restore后,gitlab打开group组的子项目URI页面,报错“500,whoops, something went wrong on our end."


分析问题

查看gitlab日志文件 /path/to/log/gitlab/gitlab-rails/production.log

=> /path/to/log/gitlab/gitlab-rails/production.log <==     

Started GET "/xxx/kubevirt/xxx" for 192.168.10.102 at 2022-05-05 09:19:35 +0000
Processing by ProjectsController#show as html
  Parameters: "namespace_id"=>"xxx/kubevirt", "id"=>"xxx"
Creating scope :without_statuses. Overwriting existing method CommitStatus.without_statuses.
An enum element in Ci::Runner uses the prefix 'not_'. This will cause a conflict with auto generated negative scopes.
Creating scope :in_pipelines. Overwriting existing method Ci::Build.in_pipelines.
Completed 500 Internal Server Error in 374ms (ActiveRecord: 39.4ms | Elasticsearch: 0.0ms | Allocations: 62084)                                                                                                                               
ActionView::Template::Error ():                      
    128:           = render_if_exists 'layouts/nav/sidebar/project_jira_issues_link', issue_tracker: issue_tracker
    129:         - else                                    
    130:           = nav_link do                 
    131:             = link_to issue_tracker.issue_tracker_path, target: '_blank', rel: 'noopener noreferrer', class: 'shortcuts-external_tracker' do
    132:               .nav-icon-container      
    133:                 = sprite_icon('external-link')                                                                                                                                                                                                               
    134:               %span.nav-item-name                                                                                                                                                                                                                     

与jira有关。


解决问题

removing jira info (via gitlab-rails dbconsole) solves the 500

# docker exec -it fe2b3b71b205 /bin/bash

# root@fe2b3b71b205:/# gitlab-rails dbconsole
psql (12.6)
Type "help" for help.

gitlabhq_production=# help

gitlabhq_production=# delete from jira_imports ;
DELETE 1
gitlabhq_production=# delete from jira_tracker_data;
DELETE 217

再次打开页面,正常访问。


参考文章

https://gitlab.com/gitlab-org/gitlab/-/issues/247525

以上是关于在backup & restore后,gitlab打开group组的子项目页面,报错500的主要内容,如果未能解决你的问题,请参考以下文章

dbms_backup_restore Package

backup/restore database

GPO - Backup and Restore

使用 heroku pg:backups:restore 导入 Heroku Postgres

rman restore spfile from backup

How to backup a remote PostgreSQL db and restore it locally?