gitlab500

gitlab500

自己搭建的gitlab发现某些操作时候会报500错误,

然后查看日志/var/log/gitlab/gitlab-rails/production.log 发现住报错信息OpenSSL::Cipher::CipherError ():

Started GET "/-/metrics" for 127.0.0.1 at 2019-08-01 05:58:30 +0000
Processing by MetricsController#index as HTML
Completed 200 OK in 20ms (Views: 0.3ms | ActiveRecord: 0.0ms)
Started PATCH "/admin/application_settings" for 127.0.0.1 at 2019-08-01 05:58:31 +0000
Processing by Admin::ApplicationSettingsController#update as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"[FILTERED]", "application_setting"=>{"signup_enabled"=>"1", "send_user_confirmation_email"=>"0", "domain_whitelist_raw"=>"", "domain_blacklist_enabled"=>"0", "domain_blacklist_raw"=>"", "after_sign_up_text"=>""}, "blacklist_type"=>"raw"}
Completed 500 Internal Server Error in 9ms (ActiveRecord: 0.8ms)

OpenSSL::Cipher::CipherError ():

lib/gitlab/crypto_helper.rb:27:in `aes256_gcm_decrypt'
app/models/concerns/token_authenticatable_strategies/encrypted.rb:55:in `get_token'
app/models/concerns/token_authenticatable_strategies/base.rb:27:in `ensure_token'
app/models/concerns/token_authenticatable_strategies/encrypted.rb:42:in `ensure_token'
app/models/concerns/token_authenticatable.rb:38:in `block in add_authentication_token_field'
app/services/application_settings/update_service.rb:18:in `execute'
lib/gitlab/metrics/instrumentation.rb:161:in `block in execute'
lib/gitlab/metrics/method_call.rb:36:in `measure'
lib/gitlab/metrics/instrumentation.rb:161:in `execute'
app/controllers/admin/application_settings_controller.rb:40:in `update'
lib/gitlab/i18n.rb:55:in `with_locale'
lib/gitlab/i18n.rb:61:in `with_user_locale'
app/controllers/application_controller.rb:417:in `set_locale'
lib/gitlab/middleware/rails_queue_duration.rb:24:in `call'
lib/gitlab/metrics/rack_middleware.rb:17:in `block in call'
lib/gitlab/metrics/transaction.rb:55:in `run'

搜索了一下,发现网上说是由于迁移导入项目后,没有导入原来的加密信息/etc/gitlab/gitlab-secrets.json, 但是原来的加密信息文件我已经找不到了,后面发现可以直接重置就行了

命令行输gitlab500_第1张图片gitlab-rails console,然后输入ApplicationSetting.current.reset_runners_registration_token!即可

 

—End—

你可能感兴趣的:(gitlab)