Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: Dev

Test::Apache Failure with Apache 2.2

 

 

ModPerl dev RSS feed   Index | Next | Previous | View Threaded


david at kineticode

May 2, 2008, 7:30 PM

Post #1 of 7 (564 views)
Permalink
Test::Apache Failure with Apache 2.2

Hey All,

I've just been updating the test suite for
MasonX::Interp::WithCallbacks and noticed that, while tests pass
perfectly with Apache 1, the server never starts up with Apache 2.
With Apache 2, I get:

benedict% perl Build.PL
Checking whether your kit is complete...
Looks good

Checking prerequisites...
Looks good

Creating new 'Build' script for 'MasonX-Interp-WithCallbacks' version
'1.18'

benedict% ./Build test --test_files t/08apache.t
Copying lib/MasonX/Interp/WithCallbacks.pm -> blib/lib/MasonX/Interp/
WithCallbacks.pm
/usr/local/bin/perl -I /Users/david/dev/Kineticode/MasonX-Interp-
WithCallbacks/trunk/blib/lib -I /Users/david/dev/Kineticode/MasonX-
Interp-WithCallbacks/trunk/blib/arch t/TEST -clean
[warning] setting ulimit to allow core files
ulimit -c unlimited; /usr/local/bin/perl /Users/david/dev/Kineticode/
MasonX-Interp-WithCallbacks/trunk/t/TEST -clean
/usr/local/bin/perl -I /Users/david/dev/Kineticode/MasonX-Interp-
WithCallbacks/trunk/blib/lib -I /Users/david/dev/Kineticode/MasonX-
Interp-WithCallbacks/trunk/blib/arch t/TEST -bugreport -verbose=0
[warning] setting ulimit to allow core files
ulimit -c unlimited; /usr/local/bin/perl /Users/david/dev/Kineticode/
MasonX-Interp-WithCallbacks/trunk/t/TEST -bugreport -verbose=0
/usr/local/apache2/bin/httpd -d /Users/david/dev/Kineticode/MasonX-
Interp-WithCallbacks/trunk/t -f /Users/david/dev/Kineticode/MasonX-
Interp-WithCallbacks/trunk/t/conf/httpd.conf -D APACHE2
using Apache/2.2.8 (prefork MPM)

waiting 60 seconds for server to start: .Loading CGI at runtime. You
could increase shared memory between Apache processes by preloading it
in your httpd.conf or handler.pl file
Syntax error on line 189 of /Users/david/dev/Kineticode/MasonX-Interp-
WithCallbacks/trunk/t/conf/httpd.conf:
mod_perl is already running, too late for PerlSwitches
.............................................................
waiting 60 seconds for server to start: not ok
[ error] giving up after 61 secs. If you think that your system
is slow or overloaded try again with a longer timeout value.
by setting the environment variable APACHE_TEST_STARTUP_TIMEOUT
to a high value (e.g. 360) and repeat the last command.

[ error] server failed to start! (t/logs/error_log wasn't created,
start the server in the debug mode)
benedict%

I'm not sure what the difference is here. Anyone know?

If you want to try it yourself, you can check out my code from svn here:

https://svn.kineticode.com/MasonX-Interp-WithCallbacks/trunk

I have Apache::Test 1.31 installed and am tying t run the tests
against my 2.2.8 Apache server with mod_perl 2.04 and Perl 5.10.

Thanks,

David

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe[at]perl.apache.org
For additional commands, e-mail: dev-help[at]perl.apache.org


david at kineticode

May 3, 2008, 4:18 PM

Post #2 of 7 (537 views)
Permalink
Re: Test::Apache Failure with Apache 2.2 [In reply to]

On May 2, 2008, at 19:30, David E. Wheeler wrote:

> I've just been updating the test suite for
> MasonX::Interp::WithCallbacks and noticed that, while tests pass
> perfectly with Apache 1, the server never starts up with Apache 2.

Never mind. I figured it out. I had to change this:

<Perl>
use File::Spec::Functions qw(catdir);
use lib catdir '@ServerRoot@', 'lib';
use lib catdir '@ServerRoot@', '..', 'blib';
use lib catdir '@ServerRoot@', '..', 'lib';
</Perl>

To be surrounded by an IfDefine:

<IfDefine !MODPERL2>
<Perl>
use File::Spec::Functions qw(catdir);
use lib catdir '@ServerRoot@', 'lib';
use lib catdir '@ServerRoot@', '..', 'blib';
use lib catdir '@ServerRoot@', '..', 'lib';
</Perl>
</IfDefine>

Not sure why there's a difference here between mod_perl 1 and mod_perl
2, but I'm happy that the solution seems to be simple. Is this
something that's documented somewhere?

Thanks,

David

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe[at]perl.apache.org
For additional commands, e-mail: dev-help[at]perl.apache.org


fred at redhotpenguin

May 3, 2008, 5:52 PM

Post #3 of 7 (541 views)
Permalink
Re: Test::Apache Failure with Apache 2.2 [In reply to]

David E. Wheeler wrote:
> On May 2, 2008, at 19:30, David E. Wheeler wrote:
>
>> I've just been updating the test suite for
>> MasonX::Interp::WithCallbacks and noticed that, while tests pass
>> perfectly with Apache 1, the server never starts up with Apache 2.
>
> Never mind. I figured it out. I had to change this:
>
> <Perl>
> use File::Spec::Functions qw(catdir);
> use lib catdir '@ServerRoot@', 'lib';
> use lib catdir '@ServerRoot@', '..', 'blib';
> use lib catdir '@ServerRoot@', '..', 'lib';
> </Perl>
>
> To be surrounded by an IfDefine:
>
> <IfDefine !MODPERL2>
> <Perl>
> use File::Spec::Functions qw(catdir);
> use lib catdir '@ServerRoot@', 'lib';
> use lib catdir '@ServerRoot@', '..', 'blib';
> use lib catdir '@ServerRoot@', '..', 'lib';
> </Perl>
> </IfDefine>
>
> Not sure why there's a difference here between mod_perl 1 and mod_perl
> 2, but I'm happy that the solution seems to be simple. Is this something
> that's documented somewhere?

MODPERL2 is documented here, although it doesn't answer the question of
why the server starts with that directive and doesn't start without it:

http://perl.apache.org/docs/2.0/user/porting/porting.html#Making_Code_Conditional_on_Running_mod_perl_Version

Most instances of the server not starting which have not been related to
the timeout being too low were missing test skips if a certain module
wasn't present (i.e. mod_alias, etc). I know I've fixed a few of those
issues, but there may be some remaining. My guess is that your httpd
builds may not have the exact same modules compiled in or loaded
dynamically.

I don't really understand why you need that perl section at all though,
Apache::Test should be picking up those library paths implicitly.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe[at]perl.apache.org
For additional commands, e-mail: dev-help[at]perl.apache.org


david at kineticode

May 3, 2008, 7:13 PM

Post #4 of 7 (541 views)
Permalink
Re: Test::Apache Failure with Apache 2.2 [In reply to]

On May 3, 2008, at 17:52, Fred Moyer wrote:

>> Not sure why there's a difference here between mod_perl 1 and
>> mod_perl 2, but I'm happy that the solution seems to be simple. Is
>> this something that's documented somewhere?
>
> MODPERL2 is documented here, although it doesn't answer the question
> of why the server starts with that directive and doesn't start
> without it:

Yes, I knew that MODPERL2 was documented, I just don't know why it's
necessary here. Sorry I wasn't clearer.

> Most instances of the server not starting which have not been
> related to the timeout being too low were missing test skips if a
> certain module wasn't present (i.e. mod_alias, etc). I know I've
> fixed a few of those issues, but there may be some remaining. My
> guess is that your httpd builds may not have the exact same modules
> compiled in or loaded dynamically.

I'm not sure how the Perl block makes a difference.

> I don't really understand why you need that perl section at all
> though, Apache::Test should be picking up those library paths
> implicitly.

When I removed it, tests failed under mod_perl 1. Odd.

Thanks,

David

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe[at]perl.apache.org
For additional commands, e-mail: dev-help[at]perl.apache.org


fred at redhotpenguin

May 3, 2008, 9:45 PM

Post #5 of 7 (536 views)
Permalink
Re: Test::Apache Failure with Apache 2.2 [In reply to]

David E. Wheeler wrote:
>
> I'm not sure what the difference is here. Anyone know?
>
> If you want to try it yourself, you can check out my code from svn here:
>
> https://svn.kineticode.com/MasonX-Interp-WithCallbacks/trunk

Tried to check it out but got the following message.

phred[at]harpua svn $ svn co
https://svn.kineticode.com/MasonX-Interp-WithCallbacks/trunk
svn: REPORT request failed on '/!svn/vcc/default'
svn: Can't open file '/var/svn/db/revprops/3730': Permission denied


> I have Apache::Test 1.31 installed and am tying t run the tests against
> my 2.2.8 Apache server with mod_perl 2.04 and Perl 5.10.

Can try it out here, I'm setting up a 5.10/2.2.8 test environment.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe[at]perl.apache.org
For additional commands, e-mail: dev-help[at]perl.apache.org


david at kineticode

May 4, 2008, 10:43 AM

Post #6 of 7 (525 views)
Permalink
Re: Test::Apache Failure with Apache 2.2 [In reply to]

On May 3, 2008, at 21:45, Fred Moyer wrote:

> Tried to check it out but got the following message.
>
> phred[at]harpua svn $ svn co https://svn.kineticode.com/MasonX-Interp-WithCallbacks/trunk
> svn: REPORT request failed on '/!svn/vcc/default'
> svn: Can't open file '/var/svn/db/revprops/3730': Permission denied

Oops, broke a permission when I changed a changelog entry yesterday.
Fixed.

>> I have Apache::Test 1.31 installed and am tying t run the tests
>> against my 2.2.8 Apache server with mod_perl 2.04 and Perl 5.10.
>
> Can try it out here, I'm setting up a 5.10/2.2.8 test environment.

Great, thanks!

Best,

David

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe[at]perl.apache.org
For additional commands, e-mail: dev-help[at]perl.apache.org


david at kineticode

May 4, 2008, 11:01 AM

Post #7 of 7 (527 views)
Permalink
Re: Test::Apache Failure with Apache 2.2 [In reply to]

Ah, WTF?

http://www.nntp.perl.org/group/perl.cpan.testers/2008/05/msg1403980.html

Why would the base class be empty? :-(

David


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe[at]perl.apache.org
For additional commands, e-mail: dev-help[at]perl.apache.org

ModPerl dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.