Discussion:
[Pgbouncer-general] new user: unable to connect to pgbouncer admin console
Mark Stosberg
2008-04-22 21:27:22 UTC
Permalink
Hello,

Here's some feedback from a new user:

- It's confusing that there are two man pages. I searched through the
contents of "man pgbouncer" for a detail that was in "man 5 pgbouncer"
and concluded it was not documented in a man page because I couldn't
find it by searching that man page. . I understand the difference
between the two files and that this is a Unix convention to split up
man pages this way. Now I see that you mention "pgbouncer(5) in the
"See Also" section, but I missed that on my initial review as well.

I recommend having something right near the top of the man page that
lets users know there is a *second* man page.

- I am not able to connect to the admin console through the pgbouncer
database. The log reports errors like this:

pgbouncer/pgbouncer at 127.0.0.1:59809 login successful: db=pgbouncer
user=mark pgbouncer/pgbouncer at 127.0.0.1:59809 closing because: not
allowed (age=0) pgbouncer/pgbouncer at 127.0.0.1:59809 Pooler Error: not
allowed
On reviewing the docs for "admin_users" and "stats" users, it's not
clear whether these are list of Unix usernames, or PostgreSQL
usernames. I assume they are Unix, but I tried both, and neither
approach seemed to let me in. The error message could be more helpful
by being more specific, such as:

"not allowed: Unix user 'mark' is not in admin_users".

(Although in this case, my user *was* in the group).

I do thank you for developing PgBouncer and releasing it as open
source. I hope to be able to evaluate it in more depth soon.

Mark
--
. . . . . . . . . . . . . . . . . . . . . . . . . . .
Mark Stosberg Principal Developer
mark at summersault.com Summersault, LLC
765-939-9301 ext 202 database driven websites
. . . . . http://www.summersault.com/ . . . . . . . .
--
. . . . . . . . . . . . . . . . . . . . . . . . . . .
Mark Stosberg Principal Developer
mark at summersault.com Summersault, LLC
765-939-9301 ext 202 database driven websites
. . . . . http://www.summersault.com/ . . . . . . . .
Marko Kreen
2008-04-23 10:24:30 UTC
Permalink
Post by Mark Stosberg
- It's confusing that there are two man pages. I searched through the
contents of "man pgbouncer" for a detail that was in "man 5 pgbouncer"
and concluded it was not documented in a man page because I couldn't
find it by searching that man page. . I understand the difference
between the two files and that this is a Unix convention to split up
man pages this way. Now I see that you mention "pgbouncer(5) in the
"See Also" section, but I missed that on my initial review as well.
I recommend having something right near the top of the man page that
lets users know there is a *second* man page.
Ok, we could mention it at the start too.
Post by Mark Stosberg
- I am not able to connect to the admin console through the pgbouncer
pgbouncer/pgbouncer at 127.0.0.1:59809 login successful: db=pgbouncer
user=mark pgbouncer/pgbouncer at 127.0.0.1:59809 closing because: not
allowed (age=0) pgbouncer/pgbouncer at 127.0.0.1:59809 Pooler Error: not
allowed
On reviewing the docs for "admin_users" and "stats" users, it's not
clear whether these are list of Unix usernames, or PostgreSQL
usernames. I assume they are Unix, but I tried both, and neither
approach seemed to let me in. The error message could be more helpful
"not allowed: Unix user 'mark' is not in admin_users".
(Although in this case, my user *was* in the group).
Did you restarted or SIGHUPped the running process? Otherwise
your changes did not reach running pooler.

If you did, there may be bug somwhere. Please send me your PgBouncer,
OS and libc versions. Then please paste me your admin_users =
and stats_users= actual lines from config file. Then I can look further.
Post by Mark Stosberg
I do thank you for developing PgBouncer and releasing it as open
source. I hope to be able to evaluate it in more depth soon.
Thanks.
--
marko
Mark Stosberg
2008-04-23 13:51:43 UTC
Permalink
Marko--
Post by Marko Kreen
Post by Mark Stosberg
- I am not able to connect to the admin console through the
pgbouncer/pgbouncer at 127.0.0.1:59809
login successful: db=pgbouncer user=mark
pgbouncer/pgbouncer at 127.0.0.1:59809
closing because: not allowed (age=0)
pgbouncer/pgbouncer at 127.0.0.1:59809
Pooler Error: not allowed On reviewing the docs for "admin_users"
and "stats" users, it's not clear whether these are list of Unix
usernames, or PostgreSQL usernames. I assume they are Unix, but I
tried both, and neither approach seemed to let me in. The error
"not allowed: Unix user 'mark' is not in admin_users".
(Although in this case, my user *was* in the group).
[ sorry about the address encryption Gmane has done. ]
Post by Marko Kreen
Did you restarted or SIGHUPped the running process? Otherwise
your changes did not reach running pooler.
Definitely. I was aware this is a normal way for changes in config files to
take effect. I did a full stop/start.
Post by Marko Kreen
If you did, there may be bug somwhere. Please send me your PgBouncer,
OS and libc versions. Then please paste me your admin_users =
and stats_users= actual lines from config file. Then I can look further.
OS: FreeBSD 6.2:
libc: /lib/libc.so.6
PgBouncer: 1.1.2.

admin_users = sumsault,pgsql,postgres,slony,mark,matt
stats_user = root

Maybe this is related?

# ldd /usr/local/bin/pgbouncer
/usr/local/bin/pgbouncer:
libcrypt.so.3 => /lib/libcrypt.so.3 (0x2808a000)
libevent-1.3e.so.1 => not found (0x0)
libc.so.6 => /lib/libc.so.6 (0x280a2000)

###

According to that, it isn't finding libevent, which is installed with this name in /usr/local/lib.
If that was really the issue, I would expect it to die with an error about
that, rather than one about not connecting to the pgbouncer database.

I could workaround that by symlinking libevent to a location it is looking in.

Marko: Thanks for the prompt and helpful response to my question!

Mark
--
. . . . . . . . . . . . . . . . . . . . . . . . . . .
Mark Stosberg Principal Developer
mark at summersault.com Summersault, LLC
765-939-9301 ext 202 database driven websites
. . . . . http://www.summersault.com/ . . . . . . . .
Marko Kreen
2008-04-23 14:52:31 UTC
Permalink
Post by Mark Stosberg
Post by Marko Kreen
If you did, there may be bug somwhere. Please send me your PgBouncer,
OS and libc versions. Then please paste me your admin_users =
and stats_users= actual lines from config file. Then I can look further.
libc: /lib/libc.so.6
PgBouncer: 1.1.2.
admin_users = sumsault,pgsql,postgres,slony,mark,matt
stats_user = root
I testest with those and everything seems fine here.

Note that the name should ne 'stats_users'.
Post by Mark Stosberg
According to that, it isn't finding libevent, which is installed with this name in /usr/local/lib.
If that was really the issue, I would expect it to die with an error about
that, rather than one about not connecting to the pgbouncer database.
Yes, it would not start if that was really the case.


Now I have 2 guesses:

- gcc miscompiles something - try to compile with -O0 / -O1

- you have second admin_users in .ini file that overrides first one.

I was gonna say "see what SHOW CONFIG; prints", but if you cannot log
to console its not very helpful.
--
marko
Loading...