【问题标题】:gitlab 500 errors in the admin area管理区出现 gitlab 500 错误
【发布时间】:2019-06-05 06:48:45
【问题描述】:

如何重现:

  1. 以管理员身份登录
  2. 进入管理菜单
  3. 点击概览 - 跑步者
  4. 或点击设置中的保存

结果:500 错误:糟糕,我们这边出了点问题。

哪个系统正在运行?

RHEL 7,带有 Nginx 和乘客的出站 gitlab

错误:

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'


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 }

【问题讨论】:

  • 那么,你的问题是什么?你提出问题了吗?
  • 问题是我无法使用 Gitlab,因为我无法更改设置。我想知道如何解决这个错误
  • 您是否迁移了此安装?您需要复制旧实例的 secrets.json,其中包含用于解密信息的密钥

标签: linux gitlab rhel7


【解决方案1】:

我几乎可以肯定这是 gitlab 从 /etc/gitlab/gitlab-secrets.json(综合安装)或 $GITLAB_HOME/config/secrets.yml(基于源的安装)读取的错误解密密钥。如果您不关心您的 runner_registration_token,您可以从控制台中像这样重置它:

root@gitlab:/# gitlab-rails console
-------------------------------------------------------------------------------------
 GitLab:       11.5.1 (c90ae59)
 GitLab Shell: 8.4.1
 postgresql:   9.6.8
-------------------------------------------------------------------------------------
Both Deployment and its :status machine have defined a different default for "status". Use only one or the other for defining defaults to avoid unexpected behaviors.
Loading production environment (Rails 4.2.10)
irb(main):001:0> ApplicationSetting.current.reset_runners_registration_token!
=> true
irb(main):002:0> 

【讨论】:

  • GitLab: 13.12.0-ee EE 加载生产环境 (Rails 6.0.3.6) irb(main):001:0> ApplicationSetting.current.reset_runners_registration_token!回溯(最近一次通话最后):5:来自(irb):1 4:来自 app/models/concerns/token_authenticable.rb:53:in block in add_authentication_token_field' 3: from app/models/concerns/token_authenticatable_strategies/base.rb:44:in reset_token! 2:来自lib/gitlab/database.rb:370:intransaction' 1: from lib/gitlab/database.rb:371:in block in transaction' OpenSSL::Cipher::CipherError()
猜你喜欢
  • 2017-02-03
  • 1970-01-01
  • 2021-07-13
  • 2016-05-24
  • 1970-01-01
  • 2014-02-21
  • 2019-06-10
  • 2012-04-14
  • 1970-01-01
相关资源
最近更新 更多