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/

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

相关推荐
yunson_Liu17 小时前
jenkins更新了gitlab后出现报错
运维·gitlab·jenkins
stark张宇20 小时前
Git 与 GitHub 协同工作流:从0到1搭建版本控制体系
git·gitlab·github
牛马的人生6 天前
GitLab入门教程:打开DevOps全流程的大门
运维·其他·gitlab·devops
水冗水孚6 天前
Ubuntu服务器上使用docker-compose部署 gitlab(图文并茂记录)
gitlab
<花开花落>8 天前
gitlab-runner 再次实践中理解和学习
gitlab
Vahala0623-孔勇9 天前
CI/CD流水线优化:GitLab CI镜像构建加速实战
ci/cd·gitlab
Lin_Aries_04219 天前
部署 GitLab 服务器
linux·运维·服务器·docker·gitlab·github
FreeBuf_10 天前
GitLab高危漏洞可致实例崩溃(CVE-2025-10858 和 CVE-2025-8014)
gitlab
恒雨田10 天前
Jenkins安装并与GitLab集成,实现dev、qa、uat、prod多分支持续集成的详细步骤
ci/cd·gitlab·jenkins
꧁༺摩༒西༻꧂10 天前
Windows Server 2022离线搭建Gitlab
gitlab