Re: pgadmin4 7.6 on RHEL 8.8 receives "Internal Server Error"

From: Khushboo Vashi <khushboo(dot)vashi(at)enterprisedb(dot)com>
To: Daxu Yin <daxuyin(at)yahoo(dot)com>
Cc: Yogesh Mahajan <yogesh(dot)mahajan(at)enterprisedb(dot)com>, "pgadmin-support(at)lists(dot)postgresql(dot)org" <pgadmin-support(at)lists(dot)postgresql(dot)org>
Subject: Re: pgadmin4 7.6 on RHEL 8.8 receives "Internal Server Error"
Date: 2023-09-07 06:24:11
Message-ID: CAFOhELfEBR6pBeYaOKjtryV7zth7M9AK2KOg5RWp0Yznj=wkwQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Hi,

On Wed, Sep 6, 2023 at 11:01 PM Daxu Yin <daxuyin(at)yahoo(dot)com> wrote:

> Hi Yogesh,
>
> Thanks a lot for promptly following this up.
>
> I kind of "fix" or bypassed the problem by examining the
> /var/log/httpd/error_log,
>
> 1. The error log suggested something wrong with the libpq package. The
> RHEL 8 instance has libpq5, but not libpq. So I installed:
> sudo yum install -y libpq
> sudo yum install -y libpq-devel # not 100% sure we need this one
>
> pgAdmin (psycopg package) requires libpq5 only. It may happen that old
libpq was already there on your system and psycopg used that one.

> At this point, somehow I feel I need to reinstall the pgadmin4, 'cause
> pgadmin4 perhaps would be "aware" of the new libpq, so I removed pgadmin4
> and reinstalled it:
> sudo yum remove pgadmin4
>
> sudo yum install pgadmin4-web
>
> sudo /usr/pgadmin4/bin/setup-web.sh
>
>
> 2. Restarted the server, the error log complained something wrong with
> psycopg python library. I have python 3.6 and python 3.11 on the node
> already, and later pgadmin4 brought in python 3.9. I did the followings:
>
> cd /usr/pgadmin4/venv/bin
> source activate #make sure I am in the python 3.9 environment
> pip install "psycopg[binary,pool]"
> deactivate
>
Basically, pgAdmin uses the "psycopg[c]" package, which links the system's
libpq. The "psycopg[binary]" package installs all the dependent libraries
itself.

>
> 3. Restarted the server, the error log now suggested lack of privileges to
> access psycopg, I did the followings
>
> cd /usr/pgadmin4/venv/lib/python3.9/site-packages
> chmod -R 755 *
>
> Finally, restart the httpd, everything seems working now.
>
> Please let me know if this could be the right solution, or any alternative
> ones.
>
> This solution is fine for this release but when you upgrade pgAdmin 4, you
will face this issue again.
Next time, please share the logs with us, so we can find a better solution.

Thanks,
Khushboo

> Many thanks.
>
>
> Daxu Yin
> 410-340-5842
>
>
> On Wednesday, September 6, 2023 at 06:39:22 AM EDT, Yogesh Mahajan <
> yogesh(dot)mahajan(at)enterprisedb(dot)com> wrote:
>
>
> Hi Daxu,
>
> Can you please share apache2 logs located at /etc/httpd/logs/error.log?
>
> Thanks,
> Yogesh Mahajan
> EnterpriseDB
>
>
> On Wed, Sep 6, 2023 at 2:14 AM Daxu Yin <daxuyin(at)yahoo(dot)com> wrote:
>
> Hi,
>
> We've just installed pgadmin4 version 7.6 following the instructions at Download
> (pgadmin.org) <https://www.pgadmin.org/download/pgadmin-4-rpm/>
> However, we've received "500 Internal Server Error" at
> http://127.0.0.1/pgadmin4
>
> There is zero content at /var/log/pgadmin/pgadmin4.log
>
> Could anyone kindly help us? Many thanks in advance,
>
>
>
>
> [image: Inline image]
> [image: Inline image]
>
>
>
> Daxu Yin
> 410-340-5842
>
>

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message Maureen Ibeh 2023-09-09 06:17:07 pgadmin 4 not opening on mac after installation
Previous Message Daxu Yin 2023-09-06 17:31:00 Re: pgadmin4 7.6 on RHEL 8.8 receives "Internal Server Error"