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

时间:2020-04-08 06:02:06

标签: database postgresql archlinux pgadmin-4

我无法通过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)

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

1 个答案:

答案 0 :(得分:0)

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

是的pgadmin服务器正在运行

pgadmin服务器与PostgreSQL服务器完全不同。