修复gitlab管理中心的runner打开显示500的错误

迁移gitlab进行数据恢复之后,gitlab的管理中心的runner不能打开,显示500
code500

查看日志显示:

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

修复过程
刷新浏览器查看:
浏览器查看

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值