Re: pgAdmin4 won't start after OS upgrade

2020-09-02 Thread Dave Page
On Wed, Sep 2, 2020 at 1:11 PM Ray O'Donnell  wrote:

> On 02/09/2020 08:50, Dave Page wrote:
> >
> >
> > On Tue, Sep 1, 2020 at 5:28 PM Ray O'Donnell  > > wrote:
>
> 
>
> > 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.
>
> That sorted it! I renamed /home/rod/.local/lib/python3.5, and pgAdmin
> was then able to start.
>

\o/


>
> I looked into  ~/.config/pgadmin/pgadmin4.conf as you suggested, and
> there is indeed a PythonPath line:
>
>
> PythonPath="/home/rod/.local/lib/python3.5;/home/rod/.local/lib/python3.5/site-packages"
>
> Can I safely delete this line?
>

Yes.


>
> I think the Python 3.5 installation is cruft from historical
> installations of pgAdmin4, before the deb packages became available...
> I'll leave it there for the moment, and if nothing else breaks I'll
> eventually delete it.
>
> Thanks a million for your help!
>

You're welcome.


-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EDB: http://www.enterprisedb.com


Re: pgAdmin4 won't start after OS upgrade

2020-09-02 Thread Ray O'Donnell
On 02/09/2020 08:50, Dave Page wrote:
> 
> 
> On Tue, Sep 1, 2020 at 5:28 PM Ray O'Donnell  > wrote:



> 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.

That sorted it! I renamed /home/rod/.local/lib/python3.5, and pgAdmin
was then able to start.

I looked into  ~/.config/pgadmin/pgadmin4.conf as you suggested, and
there is indeed a PythonPath line:

PythonPath="/home/rod/.local/lib/python3.5;/home/rod/.local/lib/python3.5/site-packages"

Can I safely delete this line?

I think the Python 3.5 installation is cruft from historical
installations of pgAdmin4, before the deb packages became available...
I'll leave it there for the moment, and if nothing else breaks I'll
eventually delete it.

Thanks a million for your help!

Ray.


-- 
Raymond O'Donnell // Galway // Ireland
r...@rodonnell.ie




Re: pgAdmin4 won't start after OS upgrade

2020-09-02 Thread Dave Page
On Tue, Sep 1, 2020 at 5:28 PM Ray O'Donnell  wrote:

> On 01/09/2020 17:07, Dave Page wrote:
> >
> >
> > On Tue, Sep 1, 2020 at 5:03 PM Ray O'Donnell  > > 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.

See https://www.pgadmin.org/docs/pgadmin4/4.25/desktop_deployment.html for
more info.

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


Re: pgAdmin4 won't start after OS upgrade

2020-09-02 Thread Dave Page
Please post your question to a new thread rather than replying to an
existing one so people don't get confused.

Thanks.

On Wed, Sep 2, 2020 at 1:58 AM Bo Guo  wrote:

> Hi there,
>
> pgAdmin4 acted up today when I start using it mid afternoon - I was
> presented a "blank" page after login (see image below).  We tried different
> browsers on different OS with the same issue.  Please kindly advise.
>
> My server is Ubuntu 18.04 and here is the content of file
> "/etc/apt/sources.list.d/pgdg.list"
>
> deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main
>
> On 9/1/20 9:07 AM, Dave Page wrote:
>
>
>
> On Tue, Sep 1, 2020 at 5:03 PM Ray O'Donnell  wrote:
>
>> On 01/09/2020 16:58, Dave Page wrote:
>> > Hi
>> >
>> > On Tue, Sep 1, 2020 at 4:33 PM Ray O'Donnell > > > wrote:
>> >
>> > Hi all,
>> >
>> > I upgraded my laptop yesterday from Debian 9 to 10 (Buster), and now
>> > pgAdmin4 won't start. It tries to start for a while, and then I get
>> a
>> > little dialog saying "An error occurred initialising the pgAdmin
>> server:
>> > Failed to launch the application server, server thread exiting."
>>
>> 
>>
>> >
>> >
>> > Probably due to the library differences in stretch vs. buster.
>> >
>> > I would remove the existing pgAdmin packages with dpkg, then
>> > edit /etc/apt/sources.list.d/pgadmin4.list and correct the URL (change
>> > stretch to buster). Then do an apt get update before installing pgAdmin
>> > again.
>>
>> 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.
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EDB: http://www.enterprisedb.com
>
> --
> Regards,
>
> Bo Guo, PhD, PE
> President
> Gistic Research, Inc.
> 2033 E Warner Rd Ste 105
> Tempe, AZ 85284www.gisticinc.comwww.youtube.com/linearbench
> Office: 480-656-9962
> Cell: 602-570-4697
>
>

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EDB: http://www.enterprisedb.com


Re: pgAdmin4 won't start after OS upgrade

2020-09-01 Thread Bo Guo

Hi there,

pgAdmin4 acted up today when I start using it mid afternoon - I was 
presented a "blank" page after login (see image below).  We tried 
different browsers on different OS with the same issue. Please kindly 
advise.


My server is Ubuntu 18.04 and here is the content of file 
"/etc/apt/sources.list.d/pgdg.list"


deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main

On 9/1/20 9:07 AM, Dave Page wrote:



On Tue, Sep 1, 2020 at 5:03 PM Ray O'Donnell > wrote:


On 01/09/2020 16:58, Dave Page wrote:
> Hi
>
> On Tue, Sep 1, 2020 at 4:33 PM Ray O'Donnell mailto:r...@rodonnell.ie>
> >> wrote:
>
>     Hi all,
>
>     I upgraded my laptop yesterday from Debian 9 to 10 (Buster),
and now
>     pgAdmin4 won't start. It tries to start for a while, and
then I get a
>     little dialog saying "An error occurred initialising the
pgAdmin server:
>     Failed to launch the application server, server thread exiting."



>
>
> Probably due to the library differences in stretch vs. buster.
>
> I would remove the existing pgAdmin packages with dpkg, then
> edit /etc/apt/sources.list.d/pgadmin4.list and correct the URL
(change
> stretch to buster). Then do an apt get update before installing
pgAdmin
> again.

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.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EDB: http://www.enterprisedb.com


--
Regards,

Bo Guo, PhD, PE
President
Gistic Research, Inc.
2033 E Warner Rd Ste 105
Tempe, AZ 85284
www.gisticinc.com
www.youtube.com/linearbench
Office: 480-656-9962
Cell: 602-570-4697



Re: pgAdmin4 won't start after OS upgrade

2020-09-01 Thread Ray O'Donnell
On 01/09/2020 17:07, Dave Page wrote:
> 
> 
> On Tue, Sep 1, 2020 at 5:03 PM Ray O'Donnell  > 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?

Thanks,

Ray.



-- 
Raymond O'Donnell // Galway // Ireland
r...@rodonnell.ie




Re: pgAdmin4 won't start after OS upgrade

2020-09-01 Thread Dave Page
On Tue, Sep 1, 2020 at 5:03 PM Ray O'Donnell  wrote:

> On 01/09/2020 16:58, Dave Page wrote:
> > Hi
> >
> > On Tue, Sep 1, 2020 at 4:33 PM Ray O'Donnell  > > wrote:
> >
> > Hi all,
> >
> > I upgraded my laptop yesterday from Debian 9 to 10 (Buster), and now
> > pgAdmin4 won't start. It tries to start for a while, and then I get a
> > little dialog saying "An error occurred initialising the pgAdmin
> server:
> > Failed to launch the application server, server thread exiting."
>
> 
>
> >
> >
> > Probably due to the library differences in stretch vs. buster.
> >
> > I would remove the existing pgAdmin packages with dpkg, then
> > edit /etc/apt/sources.list.d/pgadmin4.list and correct the URL (change
> > stretch to buster). Then do an apt get update before installing pgAdmin
> > again.
>
> 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.

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EDB: http://www.enterprisedb.com


Re: pgAdmin4 won't start after OS upgrade

2020-09-01 Thread Ray O'Donnell
On 01/09/2020 16:58, Dave Page wrote:
> Hi
> 
> On Tue, Sep 1, 2020 at 4:33 PM Ray O'Donnell  > wrote:
> 
> Hi all,
> 
> I upgraded my laptop yesterday from Debian 9 to 10 (Buster), and now
> pgAdmin4 won't start. It tries to start for a while, and then I get a
> little dialog saying "An error occurred initialising the pgAdmin server:
> Failed to launch the application server, server thread exiting."



> 
> 
> Probably due to the library differences in stretch vs. buster. 
> 
> I would remove the existing pgAdmin packages with dpkg, then
> edit /etc/apt/sources.list.d/pgadmin4.list and correct the URL (change
> stretch to buster). Then do an apt get update before installing pgAdmin
> again.

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?

Ray.

-- 
Raymond O'Donnell // Galway // Ireland
r...@rodonnell.ie




Re: pgAdmin4 won't start after OS upgrade

2020-09-01 Thread Dave Page
Hi

On Tue, Sep 1, 2020 at 4:33 PM Ray O'Donnell  wrote:

> Hi all,
>
> I upgraded my laptop yesterday from Debian 9 to 10 (Buster), and now
> pgAdmin4 won't start. It tries to start for a while, and then I get a
> little dialog saying "An error occurred initialising the pgAdmin server:
> Failed to launch the application server, server thread exiting."
>
> I have the pgadmin4-server, pgadmin4-desktop and pgadmin4-doc packages
> installed, version 4.25, all installed via apt from the pgAdmin repo.
> Removing and reinstalling them makes no difference. I have also deleted
> the settings database at ~/.pgadmin/pgadmin4.db, but no difference. The
> log file at ~/.pgadmin/pgadmin4.log is empty.
>
> Where else should I be looking? I know nothing about Python, so I don't
> know where to start.
>
> Thanks in advance - any help will be greatly appreciated.
>

Probably due to the library differences in stretch vs. buster.

I would remove the existing pgAdmin packages with dpkg, then
edit /etc/apt/sources.list.d/pgadmin4.list and correct the URL (change
stretch to buster). Then do an apt get update before installing pgAdmin
again.


-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EDB: http://www.enterprisedb.com