迁移gitlab进行数据恢复之后,gitlab的管理中心的runner不能打开,显示500
查看日志显示:
Started GET "/admin/runners" for 10.148.60.33 at 2020-09-26 06:15:17 +0000
Processing by Admin::RunnersController#index as HTML
Completed 500 Internal Server Error in 10ms (ActiveRecord: 1.3ms)
ActionView::Template::Error ():
37:
38: .col-sm-6
39: .bs-callout
40: = render partial: 'ci/runner/how_to_setup_runner',
41: locals: { registration_token: Gitlab::CurrentSettings.runners_registration_token,
42: type: 'shared',
43: reset_token_url: reset_registration_token_admin_application_settings_path }
lib/gitlab/crypto_helper.rb:27:in `aes256_gcm_decrypt'
app/models/concerns/token_authenticatable_strategies/encrypted.rb:45:in `get_token'
app/models/concerns/token_authenticatable_strategies/base.rb:33:in `ensure_token!'
app/models/concerns/token_authenticatable.rb:45:in `block in add_authentication_token_field'
app/models/application_setting_implementation.rb:218:in `runners_registration_token'
原因是:
秘钥在读取的时候发生错误导致的,可以尝试进行重置runner_registration_token进行恢复,前提是之前的秘钥会丢失
解决办法是:
# 进入console
gitlab-rails console
# 重置token
ApplicationSetting.current.reset_runners_registration_token!
# 退出
exit
刷新浏览器查看: