gitlab 因掉电启动失败的问题

序言

这个月公司又忘教电费了,服务器掉电直接宕了,果然公司搭的gitlab又一次洗白了。

寻找并解决问题

通过查看日志发现,果然又是postgresql的锅,fatal: the database system is starting up。

  • 根据上一次的经验,删除 postgresql 的 postmaster.pid 即可,postgresql启动后会写入postmaster.pid文件
    所有才会出现上面那个错误。

然而事情并没有想象中简单,fatal:connections on Unix domain socket "/var/opt/gitlab/postgresql/.s.PGSQL.5432"
这个问题网上各种Path的问题,但是我在容器中还去设置这个多麻烦。

  • 直接删除映射出来的postmaster.pid文件,然后删除容器,重新开启一个容器即可。

postgresql基本上掉电就拉闸...佛了...

续集

上集书说道,pg报错fatal: the database system is starting up。删除容器重开一个即可.
然后百试百灵的重开这次却没有生效...
最后在网上得到了解答,其实pg报错fatal: the database system is starting up。是在自己自愈的过程中,我们只需要耐心等待即可...
链接:https://stackoverflow.com/questions/54922433/postgresql-fatal-the-database-system-is-starting-up-windows-10

原文地址:https://www.cnblogs.com/wh-blog/p/12507556.html