You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Ned Wolpert <ne...@gmail.com> on 2007/07/16 20:55:21 UTC

[users@httpd] Bug or configure error with mod_dbd and pgsql using Apache 2.2.3

Folks-

  I'm seeing a problem where authentication for a user on my site
using the mod_dbd structure works just fine for about 10 mins, then
fails if 'pooling' (DBDPersist) is on, and works all the time if
DBDPersist is off.  When it starts failing, the postgresql logs
complain authn_dbd_1 isn't found

ERROR:  prepared statement "authn_dbd_1" does not exist

and apache just says no such user...

user chemicalx not found: /protected_folder/

It 'seems' to me that the connections are timing out and when rebuilt
do not have the prepared statement anymore and when it gets the error
from postgresql, it simply thinks there is no user.

  This is on a CentOS5 box using the CentOS packages for Apache,
postgresql client, etc.

httpd-2.2.3-7.el5.centos
apr-util-1.2.7-6
apr-1.2.7-11
postgresql-8.1.9-1.el5
postgresql-libs-8.1.9-1.el5

The database server is CentOS5 as well, but runs PostgreSQL 8.2.4.
The configuration I added for the authentication this stuff...
(changed the hostname, password, etc, of course)

LoadModule dbd_module modules/mod_dbd.so
LoadModule authn_dbd_module modules/mod_authn_dbd.so
DBDriver pgsql
DBDParams "dbname=httpd_auth user=httpd password=THEPASSWORD port=5432
host=DBHOST"
DBDMin  1
DBDKeep 2
DBDMax  10
DBDExptime 60
<VirtualHost _default_:443>
  ServerName www.theservername.com
  ...
  Alias /protected_folder/ /d2/protected_folder
  <Directory /d2/protected_folder>
  Dav on
    AuthType Basic
    AuthName "Private Location"
    AuthBasicProvider dbd
    Require valid-user
    AuthDBDUserPWQuery "select u.password from httpd_users u,
httpd_groups g, httpd_user_groups ug where g.groupname='welcome_p
riv' and g.id=ug.httpd_groups_id and ug.httpd_users_id=u.id and u.username=%s"
    </Directory>
</VirtualHost>


Any helps is appreciated... and if more information is needed, just ask.

-- 
Virtually, Ned Wolpert
http://www.codeheadsystems.com/blog/

"Settle thy studies, Faustus, and begin..."   --Marlowe

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Bug or configure error with mod_dbd and pgsql using Apache 2.2.3

Posted by Ned Wolpert <ne...@gmail.com>.
Ah yes... apparently, I assumed that CentOS5 had the latest which for
them is 2.2.3... and the real question of updating httpd rests with
CentOS/RHEL then it does with apache... :-(

I have to make a special install on a test box to see if mod_dbd
changes fixes my issues. Should I use httpd 2.2.4 and change just the
mod_dbd.c file, or use the trunk? Which is more useful? Also, since
the patch was written in 2006, why did it not make it into the 2.2.4
release? Its hard for me to believe that this wasn't something I was
doing as it effectively breaks it for anyone wanting to use pooled
database connections during the authentication.

On 7/16/07, William A. Rowe, Jr. <wr...@rowe-clan.net> wrote:
> Ned Wolpert wrote:
> > This may be a stupid question... when is 2.2.4 being released? Is
> > there a roadmap for Apache's httpd?
>
> Foolish, maybe.  http://www.apache.org/dist/httpd/ - January?
>
> 2.2.5 is likely this summer, in spite of so many people's holidays.
>
> Amsterdam (3.0?) is in-the-works, mod_ssl-fips is in the works, mod_ftp
> initial release is in the works, but none of these have any particular pace
> or timetable.  There may or may not be a 2.4.0 before 3.0, depending on how
> radical the ready-to-release features really are.
>
> Bill
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


-- 
Virtually, Ned Wolpert
http://www.codeheadsystems.com/blog/

"Settle thy studies, Faustus, and begin..."   --Marlowe

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Bug or configure error with mod_dbd and pgsql using Apache 2.2.3

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
Ned Wolpert wrote:
> This may be a stupid question... when is 2.2.4 being released? Is
> there a roadmap for Apache's httpd?

Foolish, maybe.  http://www.apache.org/dist/httpd/ - January?

2.2.5 is likely this summer, in spite of so many people's holidays.

Amsterdam (3.0?) is in-the-works, mod_ssl-fips is in the works, mod_ftp
initial release is in the works, but none of these have any particular pace
or timetable.  There may or may not be a 2.4.0 before 3.0, depending on how
radical the ready-to-release features really are.

Bill

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Bug or configure error with mod_dbd and pgsql using Apache 2.2.3

Posted by Ned Wolpert <ne...@gmail.com>.
This may be a stupid question... when is 2.2.4 being released? Is
there a roadmap for Apache's httpd?

On 7/16/07, Ned Wolpert <ne...@gmail.com> wrote:
> Looking through the patch, the patch itself should not be specific to
> MySQL, right?  I can try the latest version of the mod_dbd.c itself
> and verify that it works against the SRPM of httpd on CentOS5...  I'll
> post my results....
>
> On 7/16/07, Nick Kew <ni...@webthing.com> wrote:
> > On Mon, 16 Jul 2007 11:55:21 -0700
> > "Ned Wolpert" <ne...@gmail.com> wrote:
> >
> > > Folks-
> > >
> > >   I'm seeing a problem where authentication for a user on my site
> > > using the mod_dbd structure works just fine for about 10 mins, then
> > > fails if 'pooling' (DBDPersist) is on, and works all the time if
> > > DBDPersist is off.  When it starts failing, the postgresql logs
> > > complain authn_dbd_1 isn't found
> > >
> > > ERROR:  prepared statement "authn_dbd_1" does not exist
> >
> > That looks like a possible manifestation of
> > http://issues.apache.org/bugzilla/show_bug.cgi?id=39329
> >
> > Either apply the latest patch in the bug report, or update to
> > the trunk version of mod_dbd.
> >
> > --
> > Nick Kew
> >
> > Application Development with Apache - the Apache Modules Book
> > http://www.apachetutor.org/
> >
> > ---------------------------------------------------------------------
> > The official User-To-User support forum of the Apache HTTP Server Project.
> > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
> >
>
>
> --
> Virtually, Ned Wolpert
> http://www.codeheadsystems.com/blog/
>
> "Settle thy studies, Faustus, and begin..."   --Marlowe
>


-- 
Virtually, Ned Wolpert
http://www.codeheadsystems.com/blog/

"Settle thy studies, Faustus, and begin..."   --Marlowe

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Bug or configure error with mod_dbd and pgsql using Apache 2.2.3

Posted by Ned Wolpert <ne...@gmail.com>.
Looking through the patch, the patch itself should not be specific to
MySQL, right?  I can try the latest version of the mod_dbd.c itself
and verify that it works against the SRPM of httpd on CentOS5...  I'll
post my results....

On 7/16/07, Nick Kew <ni...@webthing.com> wrote:
> On Mon, 16 Jul 2007 11:55:21 -0700
> "Ned Wolpert" <ne...@gmail.com> wrote:
>
> > Folks-
> >
> >   I'm seeing a problem where authentication for a user on my site
> > using the mod_dbd structure works just fine for about 10 mins, then
> > fails if 'pooling' (DBDPersist) is on, and works all the time if
> > DBDPersist is off.  When it starts failing, the postgresql logs
> > complain authn_dbd_1 isn't found
> >
> > ERROR:  prepared statement "authn_dbd_1" does not exist
>
> That looks like a possible manifestation of
> http://issues.apache.org/bugzilla/show_bug.cgi?id=39329
>
> Either apply the latest patch in the bug report, or update to
> the trunk version of mod_dbd.
>
> --
> Nick Kew
>
> Application Development with Apache - the Apache Modules Book
> http://www.apachetutor.org/
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


-- 
Virtually, Ned Wolpert
http://www.codeheadsystems.com/blog/

"Settle thy studies, Faustus, and begin..."   --Marlowe

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] RE : Re: [users@httpd] RE : Re: [users@httpd] Bug or configure error with mod_dbd and pgsql using Apache 2.2.3

Posted by Ned Wolpert <ne...@gmail.com>.
The trunk does not have the patch on it... least from the bug report
listed... so if the patch does work, then the mod_dbd will need to be
manually maintained until its accepted into the trunk.

On 7/16/07, Laurent FAILLIE <l_...@yahoo.com> wrote:
> > Your problem is slightly different then my own... as
> > the
> > username/password never becomes acceptable after 10
> > mins when database
> > connections are pooled/persisted.  What version of
> > Apache are you
> > using? Source-compiled 2.2.3, 2.2.4 or package from
> > your OS
> > vendor/distributor?
>
> It's 2.2.4 with mod_dbd took from truck.
>
> The misspelling master is on the Web.
>    _________    100 % Dictionnary Free !
>   /        /(
>  /  Dico  / /   Pleins d'autres fautes sur
> /________/ /
> (#######( /     http://destroyedlolo.homeunix.org
> Quoi, des fautes d'orthographe! Pas possible ;-D.
>
>
>       _____________________________________________________________________________
> Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


-- 
Virtually, Ned Wolpert
http://www.codeheadsystems.com/blog/

"Settle thy studies, Faustus, and begin..."   --Marlowe

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] RE : Re: [users@httpd] RE : Re: [users@httpd] Bug or configure error with mod_dbd and pgsql using Apache 2.2.3

Posted by Laurent FAILLIE <l_...@yahoo.com>.
> Your problem is slightly different then my own... as
> the
> username/password never becomes acceptable after 10
> mins when database
> connections are pooled/persisted.  What version of
> Apache are you
> using? Source-compiled 2.2.3, 2.2.4 or package from
> your OS
> vendor/distributor?

It's 2.2.4 with mod_dbd took from truck.

The misspelling master is on the Web.
   _________	100 % Dictionnary Free !
  /        /(
 /  Dico  / /	Pleins d'autres fautes sur
/________/ /	
(#######( /	http://destroyedlolo.homeunix.org
Quoi, des fautes d'orthographe! Pas possible ;-D.


      _____________________________________________________________________________ 
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] RE : Re: [users@httpd] Bug or configure error with mod_dbd and pgsql using Apache 2.2.3

Posted by Ned Wolpert <ne...@gmail.com>.
On 7/16/07, Laurent FAILLIE <l_...@yahoo.com> wrote:
> As explained in a mail I sent on June the 25, I'm able
> to make authentication running against a pg database
> (I have to enter 4 or 5 time the user/password before
> being accepted). Unfortunately, no response till now.
> I've created a bug report on the same with the same
> result.
>

Your problem is slightly different then my own... as the
username/password never becomes acceptable after 10 mins when database
connections are pooled/persisted.  What version of Apache are you
using? Source-compiled 2.2.3, 2.2.4 or package from your OS
vendor/distributor?

-- 
Virtually, Ned Wolpert
http://www.codeheadsystems.com/blog/

"Settle thy studies, Faustus, and begin..."   --Marlowe

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] RE : Re: [users@httpd] Bug or configure error with mod_dbd and pgsql using Apache 2.2.3

Posted by Laurent FAILLIE <l_...@yahoo.com>.
--- Nick Kew <ni...@webthing.com> a écrit :

> That looks like a possible manifestation of
>
http://issues.apache.org/bugzilla/show_bug.cgi?id=39329
> 
> Either apply the latest patch in the bug report, or
> update to
> the trunk version of mod_dbd.

And please let us know if it's working correctly.

As explained in a mail I sent on June the 25, I'm able
to make authentication running against a pg database
(I have to enter 4 or 5 time the user/password before
being accepted). Unfortunately, no response till now.
I've created a bug report on the same with the same
result.

I've switched to a PHP authentication but it should be
useful to make to have this feature.

Bye

Laurent

The misspelling master is on the Web.
   _________	100 % Dictionnary Free !
  /        /(
 /  Dico  / /	Pleins d'autres fautes sur
/________/ /	
(#######( /	http://destroyedlolo.homeunix.org
Quoi, des fautes d'orthographe! Pas possible ;-D.


      _____________________________________________________________________________ 
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Bug or configure error with mod_dbd and pgsql using Apache 2.2.3

Posted by Nick Kew <ni...@webthing.com>.
On Mon, 16 Jul 2007 11:55:21 -0700
"Ned Wolpert" <ne...@gmail.com> wrote:

> Folks-
> 
>   I'm seeing a problem where authentication for a user on my site
> using the mod_dbd structure works just fine for about 10 mins, then
> fails if 'pooling' (DBDPersist) is on, and works all the time if
> DBDPersist is off.  When it starts failing, the postgresql logs
> complain authn_dbd_1 isn't found
> 
> ERROR:  prepared statement "authn_dbd_1" does not exist

That looks like a possible manifestation of
http://issues.apache.org/bugzilla/show_bug.cgi?id=39329

Either apply the latest patch in the bug report, or update to
the trunk version of mod_dbd.

-- 
Nick Kew

Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org