powa-team / powa

PostgreSQL Workload Analyzer
http://powa.readthedocs.io/
PostgreSQL License
768 stars 57 forks source link

powa-web auth failed #109

Closed yss126 closed 5 years ago

yss126 commented 6 years ago

Hi everyone,

I am trying powa-web today. Here are the steps


root# git clone ....
root# cd powa-archivist
root# make
root# make install

psql# create extension pg_stat_statements
psql# create extension btree_gist
psql# create extension powa

root# pip install powa-web

edited /etc/powa-web.conf

servers={
  'main': {
    'host': '127.0.0.1',
    'port': '5432',
    'database': 'postgres',
    'user':'postgres',
    'password':'password',
    'query':{'client_encoding:UTF-8'}
  }
}

Started powa-web

root# powa-web --log-to-stderr

tried to login.. auth failed on GUI

On logs:

[I 180925 15:12:15 powa-web:12] Starting powa-web on http://0.0.0.0:8888
[I 180925 15:12:15 powa-web:12] Starting powa-web on http://0.0.0.0:8888
[W 180925 15:12:22 web:2162] 403 GET /login/?next=%2F (127.0.0.1) 29.83ms
[W 180925 15:12:22 web:2162] 403 GET /login/?next=%2F (127.0.0.1) 29.83ms
[E 180925 15:12:26 user:20] __init__() got an unexpected keyword argument 'user'
[E 180925 15:12:26 user:20] __init__() got an unexpected keyword argument 'user'
[W 180925 15:12:26 web:2162] 403 POST /login/?next=%2F (127.0.0.1) 4.84ms
[W 180925 15:12:26 web:2162] 403 POST /login/?next=%2F (127.0.0.1) 4.84ms

On previous issues, I saw that I need to use SUPERUSER with LOGIN permission. So I've used postgres user.(fresh installation on local Ubuntu 18.04 Desktop)

I couldn't find the solution. Can you help me?

Have a good day.

rjuju commented 6 years ago

Oh I'm very sorry, I totally mised this issue :(

I think the problem is in the configuration file, you should have used username instead of user. I'll try to add come more logs in this case, because it's an easy mistake that can be hard to spot.

rjuju commented 6 years ago

I just pushed a commit on the powa-web repo to allow usage of both "user" and "username". It'll be available in the next release.

rjuju commented 5 years ago

@yss126 version 3.2.0 has been released some days ago, so the fix is available. Please note that it requires to also update powa-archivist to 3.2.°0.

Feel free to reopen this issue if you're still experiencing problems.