Error 500 after upgrade to gitlab 13.0.3 from 12.10

I upgraded to gitlab 13 from 12. Now I cannot login to the web interface I get Error 500, not even a login prompt:

Current User: git
Using RVM: no
Ruby Version: 2.6.6p146
Gem Version: 2.7.10
Bundler Version:1.17.3
Rake Version: 12.3.3
Redis Version: 5.0.9
Git Version: 2.26.2
Sidekiq Version:5.2.7
Go Version: unknown
GitLab information
Version: 13.0.3
Revision: e2397fc2acb
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: PostgreSQL
DB Version: 11.7
URL: http://gitlab.XXXXXX.ac.uk
HTTP Clone URL: http://gitlab.XXXXXX.ac.uk/some-group/some-project.git
SSH Clone URL: git@gitlab.XXXXXX.ac.uk:some-group/some-project.git
Using LDAP: yes
Using Omniauth: yes
Omniauth Providers:
GitLab Shell
Version: 13.2.0
Repository storage paths:

  • default: /var/opt/gitlab/git-data/repositories
    GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell
    Git: /opt/gitlab/embedded/bin/git

The only error I can see is in /var/log/gitlab/gitlab-rails/production.log

Started GET “/users/sign_in” for 127.0.0.1 at 2020-06-03 02:01:01 +0100
Processing by SessionsController#new as /
Completed 500 Internal Server Error in 40ms (ActiveRecord: 2.5ms | Elasticsearch: 0.0ms | Allocations: 9410)
ActionView::Template::Error (undefined method `profile_image_guidelines=’ for #Appearance:0x00007f45559e0ad8
Did you mean? profile_image_guidelines_html_invalidated?):

39: %meta{ property: ‘twitter:image’, content: page_image }
40: = page_card_meta_tags
41:
42: %title= page_title(site_name)
43: %meta{ name: “description”, content: page_description }
44:
45: = favicon_link_tag favicon, id: ‘favicon’, data: { original_href: favicon }, type: ‘image/png’

lib/gitlab/favicon.rb:58:in appearance' lib/gitlab/favicon.rb:8:in main’
app/helpers/page_layout_helper.rb:44:in favicon' app/views/layouts/_head.html.haml:42 app/views/layouts/devise.html.haml:3 app/controllers/application_controller.rb:132:in render’
app/controllers/sessions_controller.rb:52:in new' app/controllers/application_controller.rb:496:in set_current_admin’
lib/gitlab/session.rb:11:in with_session' app/controllers/application_controller.rb:487:in set_session_storage’
lib/gitlab/i18n.rb:55:in with_locale' lib/gitlab/i18n.rb:61:in with_user_locale’
app/controllers/application_controller.rb:481:in set_locale' lib/gitlab/error_tracking.rb:48:in with_context’
app/controllers/application_controller.rb:546:in sentry_context' app/controllers/application_controller.rb:474:in block in set_current_context’
lib/gitlab/application_context.rb:52:in block in use' lib/gitlab/application_context.rb:52:in use’
lib/gitlab/application_context.rb:20:in with_context' app/controllers/application_controller.rb:467:in set_current_context’
lib/gitlab/request_profiler/middleware.rb:17:in call' lib/gitlab/middleware/go.rb:20:in call’
lib/gitlab/etag_caching/middleware.rb:13:in call' lib/gitlab/middleware/multipart.rb:125:in call’
lib/gitlab/middleware/read_only/controller.rb:51:in call' lib/gitlab/middleware/read_only.rb:18:in call’
lib/gitlab/middleware/same_site_cookies.rb:27:in call' lib/gitlab/middleware/basic_health_check.rb:25:in call’
lib/gitlab/middleware/request_context.rb:23:in call' config/initializers/fix_local_cache_middleware.rb:9:in call’
lib/gitlab/metrics/requests_rack_middleware.rb:60:in call' lib/gitlab/middleware/release_env.rb:12:in call’

I have ran gitlab-rake gitlab:check and there are no errors

Can anyone help ?

1 Like

Hi @Kevin, welcome to the GitLab community forums! :tada:

To help resolve the issue, please run the following commands on your GitLab server:

  • sudo gitlab-ctl reconfigure
  • sudo gitlab-ctl restart

Oftentimes this is enough to resolve problems following a major upgrade.

If this does not work, please share the error output in the logs, especially if there is any change from how the error appeared previously.

I hope you find this helpful. Let us know how it goes!

I guess (a part of) the problem is revealed by this line in the output:

DB Version: 11.7

GitLab 13 doesn’t support PostgreSQL versions prior to 13.

I have no idea how to recover, but I do know one thing that you should probably answer to make it easier to help you:

Are you using the omnibus packages or installing from source?

Hi Thanks for your replies. Let me tell you more. I was doing a move from an existing v12 Linux VM to a new v13 VM so it was move. To move the Gitlab I have to make sure both old and new are the same rev levels. My first try was to upgrade the existing server to v13 including DB, then do a backup, on the new VM restore the backup. This gave the error 500. I then had a second try, this time I used a clone of the original VM at v12 which was working, then took a git backup. I built a new VM using v12 of gitlab. I restored the git backup into the new v12 and tested, the web interface worked. The next step was to upgrade to v13 including the DB, this worked well and the web interface worked too. So my problem has been solved. Summary Try 1 : - exisiting VM v12 new VM v13, upgrade existing to v13, git backup, then git restore on new VM. Error 500. Try number 2: build new VM at same rev as existing, both v12. Backup existing VM, restore to new VM then upgrade new VM to 13. Now it worked with no errors. Thanks for your replies

I am getting the exact same problem. Was upgrading from 12.5.x. First I upgraded to 12.10.x, then I upgraded to 13.0.14 and this is where I am getting the 500 error regarding profile_image_guidelines=’ for #Appearance. I also ran the gitlab-ctl pg_upgrade command to update to PG v11.7 prior to installing 13.0.14 since it was a requirement. All gitlab migrations are UP. I’ve reconfigured multiple times and restarted multiple times. Not sure where to go from here. I’m using the omnibus package.

UPDATE
I thinking something may have gotten messed up with the database, so I dropped the database and recreated it, then restored from a backup and it is working ok now.

1 Like