Problem listing Merge Requests after backup -> restore to new Server

Summary

The old server was dockerized and I have to migrate to a new Server, Debian Jessie. So, I've installed Jessie and Gitlab, version 8.14.0 and started the migration, doing the backup and the restore. Everything works fine, no erros messages or issues. BUT, in one repository has some merge requests, and when i click on the menu, the screens shows 500 error. In the older server works fine.

Expected behavior

See the list of merge requests

Actual behavior

Error 500 - Whoops, something went wrong on our end.

Relevant logs and/or screenshots

Processing by Projects::MergeRequestsController#index as HTML
  Parameters: {"namespace_id"=>"dev", "project_id"=>"repo"}
Completed 500 Internal Server Error in 65ms (ActiveRecord: 8.8ms)

ActionView::Template::Error (undefined method head_commit' for nil:NilClass):
    15:           = icon('ban')
    16:           CLOSED
    17: 
    18:       - if merge_request.pipeline
    19:         %li
    20:           = render_pipeline_status(merge_request.pipeline)
    21: 
  app/models/merge_request.rb:236:in diff_head_commit'
  app/models/merge_request.rb:251:in diff_head_sha'
  app/models/merge_request.rb:786:in pipeline'
  app/views/projects/merge_requests/_merge_request.html.haml:18:in _app_views_projects_merge_requests__merge_request_html_haml__2781607293367839241_70010381574380'
  app/views/projects/merge_requests/_merge_requests.html.haml:2:in _app_views_projects_merge_requests__merge_requests_html_haml__2017190984693346509_70010388458200'
  app/views/projects/merge_requests/index.html.haml:22:in _app_views_projects_merge_requests_index_html_haml__1893834321636072121_70010448503340'
  app/controllers/projects/merge_requests_controller.rb:47:in index'
  lib/gitlab/request_profiler/middleware.rb:15:in call'
  lib/gitlab/middleware/go.rb:16:in call

Output of checks

Results of GitLab application Check


root@git:~# gitlab-rake gitlab:check SANITIZE=true
Checking GitLab Shell ...

GitLab Shell version >= 4.0.0 ? ... OK (4.0.0)
Repo base directory exists?
default... yes
Repo storage directories are symlinks?
default... no
Repo paths owned by git:git?
default... yes
Repo paths access is drwxrws---?
default... yes
hooks directories in repos are links: ... 
5/2 ... ok
5/3 ... ok
8/4 ... ok
5/6 ... ok
5/7 ... ok
5/8 ... ok
5/9 ... ok
5/10 ... ok
5/11 ... ok
5/16 ... ok
13/17 ... ok
3/18 ... repository is empty
3/19 ... ok
5/20 ... ok
3/21 ... ok
5/22 ... ok
3/25 ... ok
3/27 ... ok
3/28 ... ok
3/29 ... ok
3/30 ... ok
8/31 ... ok
28/32 ... ok
28/33 ... ok
28/34 ... ok
28/35 ... ok
28/36 ... ok
3/37 ... ok
28/38 ... ok
28/39 ... ok
28/40 ... ok
28/41 ... ok
28/42 ... ok
28/43 ... ok
3/44 ... ok
8/45 ... ok
28/46 ... ok
28/47 ... ok
28/48 ... ok
28/49 ... repository is empty
3/50 ... ok
20/52 ... ok
20/53 ... ok
8/54 ... ok
5/55 ... ok
3/56 ... ok
3/58 ... ok
25/59 ... ok
3/60 ... ok
3/62 ... ok
3/63 ... ok
3/64 ... ok
8/65 ... ok
3/66 ... ok
3/67 ... ok
Running /opt/gitlab/embedded/service/gitlab-shell/bin/check
Check GitLab API access: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK
Send ping to redis server: OK
gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Sidekiq ...

Running? ... yes
Number of Sidekiq processes ... 1

Checking Sidekiq ... Finished

Checking Reply by email ...

Reply by email is disabled in config/gitlab.yml

Checking Reply by email ... Finished

Checking LDAP ...

LDAP is disabled in config/gitlab.yml

Checking LDAP ... Finished

Checking GitLab ...

Git configured with autocrlf=input? ... yes
Database config exists? ... yes
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory setup correctly? ... yes
Init script exists? ... skipped (omnibus-gitlab has no init script)
Init script up-to-date? ... skipped (omnibus-gitlab has no init script)
projects have namespace: ... 
5/2 ... yes
5/3 ... yes
8/4 ... yes
5/6 ... yes
5/7 ... yes
5/8 ... yes
5/9 ... yes
5/10 ... yes
5/11 ... yes
5/16 ... yes
13/17 ... yes
3/18 ... yes
3/19 ... yes
5/20 ... yes
3/21 ... yes
5/22 ... yes
3/25 ... yes
3/27 ... yes
3/28 ... yes
3/29 ... yes
3/30 ... yes
8/31 ... yes
28/32 ... yes
28/33 ... yes
28/34 ... yes
28/35 ... yes
28/36 ... yes
3/37 ... yes
28/38 ... yes
28/39 ... yes
28/40 ... yes
28/41 ... yes
28/42 ... yes
28/43 ... yes
3/44 ... yes
8/45 ... yes
28/46 ... yes
28/47 ... yes
28/48 ... yes
28/49 ... yes
3/50 ... yes
20/52 ... yes
20/53 ... yes
8/54 ... yes
5/55 ... yes
3/56 ... yes
3/58 ... yes
25/59 ... yes
3/60 ... yes
3/62 ... yes
3/63 ... yes
3/64 ... yes
8/65 ... yes
3/66 ... yes
3/67 ... yes
Redis version >= 2.8.0? ... yes
Ruby version >= 2.1.0 ? ... yes (2.3.1)
Your git bin path is /opt/gitlab/embedded/bin/git
Git version >= 2.7.3 ? ... yes (2.7.4)
Active users: 22

Checking GitLab ... Finished

Results of GitLab environment info


System information
System:		
Current User:	git
Using RVM:	no
Ruby Version:	2.3.1p112
Gem Version:	2.6.6
Bundler Version:1.13.6
Rake Version:	10.5.0
Sidekiq Version:4.2.1

GitLab information
Version:	8.14.0
Revision:	cde955c
Directory:	/opt/gitlab/embedded/service/gitlab-rails
DB Adapter:	postgresql
URL:		http://git.interno
HTTP Clone URL:	http://git.interno/some-group/some-project.git
SSH Clone URL:	git@git.interno:some-group/some-project.git
Using LDAP:	no
Using Omniauth:	no

GitLab Shell
Version:	4.0.0
Repository storage paths:
- default: 	/var/opt/gitlab/git-data/repositories
Hooks:		/opt/gitlab/embedded/service/gitlab-shell/hooks/
Git:		/opt/gitlab/embedded/bin/git

Thanks! Sorry my bad english.

Edited Jun 23, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading