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即可正常启动。

  • 相关阅读:
    java 多个设备,锁定先后顺序
    使用个推的时候出现Installation error: INSTALL_FAILED_DUPLICATE_PERMISSION
    android 开发-设置控件/view的水平方向翻转
    IIS8中 出现ashx 401:未授权,uploadify上传文件失败
    No Launcher activity found!
    activiti工作流之Eclipse的Eclipse BPMN 2.0 Designer无法安装或者(安装后无法重复打开*.bpmn)
    android Ant 打包
    andorid 直接解压后的xml的解密
    获取当前运行的类名或者方法
    http断点下载客户端和服务端
  • 原文地址:https://www.cnblogs.com/vana/p/11422489.html
Copyright © 2011-2022 走看看