0

I updated my OS to Ubuntu 19.04. I had been using pgadmin4 on Ubuntu 18.10 and it worked without problems, but now that I have updated I get this error:

the application server could not be contacted

I tried uninstalling pgadmin4 and reinstalling but without improvement.

I also reactivated the postgresql repository because when updating to Ubuntu 19.04 I deactivated some repositories.

3
  • is your postgres server running? – JayEye Apr 21 '19 at 19:37
  • HI @Kenetch did something worked for you? I am still having this issue. – Andrew James Ramirez May 18 '20 at 11:04
  • Hi @AndrewJamesRamirez. the desktop application does not work, but I installed the version of apache2 and that works well for me, currently I use everything with docker, but at the time I use it with apache. – KenetCh May 18 '20 at 13:24
2

Try following the advice in this article: How to Install and Configure pgAdmin4 on Ubuntu 18.04 & 16.04

Remove the previous installation

sudo apt-get remove pgadmin4

and reinstall

sudo apt-get install wget ca-certificates
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'
sudo apt-get update
sudo apt-get install pgadmin4 pgadmin4-apache2

for me it worked.

1

On Ubuntu 20.04, If,

sudo python3 /usr/share/pgadmin4/web/pgAdmin4.py

gives an error,

FileNotFoundError: [Errno 2] No such file or directory: '/var/cache/pgadmin/sessions'

Simply create the missing file path as,

sudo mkdir -p /var/cache/pgadmin/sessions

and rerun,

sudo python3 /usr/share/pgadmin4/web/pgAdmin4.py

For output as below -

$ sudo python3 /usr/share/pgadmin4/web/pgAdmin4.py
NOTE: Configuring authentication for SERVER mode.
Enter the email address and password to use for the initial pgAdmin user account:
Email address: what_ever@email_u_like.com
Password: 
Retype password:

pgAdmin 4 - Application Initialisation
======================================

Starting pgAdmin 4. Please navigate to ***http://127.0.0.1:5050*** in your browser.

 * Serving Flask app "pgadmin" (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off

This would present the pgAdmin4 login window in your browser.

0

Just try from terminal :

$ pgadmin4

It will result just like this :

Python path:  "/usr/lib/python3/dist-packages" 
Python Home:  ""
Webapp path:  "/usr/share/pgadmin4/web/pgAdmin4.py"

If it doesn't work ,copy webapp path and You can start it manually:

$ sudo python3 /usr/share/pgadmin4/web/pgAdmin4.py
0

I had to do

sudo mkdir /var/cache/pgadmin/

before starting pgadmin4.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.