Thread: unable to start pgAdmin-4 on CentOS-7

unable to start pgAdmin-4 on CentOS-7

From
Venkata Balaji N
Date:
Hello Community,

I have an issue starting pgAdmin4 on CentOS-7 and would appreciate any help in this regard -

I have downloaded the EnterpriseDB's Open Source PostgreSQL package (9.6 beta3) which includes pgAdmin4 as well.

When i tried starting the pgAdmin4, i get the following error -

[dba@localhost bin]$ ./pgAdmin4
Full Python path:  "/opt/PostgreSQL/9.6/pgAdmin4/venv/lib/python2.7/site-packages:/opt/PostgreSQL/9.6/pgAdmin4/venv/lib/python2.7/lib-dynload:/opt/PostgreSQL/9.6/pgAdmin4/venv/lib/python2.7"
User Python path:  ""
Webapp path:  "/opt/PostgreSQL/9.6/pgAdmin4/web/pgAdmin4.py"
Traceback (most recent call last):
  File "/opt/PostgreSQL/9.6/pgAdmin4/web/pgAdmin4.py", line 23, in <module>
    import config
  File "/opt/PostgreSQL/9.6/pgAdmin4/web/config.py", line 15, in <module>
    from logging import *
  File "/opt/PostgreSQL/9.6/pgAdmin4/venv/lib/python2.7/logging/__init__.py", line 26, in <module>
    import sys, os, time, cStringIO, traceback, warnings, weakref, collections
  File "/opt/PostgreSQL/9.6/pgAdmin4/venv/lib/python2.7/collections.py", line 9, in <module>
    from operator import itemgetter as _itemgetter, eq as _eq
ImportError: /opt/PostgreSQL/9.6/pgAdmin4/venv/lib/python2.7/lib-dynload/operator.so: undefined symbol: _PyUnicodeUCS2_AsDefaultEncodedString
"Failed to launch the application server, server thread exiting."

Regards,
Venkata B N

Fujitsu Australia

Re: unable to start pgAdmin-4 on CentOS-7

From
Neel Patel
Date:
Hi,

Issue:-
Path was not set during running pgAdmin4 application. When you start the application with script then it will export proper libraries path and then application will be launched.

Can you please try to run "launchpgadmin.sh" located at "/opt/PostgreSQL/9.6/scripts" instead of directly running "pgAdmin4" binary ?

Thanks,
Neel Patel

On Mon, Aug 8, 2016 at 11:37 AM, Venkata Balaji N <nag1010@gmail.com> wrote:
Hello Community,

I have an issue starting pgAdmin4 on CentOS-7 and would appreciate any help in this regard -

I have downloaded the EnterpriseDB's Open Source PostgreSQL package (9.6 beta3) which includes pgAdmin4 as well.

When i tried starting the pgAdmin4, i get the following error -

[dba@localhost bin]$ ./pgAdmin4
Full Python path:  "/opt/PostgreSQL/9.6/pgAdmin4/venv/lib/python2.7/site-packages:/opt/PostgreSQL/9.6/pgAdmin4/venv/lib/python2.7/lib-dynload:/opt/PostgreSQL/9.6/pgAdmin4/venv/lib/python2.7"
User Python path:  ""
Webapp path:  "/opt/PostgreSQL/9.6/pgAdmin4/web/pgAdmin4.py"
Traceback (most recent call last):
  File "/opt/PostgreSQL/9.6/pgAdmin4/web/pgAdmin4.py", line 23, in <module>
    import config
  File "/opt/PostgreSQL/9.6/pgAdmin4/web/config.py", line 15, in <module>
    from logging import *
  File "/opt/PostgreSQL/9.6/pgAdmin4/venv/lib/python2.7/logging/__init__.py", line 26, in <module>
    import sys, os, time, cStringIO, traceback, warnings, weakref, collections
  File "/opt/PostgreSQL/9.6/pgAdmin4/venv/lib/python2.7/collections.py", line 9, in <module>
    from operator import itemgetter as _itemgetter, eq as _eq
ImportError: /opt/PostgreSQL/9.6/pgAdmin4/venv/lib/python2.7/lib-dynload/operator.so: undefined symbol: _PyUnicodeUCS2_AsDefaultEncodedString
"Failed to launch the application server, server thread exiting."

Regards,
Venkata B N

Fujitsu Australia


Re: unable to start pgAdmin-4 on CentOS-7

From
Venkata Balaji N
Date:

On Mon, Aug 8, 2016 at 4:40 PM, Neel Patel <neel.patel@enterprisedb.com> wrote:
Hi,

Issue:-
Path was not set during running pgAdmin4 application. When you start the application with script then it will export proper libraries path and then application will be launched.

Can you please try to run "launchpgadmin.sh" located at "/opt/PostgreSQL/9.6/scripts" instead of directly running "pgAdmin4" binary ?

Thanks. I could see the pgAdmin4 starting now. The mess-up i did was that, i renamed the folder "pgAdmin 4" to "pgAdmin4".

The other issue i encountered is, though pgAdmin4 starts fine, prints the below message -

[root@db01 scripts]# ./launchpgadmin.sh
Full Python path:  "/opt/PostgreSQL/9.6/pgAdmin 4/venv/lib/python2.7/site-packages:/opt/PostgreSQL/9.6/pgAdmin 4/venv/lib/python2.7/lib-dynload:/opt/PostgreSQL/9.6/pgAdmin 4/venv/lib/python2.7"
User Python path:  ""
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Webapp path:  "/opt/PostgreSQL/9.6/pgAdmin 4/web/pgAdmin4.py"
pgAdmin 4 - Application Initialisation
======================================


The configuration database - '/root/.pgadmin/pgadmin4.db' does not exist.
Entering initial setup mode...
NOTE: Configuring authentication for DESKTOP mode.
QObject::connect: Cannot connect (null)::stateChanged(QNetworkSession::State) to QNetworkReplyHttpImpl::_q_networkSessionStateChanged(QNetworkSession::State)

The configuration database has been created at /root/.pgadmin/pgadmin4.db
QObject::connect: Cannot connect (null)::stateChanged(QNetworkSession::State) to QNetworkReplyHttpImpl::_q_networkSessionStateChanged(QNetworkSession::State)
QObject::connect: Cannot connect (null)::stateChanged(QNetworkSession::State) to QNetworkReplyHttpImpl::_q_networkSessionStateChanged(QNetworkSession::State)
QObject::connect: Cannot connect (null)::stateChanged(QNetworkSession::State) to QNetworkReplyHttpImpl::_q_networkSessionStateChanged(QNetworkSession::State)
QObject::connect: Cannot connect (null)::stateChanged(QNetworkSession::State) to QNetworkReplyHttpImpl::_q_networkSessionStateChanged(QNetworkSession::State)
QObject::connect: Cannot connect (null)::stateChanged(QNetworkSession::State) to QNetworkReplyHttpImpl::_q_networkSessionStateChanged(QNetworkSession::State)
QObject::connect: Cannot connect (null)::stateChanged(QNetworkSession::State) to QNetworkReplyHttpImpl::_q_networkSessionStateChanged(QNetworkSession::State)
QObject::connect: Cannot connect (null)::stateChanged(QNetworkSession::State) to QNetworkReplyHttpImpl::_q_networkSessionStateChanged(QNetworkSession::State)
QObject::connect: Cannot connect (null)::stateChanged(QNetworkSession::State) to QNetworkReplyHttpImpl::_q_networkSessionStateChanged(QNetworkSession::State)

Another issue is, i am unable to open-up the browser with "http://localhost:5050/browser". Do i need to do any specific configuration in *.py files ?

Thanks & Regards,
Venkata B N

Fujitsu Australia

Re: unable to start pgAdmin-4 on CentOS-7

From
Venkata Balaji N
Date:

Another issue is, i am unable to open-up the browser with "http://localhost:5050/browser". Do i need to do any specific configuration in *.py files ?

I am able to launch the pgAdmin4 browser now.  Thanks !

Regards,
Venkata B N

Fujitsu, Australia