gitlab升级后postgresql文件版本不匹配
想往服务器上安装MySQL,按网上查的安装命令执行了 yum update后,服务器上的所有包都跟着升级了。当前服务器上只有gitlab在运行,升级到13.1后访问不了了,页面502。sodu gitlab-ctl status 查看各个插件的运行状态,发现postgresql是down的状态,sudo gitlab-ctl tail postgresql 查看postgresql的日志,发现报错
·
想往服务器上安装MySQL,按网上查的安装命令执行了 yum update后,服务器上的所有包都跟着升级了。当前服务器上只有gitlab在运行,升级到13.1后访问不了了,页面502。
sodu gitlab-ctl status 查看各个插件的运行状态,发现postgresql是down的状态,
sudo gitlab-ctl tail postgresql 查看postgresql的日志,发现报错:
The data directory was initialized by PostgreSQL version 11, which is not compatible with this version 12.6
这个更新和改配置都没有解决。
卸载gitlab,
sudo gitlab-ctl stop
sudo gitlab-ctl uninstall
sudo yum remove gitlab-ee
yum history 查看yum历史日志,找到之前的gitlab版本是12.6.2。
去官网找到该版本的rpm,复制脚本
curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash
安装:
sudo yum install gitlab-ee-12.6.2-ee.0.el6.x86_64
启动:
gitlab-ctl reconfigure
gitlab-ctl start
gitlab-ctl status 查看状态,发现redis是down,删除/var/opt/gitlab/redis/dump.rdb后恢复正常。
rm /var/opt/gitlab/redis/dump.rdb
参考文章:
https://zhuanlan.zhihu.com/p/197889410
更多推荐
已为社区贡献1条内容
所有评论(0)