无法在pgadmin4中创建Postgresql服务器吗?

问题描述 投票:0回答:1

我无法通过pgadmin创建我的postgresql数据库,但我经历了很多过程,但无法修复,我的操作系统是Manjaro KDE'ARCH LINUX'

并且当我要创建服务器时错误显示如下我不知道到底是什么问题


could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432? ```


systemctl status postgresql.service的错误日志


● postgresql.service - PostgreSQL database server
     Loaded: loaded (/usr/lib/systemd/system/postgresql.service; disabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since Mon 2020-04-13 16:22:46 +0545; 15s ago
    Process: 4041 ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGROOT}/data (code=exited, status=0/SUCCESS)
    Process: 4043 ExecStart=/usr/bin/postgres -D ${PGROOT}/data (code=exited, status=1/FAILURE)
   Main PID: 4043 (code=exited, status=1/FAILURE)

Apr 13 16:22:46 rijalboy postgres[4043]: 2020-04-13 16:22:46.391 +0545 [4043] LOG:  could not bind IPv6 address "::1": Address a>
Apr 13 16:22:46 rijalboy postgres[4043]: 2020-04-13 16:22:46.391 +0545 [4043] HINT:  Is another postmaster already running on po>
Apr 13 16:22:46 rijalboy postgres[4043]: 2020-04-13 16:22:46.391 +0545 [4043] LOG:  could not bind IPv4 address "127.0.0.1": Add>
Apr 13 16:22:46 rijalboy postgres[4043]: 2020-04-13 16:22:46.391 +0545 [4043] HINT:  Is another postmaster already running on po>
Apr 13 16:22:46 rijalboy postgres[4043]: 2020-04-13 16:22:46.391 +0545 [4043] WARNING:  could not create listen socket for "loca>
Apr 13 16:22:46 rijalboy postgres[4043]: 2020-04-13 16:22:46.391 +0545 [4043] FATAL:  could not create any TCP/IP sockets
Apr 13 16:22:46 rijalboy postgres[4043]: 2020-04-13 16:22:46.391 +0545 [4043] LOG:  database system is shut down
Apr 13 16:22:46 rijalboy systemd[1]: postgresql.service: Main process exited, code=exited, status=1/FAILURE
Apr 13 16:22:46 rijalboy systemd[1]: postgresql.service: Failed with result 'exit-code'.
Apr 13 16:22:46 rijalboy systemd[1]: Failed to start PostgreSQL database server.
lines 1-17/17 (END)...skipping...
● postgresql.service - PostgreSQL database server
     Loaded: loaded (/usr/lib/systemd/system/postgresql.service; disabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since Mon 2020-04-13 16:22:46 +0545; 15s ago
    Process: 4041 ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGROOT}/data (code=exited, status=0/SUCCESS)
    Process: 4043 ExecStart=/usr/bin/postgres -D ${PGROOT}/data (code=exited, status=1/FAILURE)
   Main PID: 4043 (code=exited, status=1/FAILURE)

Apr 13 16:22:46 rijalboy postgres[4043]: 2020-04-13 16:22:46.391 +0545 [4043] LOG:  could not bind IPv6 address "::1": Address already in use
Apr 13 16:22:46 rijalboy postgres[4043]: 2020-04-13 16:22:46.391 +0545 [4043] HINT:  Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
Apr 13 16:22:46 rijalboy postgres[4043]: 2020-04-13 16:22:46.391 +0545 [4043] LOG:  could not bind IPv4 address "127.0.0.1": Address already in use
Apr 13 16:22:46 rijalboy postgres[4043]: 2020-04-13 16:22:46.391 +0545 [4043] HINT:  Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
Apr 13 16:22:46 rijalboy postgres[4043]: 2020-04-13 16:22:46.391 +0545 [4043] WARNING:  could not create listen socket for "localhost"
Apr 13 16:22:46 rijalboy postgres[4043]: 2020-04-13 16:22:46.391 +0545 [4043] FATAL:  could not create any TCP/IP sockets
Apr 13 16:22:46 rijalboy postgres[4043]: 2020-04-13 16:22:46.391 +0545 [4043] LOG:  database system is shut down
Apr 13 16:22:46 rijalboy systemd[1]: postgresql.service: Main process exited, code=exited, status=1/FAILURE
Apr 13 16:22:46 rijalboy systemd[1]: postgresql.service: Failed with result 'exit-code'.
Apr 13 16:22:46 rijalboy systemd[1]: Failed to start PostgreSQL database server.
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
lines 1-17/17 (END)...skipping...
● postgresql.service - PostgreSQL database server
     Loaded: loaded (/usr/lib/systemd/system/postgresql.service; disabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since Mon 2020-04-13 16:22:46 +0545; 15s ago
    Process: 4041 ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGROOT}/data (code=exited, status=0/SUCCESS)
    Process: 4043 ExecStart=/usr/bin/postgres -D ${PGROOT}/data (code=exited, status=1/FAILURE)
   Main PID: 4043 (code=exited, status=1/FAILURE)

Apr 13 16:22:46 rijalboy postgres[4043]: 2020-04-13 16:22:46.391 +0545 [4043] LOG:  could not bind IPv6 address "::1": Address already in use
Apr 13 16:22:46 rijalboy postgres[4043]: 2020-04-13 16:22:46.391 +0545 [4043] HINT:  Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
Apr 13 16:22:46 rijalboy postgres[4043]: 2020-04-13 16:22:46.391 +0545 [4043] LOG:  could not bind IPv4 address "127.0.0.1": Address already in use
Apr 13 16:22:46 rijalboy postgres[4043]: 2020-04-13 16:22:46.391 +0545 [4043] HINT:  Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
Apr 13 16:22:46 rijalboy postgres[4043]: 2020-04-13 16:22:46.391 +0545 [4043] WARNING:  could not create listen socket for "localhost"
Apr 13 16:22:46 rijalboy postgres[4043]: 2020-04-13 16:22:46.391 +0545 [4043] FATAL:  could not create any TCP/IP sockets
Apr 13 16:22:46 rijalboy postgres[4043]: 2020-04-13 16:22:46.391 +0545 [4043] LOG:  database system is shut down
Apr 13 16:22:46 rijalboy systemd[1]: postgresql.service: Main process exited, code=exited, status=1/FAILURE
Apr 13 16:22:46 rijalboy systemd[1]: postgresql.service: Failed with result 'exit-code'.
Apr 13 16:22:46 rijalboy systemd[1]: Failed to start PostgreSQL database server.
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
lines 1-17/17 (END)

是这样我不知道是什么问题吗?请帮助我解决这个问题

database postgresql archlinux pgadmin-4
1个回答
0
投票

PgAdmin4的“ create-> server ...”选项不会自行创建PostgreSQL服务器,它会创建一条记录,允许PgAdmin4连接到现有的并正在运行的服务器。

© www.soinside.com 2019 - 2024. All rights reserved.