问题描述
我想知道我的 gitlab-secrets.json 文件是否以某种方式损坏了,因为我无法在 vim 中读取它。它看起来像二进制格式。我正在尝试将 GitLab v8.15 的 Onminbus 实例升级到 v8.17,但收到以下错误消息:
Checking Postgresql executables: OK
Shutting down all GitLab services except those needed for migrations
ok: down: gitlab-workhorse: 0s,normally up
ok: down: logrotate: 0s,normally up
ok: down: Nginx: 1s,normally up
ok: down: postgresql: 0s,normally up
ok: down: redis: 1s,normally up
ok: down: sidekiq: 0s,normally up
ok: down: unicorn: 0s,normally up
ok: run: postgresql: (pid 4730) 1s
ok: run: redis: (pid 4738) 0s
run: postgresql: (pid 4730) 1s; run: log: (pid 935) 1980s
run: redis: (pid 4738) 0s; run: log: (pid 928) 1980s
Reconfiguring GitLab to apply migrations
================================================================================
Recipe Compile Error in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb
================================================================================
Chef::Exceptions::JSON::ParseError
----------------------------------
lexical error: invalid char in json text.
(right here) ------^
Cookbook Trace:
---------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/helper.rb:217:in `read_gitlab_secrets'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/gitlab.rb:117:in `generate_secrets'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/gitlab.rb:226:in `generate_config'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/config.rb:24:in `from_file'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb:26:in `from_file'
Relevant File Content:
----------------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/helper.rb:
210:
211: class SecretsHelper
212:
213: def self.read_gitlab_secrets
214: existing_secrets ||= Hash.new
215:
216: if File.exists?("/etc/gitlab/gitlab-secrets.json")
217>> existing_secrets = Chef::JSONCompat.from_json(File.read("/etc/gitlab/gitlab-secrets.json"))
218: end
219:
220: existing_secrets.each do |k,v|
221: if Gitlab[k]
222: v.each do |pk,p|
223: # Note: Specifiying a secret in gitlab.rb will take precendence over "gitlab-secrets.json"
224: Gitlab[k][pk] ||= p
225: end
226: else
Platform:
---------
x86_64-linux
warning: %posttrans(gitlab-ce-8.17.7-ce.0.el7.x86_64) scriptlet Failed,exit status 1
Non-fatal POSTTRANS scriptlet failure in rpm package gitlab-ce-8.17.7-ce.0.el7.x86_64
Verifying : gitlab-ce-8.17.7-ce.0.el7.x86_64 1/2
Verifying : gitlab-ce-8.15.5-ce.0.el7.x86_64 2/2
Updated:
gitlab-ce.x86_64 0:8.17.7-ce.0.el7
Complete!
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)