Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pgadmin4 : postgresql application server could not be contacted.

People also ask

Why is pgAdmin not connecting to server?

If pgAdmin displays this message, there are two possible reasons for this: the database server isn't running - simply start it. the server isn't configured to accept TCP/IP requests on the address shown.

How do I run pgAdmin as administrator?

Just click on that pgadmin 4 icon and run as administrator. Allow the access permissions. It will start locally.


I found the same issue when upgrading to pgAdmin 4 (v1.6). On Windows I found that clearing out the content inside C:\Users\%USERNAME%\AppData\Roaming\pgAdmin\sessions 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.


We got the same issue. so no any change in the file. but start pgAdmin 4 using administrator.

The following step. 1. right click pgAdmin 4 icon 2. select "Run As Administrator"


I had the same issue on Windows 10, with a new installation of PostgreSQL 10.

I solved it by including the path C:\PostgreSQL\10\bin ({your path to postgresql}\bin) to system environment variables.

To access environment variables: Control Panel > System and security > System or right click on PC, then > Advance system settings > Environment variables > System variables > Path > Edit.


It seems in most of the cases Postgres trying to use information from previous sessions to find/connect the server and failing. Clearing out the previous session info helped me, it is a combination of 2 already mentioned answers above:

  1. Navigate to Postgres session's folder C:\Users\YourUsernameOrAdmin\AppData\Roaming\pgAdmin\sessions
  2. Delete all the data from this folder.
  3. Start PgAdmin in administrator mode.

Cheers!


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!