ZPY博客

gitlab点击admin area的任何设定时报错500 Whoops,something went wrong on our end.

查看log具体报错信息如下:

Processing by Admin::ApplicationSettingsController#update as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"[FILTERED]", "application_setting"=>{"allow_local_requests_from_hooks_and_services"=>"[FILTERED]"}}
Completed 500 Internal Server Error in 72ms (ActiveRecord: 25.0ms)

OpenSSL::Cipher::CipherError ():

lib/gitlab/crypto_helper.rb:27:in aes256_gcm_decrypt' app/models/concerns/token_authenticatable_strategies/encrypted.rb:45:inget_token'
app/models/concerns/token_authenticatable_strategies/base.rb:27:in ensure_token' app/models/concerns/token_authenticatable_strategies/encrypted.rb:32:inensure_token'
app/models/concerns/token_authenticatable.rb:40:in block in add_authentication_token_field' app/services/application_settings/update_service.rb:26:inexecute'
lib/gitlab/metrics/instrumentation.rb:161:in block in execute' lib/gitlab/metrics/method_call.rb:36:inmeasure'
lib/gitlab/metrics/instrumentation.rb:161:in execute' app/controllers/admin/application_settings_controller.rb:40:inupdate'
lib/gitlab/i18n.rb:55:in with_locale' lib/gitlab/i18n.rb:61:inwith_user_locale'
app/controllers/application_controller.rb:434:in set_locale' lib/gitlab/middleware/rails_queue_duration.rb:27:incall'
lib/gitlab/metrics/rack_middleware.rb:17:in block in call' lib/gitlab/metrics/transaction.rb:57:inrun'
lib/gitlab/metrics/rack_middleware.rb:17:in call' lib/gitlab/middleware/multipart.rb:103:incall'
lib/gitlab/request_profiler/middleware.rb:16:in call' lib/gitlab/middleware/go.rb:20:incall'
lib/gitlab/etag_caching/middleware.rb:13:in call' lib/gitlab/middleware/correlation_id.rb:16:inblock in call'
lib/gitlab/correlation_id.rb:15:in use_id' lib/gitlab/middleware/correlation_id.rb:15:incall'
lib/gitlab/middleware/read_only/controller.rb:40:in call' lib/gitlab/middleware/read_only.rb:18:incall'
lib/gitlab/middleware/basic_health_check.rb:25:in call' lib/gitlab/request_context.rb:26:incall'
lib/gitlab/metrics/requests_rack_middleware.rb:29:in call' lib/gitlab/middleware/release_env.rb:13:incall'

这个问题困扰了我很久,第一次遇到时没有管,国为只有用管理员操作admin area的setting才会出现,一般用户没有影响,当时就没有管它,现在有个东西要用管理员设定才行,必须要解决了。

百度里基本上都没有有效信息,最终按gitlab社区的一个方法解决了。记录如下:

首先sudo gitlab-rails c进入gitalab的控制台,然后依次执行

settings = ApplicationSetting.last

settings.update_column(:runners_registration_token_encrypted, nil)

最后重启即可。

gitlab-ctl restart