Ubuntu安装Gitlab完后,报bash[migrate gitlab-rails database]的问题

发布于 2022-09-11 19:28:33 字数 1556 浏览 17 评论 0

根据Gitlab 官网的安装方法,在执行以下命令时出现了问题:

sudo apt-get install gitlab-ce

具体错误如下:

There was an error running gitlab-ctl reconfigure:

bash[migrate gitlab-rails database] (gitlab::database_migrations line 51) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of "bash"  "/tmp/chef-script20190428-15510-28f5ti" ----
STDOUT: WARNING: No valid license encryption key provided.
rake aborted!
NameError: uninitialized constant Elasticsearch
/opt/gitlab/embedded/service/gitlab-rails/config/initializers/elastic_client_setup.rb:5:in `<top (required)>'
/opt/gitlab/embedded/service/gitlab-rails/config/environment.rb:6:in `<top (required)>'
/opt/gitlab/embedded/bin/bundle:23:in `load'
/opt/gitlab/embedded/bin/bundle:23:in `<main>'
Tasks: TOP => gitlab:db:configure => environment
(See full trace by running task with --trace)
STDERR: 
---- End output of "bash"  "/tmp/chef-script20190428-15510-28f5ti" ----
Ran "bash"  "/tmp/chef-script20190428-15510-28f5ti" returned 1

安装的gitlab安装包来源与版本信息:

https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/ubuntu xenial InRelease
gitlab-ce (11.10.1-ce.0)

服务器信息:

Description:    Ubuntu 16.04.6 LTS (x86_64)
Release:    16.04
Codename:    xenial

已经试过的方法

  • 重装Gitlab
  • 把Gitlab换成低版本的(一路调到8)
  • 安装后,重启服务器

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

你对谁都笑 2022-09-18 19:28:34

我怀疑你是不是把 ee 版本的安装脚本当 ce 的给运行了,因为你给的官网地址上的安装方法就是 ee 版的
而且ee版才需要 license。

我的奇迹 2022-09-18 19:28:33

第一次执行了sudo apt-get install gitlab-ee,发现不对后卸载了。
之后再次执行sudo apt-get install gitlab-ce就报问题里的错误。
后来把有关gitlab的文件都清理干净后安装成功。


我清理的文件目录如下:

opt/gitlab
etc/gitlab
var/opt/gitlab
var/log/gitlab
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文