powa-team / powa-web

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

Unable to launch powa web #161

Closed abgarg2022 closed 1 year ago

abgarg2022 commented 1 year ago

powa-web conf has details as below

image

Extension details of powa database(DBName = ioc ) image

Running powa wb as below but how to get UI ?? image

rjuju commented 1 year ago

hi

I'm not sure that I fully understand the problem. have you tried opening the given URL in your browser? it should understand that 0.0.0.0 is your local address.

abgarg2022 commented 1 year ago

hi I'm not sure that I fully understand the problem. have you tried opening the given URL in your browser? it should understand that 0.0.0.0 is your local address.

Hi @rjuju , I got postgresql on ubuntu and installed powa also at same place. Can you please guide me with pg_hba.conf setup or something else as URL http://0.0.0.0:8888/ is not yielding anything.

rjuju commented 1 year ago

I got postgresql on ubuntu and installed powa also at same place. Can you please guide me with pg_hba.conf setup or something else as URL http://0.0.0.0:8888/ is not yielding anything.

do you get an error, an empty page or it's just hitting a timeout?

is this Ubuntu your local machine or a vm or some other distant server?

abgarg2022 commented 1 year ago

I got postgresql on ubuntu and installed powa also at same place. Can you please guide me with pg_hba.conf setup or something else as URL http://0.0.0.0:8888/ is not yielding anything. do you get an error, an empty page or it's just hitting a timeout? is this Ubuntu your local machine or a vm or some other distant server?

Yes. ubuntu is VM.

image

abgarg2022 commented 1 year ago

Do I need to add my windows Public IP in Security Group of configured VM and then try this URL again?

rjuju commented 1 year ago

ubuntu is VM.

ah that explains it powa-web is acting as a web server, so you need to configure your server if you want to access it from outside of the vm. one simple way to do that would be to authorize the 8888 tcp port in the vm firewall if any, and use instead the ip of that vm in the URL, still with the 8888 port. you should probably have already done that to accees your postgres server from outside the vm.

abgarg2022 commented 1 year ago

@rjuju

To access postgres server, we are using SSH tunnel and private key. How can we access powa UI in such a case?

rjuju commented 1 year ago

To access postgres server, we are using SSH tunnel and private key. How can we access powa UI in such a case?

I'm confused. it means you have to get a shell on the vm to then connect to postgres? how is your application able to connect then? but anyway, it means that you made the SSH port (22) available from outside the vm. you just need to do the exact same thing with the port 8888 and the UI will be available the same as SSH.

abgarg2022 commented 1 year ago

Got the UI running now after enabling port 8888, but getting this error now

image

rjuju commented 1 year ago

Got the UI running now after enabling port 8888

good news!

, but getting this error now

you have a version mismatch between the extension and the UI. how did you install both powa-archivist and powa-web to have different supported versions?

abgarg2022 commented 1 year ago

@rjuju

Followed from https://powa.readthedocs.io/en/latest/quickstart.html#id2

Can we connect over Teams Meeting ?

https://teams.microsoft.com/l/meetup-join/19%3ameeting_ODk0MzAxYzQtMGIzZS00YTk1LTg4YTEtNjg0ODE3Y2M0MTRj%40thread.v2/0?context=%7b%22Tid%22%3a%225d471751-9675-428d-917b-70f44f9630b0%22%2c%22Oid%22%3a%2243a98f6c-0805-4dd0-92fa-26663c1cf7ab%22%7d

rjuju commented 1 year ago

It doesn't say which method you used. Since you're using ubuntu, the preferred installation method would be from pgdg repository, and looking at the content right now:

So I don't know how you installed powa-web, but you made a mistake somewhere. You need to make sure that you have a version 4.1.x, ideally the latest version which is currently 4.1.3

abgarg2022 commented 1 year ago

It doesn't say which method you used. Since you're using ubuntu, the preferred installation method would be from pgdg repository, and looking at the content right now:

So I don't know how you installed powa-web, but you made a mistake somewhere. You need to make sure that you have a version 4.1.x, ideally the latest version which is currently 4.1.3

I had used below commands

  1. wget https://github.com/powa-team/powa-archivist/archive/REL_4_0_0.tar.gz
  2. apt-get install postgresql-12-powa postgresql-12-pg-qualstats postgresql-12-pg-stat-kcache postgresql-12-hypopg
rjuju commented 1 year ago

wget https://github.com/powa-team/powa-archivist/archive/REL_4_0_0.tar.gz apt-get install postgresql-12-powa

So you downloaded powa-archivist 4.0.0 and also installed the latest version of powa-archivist via tha packages?

Given the error you're not using powa-archivist 4.0.0. And it's still lacking any information about powa-web.

abgarg2022 commented 1 year ago

wget https://github.com/powa-team/powa-archivist/archive/REL_4_0_0.tar.gz apt-get install postgresql-12-powa

So you downloaded powa-archivist 4.0.0 and also installed the latest version of powa-archivist via tha packages?

Given the error you're not using powa-archivist 4.0.0. And it's still lacking any information about powa-web.

@rjuju

Powa web was installed as per https://powa.readthedocs.io/en/latest/quickstart.html#install-powa-web-anywhere

sudo pip install powa-web

rjuju commented 1 year ago

But on pypi the current version is 4.1.3: https://pypi.org/project/powa-web/

and your installation says it's 4.0.x. It looks like you installed multiple version and you're not using the correct one.

abgarg2022 commented 1 year ago

This seems to be available now

image

abgarg2022 commented 1 year ago

@rjuju Hi Julien, how to enable collector so that I can view DB sessions running, TOP 5-10 problem Session IDs and details etc.

rjuju commented 1 year ago

Hi Julien, how to enable collector so that I can view DB sessions running, TOP 5-10 problem Session IDs and details etc.

did you face any problem when installing it? or are you using the local mode rather than the remote mode?

abgarg2022 commented 1 year ago

Hi Julien, how to enable collector so that I can view DB sessions running, TOP 5-10 problem Session IDs and details etc. did you face any problem when installing it? or are you using the local mode rather than the remote mode?

No problem in installation, but need to fix below issues I guess before getting DB Stats? image

rjuju commented 1 year ago

I still don't know if you use the remote mode or local mode (see https://powa.readthedocs.io/en/latest/remote_setup.html).

abgarg2022 commented 1 year ago

I still don't know if you use the remote mode or local mode (see https://powa.readthedocs.io/en/latest/remote_setup.html).

Since all extensions have been enabled on same Database, so I am using local mode only to gather powa stats.

image

image

rjuju commented 1 year ago

If you use the local mode you must use the background worker approach (modifying shared_preload_libraries and restarting as documented for instance at https://powa.readthedocs.io/en/latest/quickstart.html). The powa-collector shouldn't be used.

abgarg2022 commented 1 year ago

@rjuju

I have stopped powa collector now as per below.

image

Metrics still not available image

image

rjuju commented 1 year ago

Graphs are only available after 2 snapshots (you need at least 2 points to draw a line), so maybe you didn't wait long enoug?

Otherwise, maybe you didn't configure properly the extension in shared_preload_libraries.

abgarg2022 commented 1 year ago

Below are extensions configured

image image

By when will I be able to see the Session details?

rjuju commented 1 year ago

Have you restarted postgres after configuring shared_preload_libraries? This query should show you what is currently used:

SHOW shared_preload_libraries

How did you configure the powa bgowrker? This query will show it (assuming it has been restarted)

SELECT name, current_setting(name) FROM pg_settings WHERE name LIKE 'powa%';

Is there any errors in the postgres logs?

abgarg2022 commented 1 year ago

Below is the output. Let me know in case any log file output needs to be checked?

image

rjuju commented 1 year ago

Can you confirm that the extensions mentioned at https://github.com/powa-team/powa-web/issues/161#issuecomment-1273092248 are installed in the powa database, not any other one?

Let me know in case any log file output needs to be checked?

Yes, please check for any problem in the postgres logs.

abgarg2022 commented 1 year ago

Seems to be working now, Thanks a lot.

image

rjuju commented 1 year ago

Great! I'm closing this issue. Feel free to reopen it or open a new one if you face other problems.