PostgreSQL 9.6 CentOS 7 LibreTime - Job for postgresql.servi



我正在尝试将其与LibreTime一起使用,但由于某种原因它无法启动postgresql。

systemctl start postgresql
Job for postgresql.service failed because the control process exited with error code. See "systemctl status postgresql.service" and "journalctl -xe" for details.

以下是来自journalctl -xe的信息 - 注意 - 出于隐私目的,我更改了实际主机名:

journalctl -xe
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit postgresql.service has begun starting up.
Jun 17 07:53:55 HOSTNAMEHIDDEN pg_ctl[14576]: LOG:  could not bind IPv6
Jun 17 07:53:55 HOSTNAMEHIDDEN pg_ctl[14576]: HINT:  Is another postmas
Jun 17 07:53:55 HOSTNAMEHIDDEN pg_ctl[14576]: LOG:  could not bind IPv4
Jun 17 07:53:55 HOSTNAMEHIDDEN pg_ctl[14576]: HINT:  Is another postmas
Jun 17 07:53:55 HOSTNAMEHIDDEN pg_ctl[14576]: WARNING:  could not creat
Jun 17 07:53:55 HOSTNAMEHIDDEN pg_ctl[14576]: FATAL:  could not create
Jun 17 07:53:56 HOSTNAMEHIDDEN pg_ctl[14576]: pg_ctl: could not start s
Jun 17 07:53:56 HOSTNAMEHIDDEN pg_ctl[14576]: Examine the log output.
Jun 17 07:53:56 HOSTNAMEHIDDEN systemd[1]: postgresql.service: control
Jun 17 07:53:56 HOSTNAMEHIDDEN systemd[1]: Failed to start PostgreSQL d
-- Subject: Unit postgresql.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit postgresql.service has failed.
--
-- The result is failed.
Jun 17 07:53:56 HOSTNAMEHIDDEN systemd[1]: Unit postgresql.service ente
Jun 17 07:53:56 HOSTNAMEHIDDEN systemd[1]: postgresql.service failed.
Jun 17 07:53:56 HOSTNAMEHIDDEN polkitd[470]: Unregistered Authenticatio
lines 1579-1601/1601 (END)

我是 CentOS 的新手,正在尝试按照本教程来让这件事工作。 这似乎是唯一的失败点。 http://libretime.org/manual/preparing-the-server/

提前感谢您的任何帮助!

-编辑- 这是完整的代码,哎呀:

systemctl status postgresql.service -l
● postgresql.service - PostgreSQL database server
Loaded: loaded (/usr/lib/systemd/system/postgresql.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sun 2018-06-17 08:30:43 EDT; 18s ago
Process: 15512 ExecStart=/usr/bin/pg_ctl start -D ${PGDATA} -s -o -p ${PGPORT} -w -t 300 (code=exited, status=1/FAILURE)
Process: 15507 ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGDATA} (code=exited, status=0/SUCCESS)
Jun 17 08:30:42 HostnameHidden pg_ctl[15512]: LOG:  could not bind IPv6 socket: Address already in use
Jun 17 08:30:42 HostnameHidden pg_ctl[15512]: HINT:  Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
Jun 17 08:30:42 HostnameHidden pg_ctl[15512]: LOG:  could not bind IPv4 socket: Address already in use
Jun 17 08:30:42 HostnameHidden pg_ctl[15512]: HINT:  Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
Jun 17 08:30:42 HostnameHidden pg_ctl[15512]: WARNING:  could not create listen socket for "localhost"
Jun 17 08:30:42 HostnameHidden pg_ctl[15512]: FATAL:  could not create any TCP/IP sockets
Jun 17 08:30:43 HostnameHidden systemd[1]: postgresql.service: control process exited, code=exited status=1
Jun 17 08:30:43 HostnameHidden systemd[1]: Failed to start PostgreSQL database server.
Jun 17 08:30:43 HostnameHidden systemd[1]: Unit postgresql.service entered failed state.
Jun 17 08:30:43 HostnameHidden systemd[1]: postgresql.service failed.

好吧,所以这是一个可怕的"答案",但我通过拉下 9.6 版并穿上 9.3 版来"修复"它。

再次感谢。

最新更新