Can not register worker after migrate and upgrade GitLab

Hi there, thank you for I can be here.

I moved from AMI Linux to AMI Linux 2 and upgrade from 13.6.7 to 14.0.12. Apparently everything works, I can access the repos and can clone, push merge and everything. After I installed the gitlab runner and removed the old shared runner and wanted to register a new one, but got this error:

RROR: Registering runner... failed                 runner=jd-VR9hx status=500 Internal Server Error
PANIC: Failed to register this runner. Perhaps you are having network problems

I wanted to reset the registration token, maybe the new environment and the new install needs new one, and then I got this error:

Started PUT "/admin/application_settings/reset_registration_token" for xxx.xxx.xxx.xxx at 2021-11-13 16:57:36 +0000
Processing by Admin::ApplicationSettingsController#reset_registration_token as HTML
Parameters: {"authenticity_token"=>"[FILTERED]"}
Completed 500 Internal Server Error in 238ms (ActiveRecord: 2.9ms | Elasticsearch: 0.0ms | Allocations: 43392)

NoMethodError (undefined method `diff_max_files' for #<ApplicationSetting:0x00007f511962be18>
Did you mean?  diff_max_patch_bytes):

What did I missed? Why I get this error? I welcome any suggestions., thank you!

Hi @svolenszki , welcome to the GitLab Community Forum! :wave:

It sounds like a background migration was skipped or not successful.

This error:

NoMethodError (undefined method `diff_max_files' for #<ApplicationSetting:0x00007f511962be18>
Did you mean?  diff_max_patch_bytes):

Has me thinking you’re missing the 20210527134019_add_diff_max_files_to_application_settings.rb migration: db/migrate/20210527134019_add_diff_max_files_to_application_settings.rb · 3e26e2528384efcd6e1b0b2e28c6aca687a23d6a · GitLab.org / GitLab · GitLab

To check for background migrations that did not complete, you can run `gitlab-rake db:migrate:status | grep -v up"

If you find this or other migrations are in a down state, you can try re-running them with gitlab-rake db:migrate.

Let us know how it goes!

1 Like

Dear Greg, you saved my day! Yesterday I totally lost, I was wondering to move my project to a fresh install but now the runner is registered and the 500 error gone! Soon I will check if the build and the deploy is ok.

Thank you, I mark your answer as the solution.

1 Like