Issue with Apache2::Request

Issue with Apache2::Request

am 27.07.2009 23:44:17 von aw

Hi.

Background :

[Mon Jul 27 22:23:35 2009] [notice] Apache/2.2.9 (Debian) DAV/2
mod_jk/1.2.26 mod_perl/2.0.4 Perl/v5.10.0 configured -- resuming normal
operations
/usr/sbin/apache2: symbol lookup error:
/usr/lib/perl5/auto/APR/Request/Apache2/Apache2.so: undefined symbol:
apreq_handle_apache2

That happens apparently as soon as a module tries to "use" Apache2::Request.

Apache and mod_perl run fine as long as I don't use Apache2::Request.

I get the same error, whether Apache 2.2.9 is MPM-prefork or MPM-worker.
The installation/de-installation/re-installation of the Debian modules
brings up nothing special :
Setting up libapreq2 (2.08-5+b1) ...
Setting up libapache2-mod-apreq2 (2.08-5+b1) ...
Setting up libapache2-request-perl (2.08-5+b1) ...

Any idea anyone ?

Thanks in advance.

P.S. If the answer was to be "go ask in a Debian forum", and anyone
happened to know a relevant one, I'm a taker for a ref also.


Additional info :

# perl -V

Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
Platform:
osname=linux, osvers=2.6.26-1-vserver-amd64,
archname=x86_64-linux-gnu-thread-multi
uname='linux excelsior 2.6.26-1-vserver-amd64 #1 smp sat nov 8
20:24:14 utc 2008 x86_64 gnulinux '
config_args='-Dusethreads -Duselargefiles -Dccflags=-DDEBIAN
-Dcccdlflags=-fPIC -Darchname=x86_64-linux-gnu -Dprefix=/usr
-Dprivlib=/usr/share/perl/5.10 -Darchlib=/usr/lib/perl/5.10
-Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5
-Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/local
-Dsitelib=/usr/local/share/perl/5.10.0
-Dsitearch=/usr/local/lib/perl/5.10.0 -Dman1dir=/usr/share/man/man1
-Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1
-Dsiteman3dir=/usr/local/man/man3 -Dman1ext=1 -Dman3ext=3perl
-Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Ud_ualarm -Uusesfio
-Uusenm -DDEBUGGING=-g -Doptimize=-O2 -Duseshrplib
-Dlibperl=libperl.so.5.10.0 -Dd_dosuid -des'
hint=recommended, useposix=true, d_sigaction=define
useithreads=define, usemultiplicity=define
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DDEBIAN
-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64',
optimize='-O2 -g',
cppflags='-D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing
-pipe -I/usr/local/include'
ccversion='', gccversion='4.3.2', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib /lib64 /usr/lib64
libs=-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt
perllibs=-ldl -lm -lpthread -lc -lcrypt
libc=/lib/libc-2.7.so, so=so, useshrplib=true,
libperl=libperl.so.5.10.0
gnulibc_version='2.7'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -O2 -g -L/usr/local/lib'


Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV
PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
USE_64_BIT_ALL
USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES
USE_PERLIO USE_REENTRANT_API
Built under linux
Compiled at Jan 1 2009 15:42:01
@INC:
/etc/perl
/usr/local/lib/perl/5.10.0
/usr/local/share/perl/5.10.0
/usr/lib/perl5
/usr/share/perl5
/usr/lib/perl/5.10
/usr/share/perl/5.10
/usr/local/lib/site_perl
.

Re: Issue with Apache2::Request

am 27.07.2009 23:54:13 von Fred Moyer

On Mon, Jul 27, 2009 at 2:44 PM, Andr=E9 Warnier wrote:
> Hi.
>
> Background :
>
> [Mon Jul 27 22:23:35 2009] [notice] Apache/2.2.9 (Debian) DAV/2
> mod_jk/1.2.26 mod_perl/2.0.4 Perl/v5.10.0 configured -- resuming normal
> operations
> /usr/sbin/apache2: symbol lookup error:
> /usr/lib/perl5/auto/APR/Request/Apache2/Apache2.so: undefined symbol:
> apreq_handle_apache2

I think you may need this line in your httpd.conf:

LoadModule apreq_module modules/mod_apreq2.so

>
> That happens apparently as soon as a module tries to "use" Apache2::Reque=
st.
>
> Apache and mod_perl run fine as long as I don't use Apache2::Request.
>
> I get the same error, whether Apache 2.2.9 is MPM-prefork or MPM-worker.
> The installation/de-installation/re-installation of the Debian modules
> brings up nothing special :
> Setting up libapreq2 (2.08-5+b1) ...
> Setting up libapache2-mod-apreq2 (2.08-5+b1) ...
> Setting up libapache2-request-perl (2.08-5+b1) ...
>
> Any idea anyone ?
>
> Thanks in advance.
>
> P.S. If the answer was to be "go ask in a Debian forum", and anyone happe=
ned
> to know a relevant one, I'm a taker for a ref also.
>
>
> Additional info :
>
> # perl -V
>
> Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
> =A0Platform:
> =A0 =A0osname=3Dlinux, osvers=3D2.6.26-1-vserver-amd64,
> archname=3Dx86_64-linux-gnu-thread-multi
> =A0 =A0uname=3D'linux excelsior 2.6.26-1-vserver-amd64 #1 smp sat nov 8 2=
0:24:14
> utc 2008 x86_64 gnulinux '
> =A0 =A0config_args=3D'-Dusethreads -Duselargefiles -Dccflags=3D-DDEBIAN
> -Dcccdlflags=3D-fPIC -Darchname=3Dx86_64-linux-gnu -Dprefix=3D/usr
> -Dprivlib=3D/usr/share/perl/5.10 -Darchlib=3D/usr/lib/perl/5.10
> -Dvendorprefix=3D/usr -Dvendorlib=3D/usr/share/perl5 -Dvendorarch=3D/usr/=
lib/perl5
> -Dsiteprefix=3D/usr/local -Dsitelib=3D/usr/local/share/perl/5.10.0
> -Dsitearch=3D/usr/local/lib/perl/5.10.0 -Dman1dir=3D/usr/share/man/man1
> -Dman3dir=3D/usr/share/man/man3 -Dsiteman1dir=3D/usr/local/man/man1
> -Dsiteman3dir=3D/usr/local/man/man3 -Dman1ext=3D1 -Dman3ext=3D3perl
> -Dpager=3D/usr/bin/sensible-pager -Uafs -Ud_csh -Ud_ualarm -Uusesfio -Uus=
enm
> -DDEBUGGING=3D-g -Doptimize=3D-O2 -Duseshrplib -Dlibperl=3Dlibperl.so.5.1=
0.0
> -Dd_dosuid -des'
> =A0 =A0hint=3Drecommended, useposix=3Dtrue, d_sigaction=3Ddefine
> =A0 =A0useithreads=3Ddefine, usemultiplicity=3Ddefine
> =A0 =A0useperlio=3Ddefine, d_sfio=3Dundef, uselargefiles=3Ddefine, usesoc=
ks=3Dundef
> =A0 =A0use64bitint=3Ddefine, use64bitall=3Ddefine, uselongdouble=3Dundef
> =A0 =A0usemymalloc=3Dn, bincompat5005=3Dundef
> =A0Compiler:
> =A0 =A0cc=3D'cc', ccflags =3D'-D_REENTRANT -D_GNU_SOURCE -DDEBIAN
> -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=3D64',
> =A0 =A0optimize=3D'-O2 -g',
> =A0 =A0cppflags=3D'-D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasi=
ng -pipe
> -I/usr/local/include'
> =A0 =A0ccversion=3D'', gccversion=3D'4.3.2', gccosandvers=3D''
> =A0 =A0intsize=3D4, longsize=3D8, ptrsize=3D8, doublesize=3D8, byteorder=
=3D12345678
> =A0 =A0d_longlong=3Ddefine, longlongsize=3D8, d_longdbl=3Ddefine, longdbl=
size=3D16
> =A0 =A0ivtype=3D'long', ivsize=3D8, nvtype=3D'double', nvsize=3D8, Off_t=
=3D'off_t',
> lseeksize=3D8
> =A0 =A0alignbytes=3D8, prototype=3Ddefine
> =A0Linker and Libraries:
> =A0 =A0ld=3D'cc', ldflags =3D' -L/usr/local/lib'
> =A0 =A0libpth=3D/usr/local/lib /lib /usr/lib /lib64 /usr/lib64
> =A0 =A0libs=3D-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt
> =A0 =A0perllibs=3D-ldl -lm -lpthread -lc -lcrypt
> =A0 =A0libc=3D/lib/libc-2.7.so, so=3Dso, useshrplib=3Dtrue, libperl=3Dlib=
perl.so.5.10.0
> =A0 =A0gnulibc_version=3D'2.7'
> =A0Dynamic Linking:
> =A0 =A0dlsrc=3Ddl_dlopen.xs, dlext=3Dso, d_dlsymun=3Dundef, ccdlflags=3D'=
-Wl,-E'
> =A0 =A0cccdlflags=3D'-fPIC', lddlflags=3D'-shared -O2 -g -L/usr/local/lib=
'
>
>
> Characteristics of this binary (from libperl):
> =A0Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0PERL_IMPLICIT_CONTEXT PERL=
_MALLOC_WRAP USE_64_BIT_ALL
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0USE_64_BIT_INT USE_ITHREAD=
S USE_LARGE_FILES
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0USE_PERLIO USE_REENTRANT_A=
PI
> =A0Built under linux
> =A0Compiled at Jan =A01 2009 15:42:01
> =A0@INC:
> =A0 =A0/etc/perl
> =A0 =A0/usr/local/lib/perl/5.10.0
> =A0 =A0/usr/local/share/perl/5.10.0
> =A0 =A0/usr/lib/perl5
> =A0 =A0/usr/share/perl5
> =A0 =A0/usr/lib/perl/5.10
> =A0 =A0/usr/share/perl/5.10
> =A0 =A0/usr/local/lib/site_perl
> =A0 =A0.
>

Re: Issue with Apache2::Request

am 28.07.2009 01:26:42 von aw

Fred Moyer wrote:
> On Mon, Jul 27, 2009 at 2:44 PM, André Warnier wrote:
>> Hi.
>>
>> Background :
>>
>> [Mon Jul 27 22:23:35 2009] [notice] Apache/2.2.9 (Debian) DAV/2
>> mod_jk/1.2.26 mod_perl/2.0.4 Perl/v5.10.0 configured -- resuming normal
>> operations
>> /usr/sbin/apache2: symbol lookup error:
>> /usr/lib/perl5/auto/APR/Request/Apache2/Apache2.so: undefined symbol:
>> apreq_handle_apache2
>
> I think you may need this line in your httpd.conf:
>
> LoadModule apreq_module modules/mod_apreq2.so
>

Damn ! I love these lists !
Thanks Fred, that was it. Problem solved.

I just spent a day trying to figure out why that server was different
from all the others where it works.
Apparently, for once the Debian install procedure fails to do that by
itself. One gets complacent with these "apt-get install" things.

Thus for reference by others :
On Debian Lenny, an "apt-get install libapache2-request-perl" (install
of Apache2::Request)
- does install the module mod_apreq2.so in modules/
- creates a config file "apreq.load" in /etc/apache2/mods_available
containing the proper line
LoadModule apreq_module /usr/lib/apache2/modules/mod_apreq2.so

but /does not/ install a link to it in /etc/apache2/mods_enabled.
That, you have to do yourself by the command
ap2enmod apreq

After that, it gets loaded properly at Apache restart, and the ugly
message above disappears.