Centos7更新gitlab17失败: GitLab KAS: RuntimeError: Execution of the command gitlab-kas –version failed

服务器环境

操作系统:Centos7

GitLab现运行版本:16.11.2

GitLab需要更新版本:17.1.1

升级错误描述

使用yum升级GitLab,在升级安装阶段错下如下错误。

repo    [2024-07-04T16:24:52+02:00] FATAL: Stacktrace dumped to /opt/gitlab/embedded/cookbooks/cache/cinc-stacktrace.out

repo    [2024-07-04T16:24:52+02:00] FATAL: ---------------------------------------------------------------------------------------

repo    [2024-07-04T16:24:52+02:00] FATAL: PLEASE PROVIDE THE CONTENTS OF THE stacktrace.out FILE (above) IF YOU FILE A BUG REPORT

repo    [2024-07-04T16:24:52+02:00] FATAL: ---------------------------------------------------------------------------------------

repo    [2024-07-04T16:24:52+02:00] FATAL: RuntimeError: version_file[Create version file for Gitlab KAS] (gitlab-kas::enable line 67) had an error: RuntimeError: Execution of the command `/opt/gitlab/embedded/bin/gitlab-kas --version` failed with a non-zero exit code (2)

repo    stdout:

repo    stderr: panic: failed to parse "2024-07-04T09:24:36+0000" into RFC3339 compliant time object, because: parsing time "2024-07-04T09:24:36+0000" as "2006-01-02T15:04:05Z07:00": cannot parse "+0000" as "Z07:00". Fix the build process.

repo

repo    goroutine 1 [running]:

repo    gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v17/cmd.init.0()

repo            /var/cache/omnibus/src/gitlab-kas/cmd/build_info.go:18 +0xf3

repo

repo

repo    ===

repo    There was an error running gitlab-ctl reconfigure. Please check the output above for more

repo    details.

repo    ===

repo    warning: %posttrans(gitlab-ce-17.0.0-ce.0.el7.x86_64) scriptlet failed, exit status 1

repo      Verifying  : gitlab-ce-17.0.0-ce.0.el7.x86_64                             1/2

repo      Verifying  : gitlab-ce-16.11.2-ce.0.el7.x86_64                            2/2

repo

repo    Updated:

repo      gitlab-ce.x86_64 0:17.0.0-ce.0.el7                                            

repo

repo    Complete!

repo    Non-fatal POSTTRANS scriptlet failure in rpm package gitlab-ce-17.0.0-ce.0.el7.x86_64

Exit 6

按照提示使用命令重新配置,还是出现升级错误

执行重新配置命令:

[root@iZ2ze0pmf5vkz1jq1dsg5zZ ~]# gitlab-ctl reconfigure

输出错误:

repo    [2024-07-04T16:28:52+02:00] FATAL: RuntimeError: version_file[Create version file for Gitlab KAS] (gitlab-kas::enable line 67) had an error: RuntimeError: Execution of the command `/opt/gitlab/embedded/bin/gitlab-kas --version` failed with a non-zero exit code (2)

解决方法

从gitlab官网社区查询到错误的解决办法,是禁止gitlab_kas的配置项,具体操作如下:

修改配置文件

编辑gitlab的配置文件,配置文件默认位置/etc/gitlab/gitlab.rb

查找gitlab_kas配置项在配置文件的具体行数

修改gitlab_kas['enable'] 配置项

把gitlab_kas['enable'] = true这行的注释#号去掉,然后把gitlab_kas['enable'] = true改为gitlab_kas['enable'] = false,最终修改结果为:

重新运行配置命令

gitlab-ctl reconfigure

重新运行升级程序

Gitlab升级成功

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值