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

Поиск
Список
Период
Сортировка
От Khushboo Vashi
Тема Re: pgadmin4 7.6 on RHEL 8.8 receives "Internal Server Error"
Дата
Msg-id CAFOhELfEBR6pBeYaOKjtryV7zth7M9AK2KOg5RWp0Yznj=wkwQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pgadmin4 7.6 on RHEL 8.8 receives "Internal Server Error"  (Daxu Yin <daxuyin@yahoo.com>)
Список pgadmin-support
Hi,

On Wed, Sep 6, 2023 at 11:01 PM Daxu Yin <daxuyin@yahoo.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.mahajan@enterprisedb.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@yahoo.com> wrote:
Hi,

We've just installed pgadmin4 version 7.6 following the instructions at Download (pgadmin.org)
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,




Inline image
Inline image



Daxu Yin
410-340-5842

В списке pgadmin-support по дате отправления:

Предыдущее
От: Daxu Yin
Дата:
Сообщение: Re: pgadmin4 7.6 on RHEL 8.8 receives "Internal Server Error"
Следующее
От: Maureen Ibeh
Дата:
Сообщение: pgadmin 4 not opening on mac after installation