Re: pgAdmin4 won't start after OS upgrade - Mailing list pgadmin-support

From Dave Page
Subject Re: pgAdmin4 won't start after OS upgrade
Date
Msg-id CA+OCxoyCu1c03nszfh+XAyu6JRvMf5VFwyrZf-hNrXQSXfKK+Q@mail.gmail.com
Whole thread Raw
In response to Re: pgAdmin4 won't start after OS upgrade  (Ray O'Donnell <ray@rodonnell.ie>)
Responses Re: pgAdmin4 won't start after OS upgrade  (Ray O'Donnell <ray@rodonnell.ie>)
List pgadmin-support


On Tue, Sep 1, 2020 at 5:28 PM Ray O'Donnell <ray@rodonnell.ie> wrote:
On 01/09/2020 17:07, Dave Page wrote:
>
>
> On Tue, Sep 1, 2020 at 5:03 PM Ray O'Donnell <ray@rodonnell.ie
> <mailto:ray@rodonnell.ie>> wrote:
>
>     Hi Dave,
>
>     Thanks for responding so quickly. I should have been clearer - I did
>     that before the OS upgrade, going for the big-bang approach to the
>     upgrade (yes, I know that that's living dangerously!), so my current
>     installation is from the buster repo. I assumed that the pgAdmin and
>     Python libraries would have been upgraded along with everything else
>     when I did the OS upgrade - was I wrong?
>
>
> I don't know if dist-upgrade would have dealt with pgAdmin as well or
> not. It's possible there's some dependency or other missing now though I
> guess, so it probably wouldn't hurt to uninstall and then reinstall the
> packages.
>
> If that doesn't work, try running the pgAdmin binary from the command
> line and see if it complains about anything that's missing.

I removed (dpkg --purge) the packages, and reinstalled them:

rod@rambo:~$ sudo apt install pgadmin4-server pgadmin4-desktop
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  pgadmin4-desktop pgadmin4-server
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 67.8 MB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/buster
pgadmin4/main amd64 pgadmin4-server amd64 4.25 [67.4 MB]
Get:2 https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/buster
pgadmin4/main amd64 pgadmin4-desktop amd64 4.25 [384 kB]

Fetched 67.8 MB in 15s (4,554 kB/s)


Selecting previously unselected package pgadmin4-server.
(Reading database ... 476665 files and directories currently installed.)
Preparing to unpack .../pgadmin4-server_4.25_amd64.deb ...
Unpacking pgadmin4-server (4.25) ...
Selecting previously unselected package pgadmin4-desktop.
Preparing to unpack .../pgadmin4-desktop_4.25_amd64.deb ...
Unpacking pgadmin4-desktop (4.25) ...
Setting up pgadmin4-server (4.25) ...
Setting up pgadmin4-desktop (4.25) ...
Processing triggers for mime-support (3.62) ...
Processing triggers for desktop-file-utils (0.23-4) ...

I then tried running it from the command line as you suggested:

rod@rambo:~$ cd /usr/pgadmin4/bin/
rod@rambo:/usr/pgadmin4/bin$ ls -l
total 600
-rwxr-xr-x 1 root root 613792 Aug 18 13:54 pgadmin4
rod@rambo:/usr/pgadmin4/bin$ ./pgadmin4
QCoreApplication::applicationFilePath: Please instantiate the
QApplication object first
QCoreApplication::applicationFilePath: Please instantiate the
QApplication object first
Semaphore name: "pgadmin4-rod-ee77a0244675220dc7dad994b4311b50-sema"
Shared memory segment name:
"pgadmin4-rod-ee77a0244675220dc7dad994b4311b50-shmem"
Python path:
"/home/rod/.local/lib/python3.5/site-packages:/usr/pgadmin4/venv/lib/python3.7:/usr/lib/python3.7/lib-dynload:/usr/pgadmin4/venv/lib/python3.7/site-packages:/home/rod/.local/lib/python3.5"

Python Home:  "/usr/pgadmin4/venv"
Webapp path:  "/usr/pgadmin4/web/pgAdmin4.py"
"Failed to launch the application server, server thread exiting."

One thing caught my eye: the Python path in the above output includes
both Python 3.5 and 3.7 stuff... Any thoughts?

Hmm, yeah - looks like you may have a Python installation in /home/rod/.local/lib/python3.5 that got into the path?

Try temporarily moving it out of the way and see if that helps. Also, check in ~/.config/pgadmin/pgadmin4.conf to see if there's a PythonPath key that's confusing things.


FYI, our Ubuntu packages ship with a virtual environment in /usr/pgadmin4/venv/ which is based on the system install of Python 3.7.
 
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EDB: http://www.enterprisedb.com

pgadmin-support by date:

Previous
From: Polgár Benedek
Date:
Subject: Vá: pgadmin 4.25 version - fix port number
Next
From: Dave Page
Date:
Subject: Re: pgAdmin4 won't start after OS upgrade