Ign*_*asi 9 postgresql ubuntu boot pid
当我尝试启动 Ubuntu 时,它永远不会完成启动过程,因为它出现消息“无法启动 PostgreSQL Cluster 10-main”。我也收到了与 9.5-main 相同的消息。但是让我们专注于 10。
当我执行:
systemctl status postgresql@10-main.service
Run Code Online (Sandbox Code Playgroud)
我收到以下消息:
postgresql@10-main.service - PostgreSQL Cluster 10-main
Loaded: loaded (/lib/systemd/system/postgresql@.service; indirect; vendor preset: enabled)
Active: failed (Result: protocol) since Wed 2020-02-19 17:57:22 CET; 30 min ago
Process: 1602 ExecStart=/usr/bin/pg_ctlcluster --skip-systemctl-redirect 10-main start (code_exited, status=1/FAILURE)
PC_info systemd[1]: Starting PostgreSQL Cluster 10-main...
PC_info postgresql@10-main[1602]: Error: /usr/lib/postgresql/10/bin/pg_ctl /usr/lib/postgresql/10/bin/pg_ctl start -D /var/lib/postgresql/10/main -l /var/log/postgresql/postgresql-19-main.log -s -o -c config_file="/etc/postgresql/10/main/postgresql.conf" exit with status 1:
PC_info systemd[1]: postgresql@10-main.service: Can't open PID file /var/run/postgresql/10-main.pid (yet?) after start: No such file or directory
PC_info systemd[1]: postgresql@10-main.service: Failed with result 'protocol'.
PC_info systemd[1]: Failed to start PostgreSQL Cluster 10-main.
Run Code Online (Sandbox Code Playgroud)
PC_info 是关于我的计算机的信息(用户、日期......)不相关
我从一天到另一天都收到此错误,而没有涉及与数据库服务器相关的任何内容。我试图自己修复它,但没有任何效果
编写命令
service postgresql@10-main start
Run Code Online (Sandbox Code Playgroud)
我得到
Job for postgresql@10-main.service failed because the service did not take the steps required by its unit configuration
See "systemctl status postgresql@10-main.service" and "journalctl -xe" for details.
Run Code Online (Sandbox Code Playgroud)
运行这两个命令,我从一开始就收到消息。
任何人都知道发生了什么?我该如何解决?
我遇到了同样的问题,我按照以下步骤操作,
错误状态:
pg_lsclustersVer Cluster Port Status Owner 数据目录 日志文件
10 主 5432 下 postgres /var/lib/postgresql/10/main /var/log/postgresql/postgresql-10-main.log
应用解决方案:
sudo chmod 700 -R /var/lib/postgresql/10/mainsudo -i -u postgrespostgres@abc:~$ /usr/lib/postgresql/10/bin/pg_ctl restart -D /var/lib/postgresql/10/main解决方案状态后:
pg_lsclustersVer Cluster Port Status Owner 数据目录 日志文件
10 main 5432 在线postgres /var/lib/postgresql/10/main /var/log/postgresql/postgresql-10-main.log
正如@gruentee 在上面的评论中提到的,
/usr/lib/postgresql/10/bin/pg_ctl restart -D /var/lib/postgresql/10/main -l /var/log/postgresql/postgresql-10-main.log -s -o '-c config_file="/etc/postgresql/10/main/postgresql.conf"'
Run Code Online (Sandbox Code Playgroud)
启动 postgresSql 数据库。别忘了
sudo -i -u postgres
Run Code Online (Sandbox Code Playgroud)
在发出上述命令之前
| 归档时间: |
|
| 查看次数: |
10207 次 |
| 最近记录: |