powa-team / powa-web

PoWA user interface
http://powa.readthedocs.io/
73 stars 31 forks source link

When launching Powa-web 4.1.1 errors out #134

Closed hrawulwa closed 3 years ago

hrawulwa commented 3 years ago

Hi, I'm trying to do a remote setup. Downloaded and installed powa-archivist-REL_4_1_2, powa-collector-1.1.1 and powa-web-4.1.1 as source tar files from github.

I have installed and compiled requirements SQLAlchemy-0.9.9 and tornado 3.0 Installed and compiled succesfully powa-web [root@sl73pgtldbp001 powa]# cd powa-web-4.1.1 [root@sl73pgtldbp001 powa-web-4.1.1]# python setup.py build [root@sl73pgtldbp001 powa-web-4.1.1]# python setup.py build install

When trying to launch powa-web. [root@sl73pgtldbp001 ~]# cd /pgbin/powa/powa-web-4.1.1/

[root@sl73pgtldbp001 ~]# ./powa-web Traceback (most recent call last): File "./powa-web", line 9, in application = make_app(debug=False, gzip=True, compress_response=True) File "/pgbin/powa/powa-web-4.1.1/powa/init.py", line 44, in make_app parse_options() File "/pgbin/powa/powa-web-4.1.1/powa/options.py", line 70, in parse_options if options['url_prefix'] == '': TypeError: 'OptionParser' object has no attribute 'getitem'

Please advise. I already created "powa" database and created powa extension. Here are contents of conf file.

[root@sl73pgtldbp001 powa-web-4.1.1]# cat powa-web.conf servers={ 'main': { 'host': 'localhost', 'port': '5432', 'database': 'powa', 'query': {'client_encoding': 'utf8'} } } cookie_secret="SUPERSECRET_THAT_YOU_SHOULD_CHANGE"

Some extra options you can set

#

port on which the UI should be available.

port=8888

Address on which the UI should be available on

address=0.0.0.0

Forbid UI to connect to databases globally (can be configured per server)

allow_ui_connection=False

Custom URL prefix the UI should be available on

url_prefix="/"

Thanks Hari

banlex73 commented 3 years ago

have similar configuration and it works fine with python3.6.8 What Python version do you use?

пн, 22 бер. 2021 о 15:05 hrawulwa @.***> пише:

Hi, I'm trying to do a remote setup. Downloaded and installed powa-archivist-REL_4_1_2, powa-collector-1.1.1 and powa-web-4.1.1 as source tar files from github.

I have installed and compiled requirements SQLAlchemy-0.9.9 and tornado 3.0 Installed and compiled succesfully powa-web @. powa]# cd powa-web-4.1.1 @. powa-web-4.1.1]# python setup.py build @.*** powa-web-4.1.1]# python setup.py build install

When trying to launch powa-web. @.*** ~]# cd /pgbin/powa/powa-web-4.1.1/

@.** ~]# ./powa-web Traceback (most recent call last): File "./powa-web", line 9, in application = make_app(debug=False, gzip=True, compress_response=True) File "/pgbin/powa/powa-web-4.1.1/powa/init.py", line 44, in make_app parse_options() File "/pgbin/powa/powa-web-4.1.1/powa/options.py", line 70, in parse_options if options['url_prefix'] == '': TypeError: 'OptionParser' object has no attribute 'getitem*'

Please advise. I already created "powa" database and created powa extension. Here are contents of conf file.

@.*** powa-web-4.1.1]# cat powa-web.conf servers={ 'main': { 'host': 'localhost', 'port': '5432', 'database': 'powa', 'query': {'client_encoding': 'utf8'} } } cookie_secret="SUPERSECRET_THAT_YOU_SHOULD_CHANGE" Some extra options you can set port on which the UI should be available. port=8888 Address on which the UI should be available on address=0.0.0.0 Forbid UI to connect to databases globally (can be configured per server) allow_ui_connection=False Custom URL prefix the UI should be available on url_prefix="/"

Thanks Hari

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/powa-team/powa-web/issues/134, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIHWEYFVPIAM3EX6D3QURXTTE65KXANCNFSM4ZT66D7A .

hrawulwa commented 3 years ago

The python version is 2.7.5

Thanks Hari

banlex73 commented 3 years ago

by any chance, can you try to start it under python 3.6 ?

пн, 22 бер. 2021 о 17:24 hrawulwa @.***> пише:

The python version is 2.7.5

Thanks Hari

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/powa-team/powa-web/issues/134#issuecomment-804491309, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIHWEYARIMTU7AVFLFWD5RTTE7NTLANCNFSM4ZT66D7A .

hrawulwa commented 3 years ago

No, installing python 3.6 is lot of work co-ordinating with Sys Admins. I have the same remote setup working on another test server with python 2.7.5, but the powa-web version was 4.0.0, powa-collector was 0.0.1 and powa-archivist was 4.0.1. I had this setup working fine which was built last year around July. Since newer versions came now, I'm installing the latest ones on this server, which will be used for monitoring some of the Prod DB servers. Not sure if different versions of sqlalchemy or tornado would make a difference here.

Thanks Hari

banlex73 commented 3 years ago

sorry, I was wrong regarding python version, it works on /bin/python2.7 /bin/python2.7 /var/lib/pgsql/powa-web-plan/powa-web [I 210323 01:06:11 powa-web:13] Starting powa-web on http://0.0.0.0:80/

пн, 22 бер. 2021 о 17:57 hrawulwa @.***> пише:

No, installing python 3.6 is lot of work co-ordinating with Sys Admins. I have the same remote setup working on another test server with python 2.7.5, but the powa-web version was 4.0.0, powa-collector was 0.0.1 and powa-archivist was 4.0.1. I had this setup working fine which was built last year around July. Since newer versions came now, I'm installing the latest ones on this server, which will be used for monitoring some of the Prod DB servers. Not sure if different versions of sqlalchemy or tornado would make a difference here.

Thanks Hari

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/powa-team/powa-web/issues/134#issuecomment-804504301, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIHWEYB77VGRNADY7PINGVTTE7RQVANCNFSM4ZT66D7A .

hrawulwa commented 3 years ago

Ok. I had to download tornado-4.0 With this version of tornado, I recompiled powa-web-4.1.1. After this, I'm able to start. [I 210323 02:44:35 powa-web:13] Starting powa-web on http://0.0.0.0:8888/

Thanks Hari

rjuju commented 3 years ago

Hi @hrawulwa

After some digging it seems that I broke compatibility with tornado2 when introducing the url_prefix parameter. I'll try to fix that, but in the mean time I confirm that using any version of tornado >= 3.0.0 should work.

hrawulwa commented 3 years ago

Ok. 3.0 did not work, but 4.0 is working fine. Thank you for your help.

Thanks Hari

rjuju commented 3 years ago

Oh, there was probably other changes that needed a later version.

I just pushed https://github.com/powa-team/powa-web/commit/a54fdc5fe32969e5ce76c7c7c2f913052731f355 which should fix the issue (and likely the one for tornado 3.0). I tested locally with SQLAlchemy 0.9.8 and tornado 2.0 (the oldest dependency versions that we support) and didn't notice any issue.

Thanks a lot for the report!