GitLab|GitLab报错:PG::ConnectionBad: could not connect to server...

错误信息:

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)

解决方案:

  1. 按住CTRL+C强制结束

  2. 停止 GitLab,执行命令:gitlab-ctl stop

  3. 执行命令:chmod 755 /var/opt/gitlab/postgresql

  4. 再次配置:gitlab-ctl reconfigure

  5. 启动即可:gitlab-ctl restart

作者:Kkoo

链接:https://www.pwwwp.com/

著作权归作者所有。商业转载请联系作者进行授权,非商业转载请注明出处。

相关推荐
极小狐2 天前
从 GitLab Flow 到 Pipeline:分支策略 + CI/CD + 运维一文打通
ci/cd·gitlab·devops·极狐gitlab
猫头虎3 天前
GitHub 入门教程:如何加入并为开源项目贡献代码
gitee·开源·gitlab·github·开放原子·开源协议·gitcode
悠然南风5 天前
【云原生学习】Prometheus监控、GitLab与Jenkins部署实战
kubernetes·gitlab
极小狐6 天前
极狐GitLab Runner 自托管安全加固指南
安全·ci/cd·gitlab·devops·runner·安全加固
钝挫力PROGRAMER7 天前
Windows Docker 环境搭建 GitLab CI/CD 流水线
windows·docker·gitlab·gitlab-runner
我一定会有钱13 天前
打造完美工作流:Git 配置”一次推送,三端同步”(Gitee/GitCode/GitHub)
开发语言·windows·vscode·搜索引擎·gitlab·github·visual studio code
LXY_BUAA13 天前
Git_在飞牛中部署 GitLab_20260817
git·gitlab
Jeanyia16 天前
GitLab 配套 Git 常用命令
git·gitlab
极小狐16 天前
极狐GitLab 补丁版本:19.2.1、19.1.3、19.0.5
网络·安全·gitlab·极狐gitlab·安全更新·补丁版本