使用docker安装的pg9.5容器,突然云主机升级直接停机后pg数据库容器启动不了后查看容器日志提示以下内容,
解决:按提示将容器的配置文件复制出来后修改后再复制到容器中
sudo docker cp pg_hba.conf 4d62f4628665:/var/lib/postgresql/data/pg_hba.conf //将本地配置文件复制到容器中
sudo docker cp 4d62f4628665:/var/lib/postgresql/data/pg_hba.conf . //将容器配置文件复制到当前目录中
LOG: syntax error in file "/var/lib/postgresql/data/postgresql.conf" line 1, near token "*"
FATAL: configuration file "/var/lib/postgresql/data/postgresql.conf" contains errors
listen_addresses =¡¯*¡¯ 改为 listen_addresses = "*"后报以下错误:
LOG: syntax error in file "/var/lib/postgresql/data/postgresql.conf" line 1, near token """
FATAL: configuration file "/var/lib/postgresql/data/postgresql.conf" contains errors
listen_addresses = "*"改为 listen_addresses = '*'后启动正常
LOG: invalid connection type "*

最低0.47元/天 解锁文章
2468

被折叠的 条评论
为什么被折叠?



