zoukankan      html  css  js  c++  java
  • 安装新版本报错

    https://about.gitlab.com/install/#centos-7

    搞半天还是 官网的合适

     

    重装新版gitlab时遇到gitlab-rails database初始化失败

    gitlab使用了很久了,一直没有什么升级,自己测试环境的版本一直是8.8.5版,由于功能满足了就没有更新。本次因为测试需要,所以更换了一个比较新的版本。

    环境说明
    Centos7: 3.10.0-327.el7.x86_64
    gitlab版本:原来是8.8.5版本

    问题发生的原因:在同一台Centos7机器上卸载了旧版本的gitlab后,接着又重新安装新版本的gitlab-ce 在安装完后修改配置,初始化配置时出现以下错误:

    Running handlers:
    There was an error running gitlab-ctl reconfigure:
    
    bash[migrate gitlab-rails database] (gitlab::database_migrations line 49) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
    ---- Begin output of "bash"  "/tmp/chef-script20190628-7065-vx17en" ----
    STDOUT: rake aborted!
    PG::ConnectionBad: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/var/opt/gitlab/postgresql/.s.PGSQL.5432"?
    /opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:49:in `block (3 levels) in <top (required)>'
    /opt/gitlab/embedded/bin/bundle:23:in `load'
    /opt/gitlab/embedded/bin/bundle:23:in `<main>'
    Tasks: TOP => gitlab:db:configure
    (See full trace by running task with --trace)
    STDERR:
    ---- End output of "bash"  "/tmp/chef-script20190628-7065-vx17en" ----
    Ran "bash"  "/tmp/chef-script20190628-7065-vx17en" returned 1
    

    因为在卸载旧版本的时候没有把旧的数据删除,所以直接安装时,程序检测到配置文件,数据文件时就会跳过没有覆盖,新版本使用旧版本的数据文件[因为版本相差太多了]就会无法识别导致。

    解决方法

    卸载完旧版本后,记得删除旧的安装数据[配置文件,安装目录,数据目录等]

    [root@rhel7 opt]# rm -rf /var/opt/gitlab/
    [root@rhel7 opt]# rm -rf /opt/gitlab/
    [root@rhel7 opt]# rm -rf /etc/gitlab/
    

    删除上面几个旧的目录后,重新安装新版的gitlab-ce即可正常启动。

  • 相关阅读:
    python面向对象中的一些特殊__方法__
    mysql数据库的优化和查询效率的优化
    详解python的垃圾回收机制
    基于django的自定义简单session功能
    使用python制作验证码
    Netty 系列之 Netty 高性能之道
    Java提高篇(二七)-----TreeMap
    Oracle、MySql、SQLServer 数据分页查询
    深入理解数据库原理系列(1)---日志系统原理
    34个数据库常见面试题讲解
  • 原文地址:https://www.cnblogs.com/vana/p/11422489.html
Copyright © 2011-2022 走看看