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/

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

相关推荐
裁二尺秋风12 小时前
CI/CD — Pipeline的使用以及Blue Ocean多分支流水线的使用方法
ci/cd·gitlab·jenkins
CC码码2 天前
管理你的多个 Git 密钥(多平台多账号)
git·gitlab·github
CC码码2 天前
管理你的多个 Git 密钥(单平台多账号)
git·gitlab·github
兔老大RabbitMQ2 天前
GitLab详细分析
gitlab
小道仙9715 天前
gitlab对接,gitlabRestApi,gitlab4j-api
java·git·gitlab
tswddd15 天前
项目:Gitlab HSD CI/CD总结
ci/cd·kubernetes·gitlab
许_安16 天前
docker中部署gitlab
docker·eureka·gitlab
Haoea!16 天前
持续集成 CI/CD-Jenkins持续集成GitLab项目打包docker镜像推送k8s集群并部署至rancher
ci/cd·gitlab·jenkins·rancher
xiaodaiwang16 天前
获取gitlab上项目分支版本(二)
gitlab
极小狐16 天前
GitLab CVE-2025-4278 安全漏洞解决方案
ci/cd·gitlab·devsecops·devops·gitlab升级·极狐gitlab·安全升级