You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2016/05/15 13:19:15 UTC

[Bug 59558] New: Better error messages and configure hints for Berkeley db

https://bz.apache.org/bugzilla/show_bug.cgi?id=59558

            Bug ID: 59558
           Summary: Better error messages and configure hints for Berkeley
                    db
           Product: Apache httpd-2
           Version: 2.4.20
          Hardware: PC
                OS: Mac OS X 10.1
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_authn_dbm
          Assignee: bugs@httpd.apache.org
          Reporter: toscano.luca@gmail.com

Hello!

A couple of improvements might be done after this email thread in users@:
http://www.gossamer-threads.com/lists/apache/users/458433

1) AH01754 error message should give more hints about what is the problem and
how to correct it. Example:

[Thu May 05 18:12:29.915467 2016] [authn_dbm:error] [pid 9107:tid
140031532377856] (20019)DSO load failed: [client 127.0.0.1:54442] AH01754:
could not open dbm (type DB) auth file:
/home/tixu/httpd-2.4.20-bin/dbm-auth-file

The solution was to add --with-berkeley-db to httpd's configure and install
something like libdb-dev(evel)* on the target system.


2) the option --with-berkeley-db is present in APR's configure help but not in
the httpd's one. Since it is probably passed down as it is to APR when using
--with-included-apr, it might be good to add a note in the httpd's configure
help message.

Luca

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 59558] Better error messages and configure hints for Berkeley db

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59558

--- Comment #8 from Luca Toscano <to...@gmail.com> ---
Didn't check the code but for 1) I suspected too that it would have been hard.
So maybe adding some notes in the configure could be doable and useful, but
what do you think about the documentation? Would you have resolved the problem
with the new note or should I add more?

Luca

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 59558] Better error messages and configure hints for Berkeley db

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59558

--- Comment #10 from Luca Toscano <to...@gmail.com> ---
Might be a bit too implementation oriented, I'd prefer not to add the name to
avoid hardcoding detailed information in the docs (that should be able to
change in the future without rewriting the docs, even if very unlikely :P)

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 59558] Better error messages and configure hints for Berkeley db

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59558

--- Comment #5 from Luca Toscano <to...@gmail.com> ---
As temp step I updated the  trunk documentation with some useful info:

https://httpd.apache.org/docs/trunk/mod/mod_authn_dbm.html#authdbmtype

Will backport it to 2.4 later on!

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 59558] Better error messages and configure hints for Berkeley db

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59558

--- Comment #9 from Tianyin Xu <ti...@cs.ucsd.edu> ---
Yes, I would not encounter this problem if the docs have told that I need to
configure with --with-berkeley-db. 

Just a tiny suggestion: can we also write down the DSO's name (e.g.,
lib/apr-util-1/apr_dbm_db-1.so) so that the users can check it if they
encounter the same issue?

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 59558] Better error messages and configure hints for Berkeley db

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59558

--- Comment #3 from Tianyin Xu <ti...@cs.ucsd.edu> ---
Thanks Luca!

A note for the log message: the key information missing here (which puzzled me
in the first place) is that the current logs do not tell which DSO file
("lib/apr-util-1/apr_dbm_db-1.so") it fails to load. Instead, the current msg
confused me to believe the problem comes from the auth file. 

If we know the error is caused by missing "lib/apr-util-1/apr_dbm_db-1.so", the
direction would be clear. 

I think a log msg would be printed out when DSO loading fails (e.g., upon the
failure of dlopen)

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 59558] Better error messages and configure hints for Berkeley db

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59558

--- Comment #4 from Tianyin Xu <ti...@cs.ucsd.edu> ---
Also, from the user's perspective, it's better to improve the docs of
mod-auth-dbm if possible,
https://httpd.apache.org/docs/current/mod/mod_authn_dbm.html

The current docs have too little information. For example, in the AuthDBMType
entry, there's even no description of the options like SDBM|GDBM|NDBM|DB. When
I encountered the error, my first reaction was "ohh, perhaps DB is not Berkeley
DB?" I couldn't make sure of this until Luca replied on the mailing list...

Thanks!

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 59558] Better error messages and configure hints for Berkeley db

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59558

--- Comment #1 from Luca Toscano <to...@gmail.com> ---
Email thread on mail-archies.apache.org:

http://mail-archives.apache.org/mod_mbox/httpd-users/201605.mbox/%3CCABBDWwcrO1T=ytFuYyYmWDG+AEsbOqKgW-WN9SL3f30sPzfPcQ@mail.gmail.com%3E

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 59558] Better error messages and configure hints for Berkeley db

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59558

--- Comment #6 from Luca Toscano <to...@gmail.com> ---
2.4 documentation updated too:

https://httpd.apache.org/docs/current/mod/mod_authn_dbm.html

Remaining to do:

1) Check if AH01754 error message could be improved.
2) Maybe add a note in http's config about DBM options passed to APR?

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 59558] Better error messages and configure hints for Berkeley db

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59558

Tianyin Xu <ti...@cs.ucsd.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tixu@cs.ucsd.edu

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 59558] Better error messages and configure hints for Berkeley db

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59558

--- Comment #11 from Tianyin Xu <ti...@cs.ucsd.edu> ---
make sense. Thanks, Luca!

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 59558] Better error messages and configure hints for Berkeley db

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59558

--- Comment #2 from Luca Toscano <to...@gmail.com> ---
Found a reference in the docs about 2):

https://httpd.apache.org/docs/current/programs/configure.html#options

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 59558] Better error messages and configure hints for Berkeley db

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59558

--- Comment #7 from Tianyin Xu <ti...@cs.ucsd.edu> ---
For 1),

Given the current code log, it may not be trivial to change Log AH01754 (the
DSO loading is invisible at that time). A straightforward way is to add an
error log in dbm_open_type() in srclib/apr-util/dbm/apr_dbm.c or directly in
apu_dso_load() in srclib/apr-util/misc/apu_dso.c when the loading fails.

But these are in the apr-util library, so I don't know whether adding logs
there is appropriate. 

On the other hand, if the users build the correct DSO files, they won't
encounter this problem.

~t

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org