pgadmin4 : postgresql application server could not be contacted.

后端 未结 30 2119
太阳男子
太阳男子 2020-12-07 10:31

I have installed PostgreSQL 9.6.2 on my Windows 8.1. But the pgadmin4 is not able to contact the local server. I have tried several solutions suggested here in stackoverflow

相关标签:
30条回答
  • 2020-12-07 11:15

    I need to add this here because I've had several issues with this message. If you have recently upgraded to High Sierra you will find the latest (pgadmin 4.20) will keep appearing with the message "Application Server Could Not be Contacted". What this actually means on Macs is that python was unable to configure your environment in ~/.pgadmin

    This directory stores all the things you setup and configure and even logs of what was ran on your user copy usage of pgadmin.

    The way to fix this issue on High Sierra is down to sqlite3. If you look in that directory you'll see everything is stored in sqlite3 files.

    When version 4.20 of pgadmin was released it was shipped with a version later than sqlite3.19 and the problem arises because High Sierra is shipped with sqlite3.19, so to fix this issue, you need to replace the old version of sqlite3 with the latest on your packager.

    Now be aware, MacosX+ all use sqlite to store details for the majority of apps on your mac, so you'll need to make sure you do not just wipe the old version but you'll have to have both versions co-existing together in harmony to avoid anything major occurring on your mac.

    1) download brew https://brew.sh/

    2) update brew and upgrade brew to make sure it's up-to-date

    3) brew install sqlite3

    4) mv /usr/bin/sqlite3 /usr/bin/sqlite3.os

    5) ln -s /usr/local/Cellar/sqlite/3.21.0/bin/sqlite3 /usr/bin/sqlite3

    6) /usr/bin/sqlite3 -version (check version is later than 3.19)

    You can now proceed to open up pgadmin as normal

    0 讨论(0)
  • 2020-12-07 11:16

    if you are using Mac OS X here is a fix: Open terminal and run this command

    pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log restart
    

    and for other OS just restart your Postgresql server, it will solve

    Then start pgAdmin4, it will start as normal

    Share or comment if saved someone

    0 讨论(0)
  • 2020-12-07 11:16

    I had the same problem, but running it as an admin worked.

    0 讨论(0)
  • 2020-12-07 11:18

    I found the same issue when upgrading to pgAdmin 4 (v1.6). On Windows I found that clearing out the C:\Users\%USERNAME%\AppData\Roaming\pgAdmin folder fixed the issue for me. I believe it was attempting to use the sessions from the prior version and was failing. I know the question was marked as answered, but downgrading may not always be an option.

    Note: AppData\Roaming\pgAdmin is a hidden folder.

    0 讨论(0)
  • 2020-12-07 11:18

    I was able to solve the problem by changing the pgAdmin web interface port.

    I believe this problem occurred on my computer because I have several other services consuming webs ports like qBittorrent, IDEJetbrains, etc.

    Right-clicking on the pgAdmin logo near the clock is possible to configure it.

    0 讨论(0)
  • 2020-12-07 11:18

    Happens mostly when you have multiple versions of pgadmin installed or while trying to upgrade. Even I tried everything from killing the "running PID on port 5432" to "changing the server mode". In my case I uninstall postgres and re-install it again on different port(5433). Later, I opened it through cmd(right click on cmd and select "run cmd as an Administrator").

    0 讨论(0)
提交回复
热议问题