Pgadmin4 - 500 내부 서버 오류

Pgadmin4 - 500 내부 서버 오류

저는 PostgreSQL의 새로운 사용자입니다. CentOS 8 서버에 PostgreSQL 13을 설치하고 웹 UI와 데스크톱 UI 모드 모두에서 PGAdmin4를 구성했습니다. 설치가 성공적으로 완료되었고 데스크톱 UI가 제대로 작동하지만 웹 UI에 액세스하려고 하면 다음 오류가 발생합니다.

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Apache 및 PostgreSQL 서비스가 정상적으로 실행되고 있습니다. Apache 및 PostgreSQL 서비스와 해당 포트가 모두 방화벽에서 허용되었습니다.

[root@XXXXXX-testing-server ~]# ss -tulpn | grep 5432
tcp   LISTEN 0      128           0.0.0.0:5432       0.0.0.0:*    users:(("postmaster",pid=1485,fd=6))                    
tcp   LISTEN 0      128              [::]:5432          [::]:*    users:(("postmaster",pid=1485,fd=7))                    
[root@XXXXXX-testing-server ~]#

내가 확인했다 /var/log/httpd/error_log. Apache 서비스 로그에서 아래 오류를 볼 수 있습니다.

[Fri Sep 08 15:31:38.438903 2023] [wsgi:error] [pid 2114:tid 139876901840640] [remote 192.168.1.1:59963] mod_wsgi (pid=2114): Failed to exec Python script file '/usr/pgadmin4/web/pgAdmin4.wsgi'.
[Fri Sep 08 15:31:38.439004 2023] [wsgi:error] [pid 2114:tid 139876901840640] [remote 192.168.1.1:59963] mod_wsgi (pid=2114): Exception occurred processing WSGI script '/usr/pgadmin4/web/pgAdmin4.wsgi'.
[Fri Sep 08 15:31:38.443337 2023] [wsgi:error] [pid 2114:tid 139876901840640] [remote 192.168.1.1:59963] Traceback (most recent call last):
[Fri Sep 08 15:31:38.443412 2023] [wsgi:error] [pid 2114:tid 139876901840640] [remote 192.168.1.1:59963]   File "/usr/pgadmin4/web/pgAdmin4.wsgi", line 36, in <module>
[Fri Sep 08 15:31:38.443417 2023] [wsgi:error] [pid 2114:tid 139876901840640] [remote 192.168.1.1:59963]     from pgAdmin4 import app as application
[Fri Sep 08 15:31:38.443424 2023] [wsgi:error] [pid 2114:tid 139876901840640] [remote 192.168.1.1:59963]   File "/usr/pgadmin4/web/pgAdmin4.py", line 104, in <module>
[Fri Sep 08 15:31:38.443427 2023] [wsgi:error] [pid 2114:tid 139876901840640] [remote 192.168.1.1:59963]     app = create_app()
[Fri Sep 08 15:31:38.443432 2023] [wsgi:error] [pid 2114:tid 139876901840640] [remote 192.168.1.1:59963]   File "/usr/pgadmin4/web/pgadmin/__init__.py", line 550, in create_app
[Fri Sep 08 15:31:38.443435 2023] [wsgi:error] [pid 2114:tid 139876901840640] [remote 192.168.1.1:59963]     driver.init_app(app)
[Fri Sep 08 15:31:38.443441 2023] [wsgi:error] [pid 2114:tid 139876901840640] [remote 192.168.1.1:59963]   File "/usr/pgadmin4/web/pgadmin/utils/driver/__init__.py", line 27, in init_app
[Fri Sep 08 15:31:38.443444 2023] [wsgi:error] [pid 2114:tid 139876901840640] [remote 192.168.1.1:59963]     DriverRegistry.load_modules(app)
[Fri Sep 08 15:31:38.443459 2023] [wsgi:error] [pid 2114:tid 139876901840640] [remote 192.168.1.1:59963]   File "/usr/pgadmin4/web/pgadmin/utils/driver/registry.py", line 20, in load_modules
[Fri Sep 08 15:31:38.443461 2023] [wsgi:error] [pid 2114:tid 139876901840640] [remote 192.168.1.1:59963]     from . import psycopg3 as module
[Fri Sep 08 15:31:38.443468 2023] [wsgi:error] [pid 2114:tid 139876901840640] [remote 192.168.1.1:59963]   File "/usr/pgadmin4/web/pgadmin/utils/driver/psycopg3/__init__.py", line 21, in <module>
[Fri Sep 08 15:31:38.443471 2023] [wsgi:error] [pid 2114:tid 139876901840640] [remote 192.168.1.1:59963]     import psycopg
[Fri Sep 08 15:31:38.443476 2023] [wsgi:error] [pid 2114:tid 139876901840640] [remote 192.168.1.1:59963]   File "/usr/pgadmin4/venv/lib64/python3.9/site-packages/psycopg/__init__.py", line 9, in <module>
[Fri Sep 08 15:31:38.443479 2023] [wsgi:error] [pid 2114:tid 139876901840640] [remote 192.168.1.1:59963]     from . import pq  # noqa: F401 import early to stabilize side effects
[Fri Sep 08 15:31:38.443484 2023] [wsgi:error] [pid 2114:tid 139876901840640] [remote 192.168.1.1:59963]   File "/usr/pgadmin4/venv/lib64/python3.9/site-packages/psycopg/pq/__init__.py", line 114, in <module>
[Fri Sep 08 15:31:38.443487 2023] [wsgi:error] [pid 2114:tid 139876901840640] [remote 192.168.1.1:59963]     import_from_libpq()
[Fri Sep 08 15:31:38.443492 2023] [wsgi:error] [pid 2114:tid 139876901840640] [remote 192.168.1.1:59963]   File "/usr/pgadmin4/venv/lib64/python3.9/site-packages/psycopg/pq/__init__.py", line 106, in import_from_libpq
[Fri Sep 08 15:31:38.443495 2023] [wsgi:error] [pid 2114:tid 139876901840640] [remote 192.168.1.1:59963]     raise ImportError(
[Fri Sep 08 15:31:38.443509 2023] [wsgi:error] [pid 2114:tid 139876901840640] [remote 192.168.1.1:59963] ImportError: no pq wrapper available.
[Fri Sep 08 15:31:38.443511 2023] [wsgi:error] [pid 2114:tid 139876901840640] [remote 192.168.1.1:59963] Attempts made:
[Fri Sep 08 15:31:38.443515 2023] [wsgi:error] [pid 2114:tid 139876901840640] [remote 192.168.1.1:59963] - couldn't import psycopg 'c' implementation: /usr/pgadmin4/venv/lib64/python3.9/site-packages/psycopg_c/pq.cpython-39-x86_64-linux-gnu.so: undefined symbol: PQpipelineStatus
[Fri Sep 08 15:31:38.443518 2023] [wsgi:error] [pid 2114:tid 139876901840640] [remote 192.168.1.1:59963] - couldn't import psycopg 'binary' implementation: No module named 'psycopg_binary'
[Fri Sep 08 15:31:38.443520 2023] [wsgi:error] [pid 2114:tid 139876901840640] [remote 192.168.1.1:59963] - couldn't import psycopg 'python' implementation:

하지만 위에서 언급한 Python 라이브러리/패키지는 이미 내 서버에서 사용할 수 있습니다.

[root@XXXXXXXX-testing-server ~]# pip3.6 install psycopg2-binary 
Requirement already satisfied: psycopg2-binary in /usr/local/lib64/python3.6/site-packages (2.9.7)

이 오류의 원인은 무엇입니까?

관련 정보