You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-dev@httpd.apache.org by David Wheeler <da...@kineticode.com> on 2004/06/12 02:06:39 UTC
Apache::test + mod_ssl
Hi All,
I'm working on a module in another project that's still using the old
Apache::test (not the lc "test"). When I attempt to use it with my copy
of apache with mod_ssl statically compiled in with mm support, I get
this error:
Ouch! ap_mm_create(1048576, "/usr/local/apache/logs/httpd.mm.6521")
failed
Error: MM: mm:core: failed to open semaphore file (Permission denied):
OS: No such file or directory
Now, I don't get this error with Apache::Test; so I was wondering: is
there was perhaps some magical incantation I could but into the
httpd.conf created for the tests that would prevent this error from
happening?
TIA,
David
Re: Apache::test + mod_ssl
Posted by David Wheeler <da...@kineticode.com>.
On Jun 13, 2004, at 3:24 PM, Joe Orton wrote:
> The problem is that if you use an EAPI-patched-1.3, you get a path to a
> mutex file hard-coded into the httpd binary. If this path is absolute,
> as above, then you need permission in that path to create a file, so
> using httpd-test to run httpd as a user doesn't work if that path is
> only writable by root, obviously.
Yes, but the thing is that I don't get this error with Apache::Test,
only with Apache::test (not the difference in the "t").
> You can compile EAPI-patched-1.3 with a relative EAPI_MM_CORE_PATH (or
> wahtever it is, I don't remember), and the problem will go away as it
> will become effectively ServerRoot-relative.
Hrm. Could A-T be turning off the MM stuff?
Regards,
David
Re: Apache::test + mod_ssl
Posted by Joe Orton <jo...@redhat.com>.
On Mon, Jun 14, 2004 at 12:13:53AM +0300, Stas Bekman wrote:
> David Wheeler wrote:
> >>Where does it create that semaphore file with A-T? May be it's the env
> >>val for $TMPDIR? but it's specific to modperl-2.0.
> >
> >All I know is what the error message says:
> >
> >Ouch! ap_mm_create(1048576, "/usr/local/apache/logs/httpd.mm.6521") failed
> >Error: MM: mm:core: failed to open semaphore file (Permission denied):
> >OS: No such file or directory
> >
> >I'm guessing that under A-T, it creates it in the test directory.
The problem is that if you use an EAPI-patched-1.3, you get a path to a
mutex file hard-coded into the httpd binary. If this path is absolute,
as above, then you need permission in that path to create a file, so
using httpd-test to run httpd as a user doesn't work if that path is
only writable by root, obviously.
You can compile EAPI-patched-1.3 with a relative EAPI_MM_CORE_PATH (or
wahtever it is, I don't remember), and the problem will go away as it
will become effectively ServerRoot-relative.
All IIRC :)
joe
Re: Apache::test + mod_ssl
Posted by David Wheeler <da...@kineticode.com>.
On Jun 14, 2004, at 1:40 PM, Stas Bekman wrote:
> I suppose we could fix Apache::testold (it was renamed) to have -d if
> it can be made into more than a hack. Though I'm not sure when a new
> version of mp1 is going to be released.
Looks like it would be pretty easy to add to MM_test(), though I don't
know how well a relative path will work.
Regards,
David
Re: Apache::test + mod_ssl
Posted by Stas Bekman <st...@stason.org>.
David Wheeler wrote:
> On Jun 14, 2004, at 10:37 AM, David Wheeler wrote:
>
>> I was able to hack it in, but unfortunately it doesn't eliminate the
>> problem. Very odd...
>
>
> No, I take it back; it _did_ help! I just got a different error:
>
> Ouch! ap_mm_create(1048576,
> "/Users/david/dev/perl/mason-1.2/dist/t/logs/httpd.mm.8917") failed
>
> But I know how to fix that; there's no logs directory!
>
> Thanks again for the help.
:)
I suppose we could fix Apache::testold (it was renamed) to have -d if it can
be made into more than a hack. Though I'm not sure when a new version of mp1
is going to be released.
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
Re: Apache::test + mod_ssl
Posted by David Wheeler <da...@kineticode.com>.
On Jun 14, 2004, at 10:37 AM, David Wheeler wrote:
> I was able to hack it in, but unfortunately it doesn't eliminate the
> problem. Very odd...
No, I take it back; it _did_ help! I just got a different error:
Ouch! ap_mm_create(1048576,
"/Users/david/dev/perl/mason-1.2/dist/t/logs/httpd.mm.8917") failed
But I know how to fix that; there's no logs directory!
Thanks again for the help.
Regards,
David
Re: Apache::test + mod_ssl
Posted by David Wheeler <da...@kineticode.com>.
On Jun 14, 2004, at 10:30 AM, David Wheeler wrote:
> So this is what I needed to know; thanks. I'll try to hack the Apache
> startup code in this module to use -d and see if that helps things.
I was able to hack it in, but unfortunately it doesn't eliminate the
problem. Very odd...
Regards,
David
Re: Apache::test + mod_ssl
Posted by David Wheeler <da...@kineticode.com>.
On Jun 14, 2004, at 1:24 AM, Stas Bekman wrote:
> A-T writes what it does:
Right, so does A-t:
/Users/david/dev/perl/mason-1.2/dist/t/httpd -f
/Users/david/dev/perl/mason-1.2/dist/t/httpd.conf
With Apache 1.x, A-T does this:
/usr/local/apache/bin/httpd -d
/Users/david/dev/perl/MasonX-Interp-WithCallbacks/t -f
/Users/david/dev/perl/MasonX-Interp-WithCallbacks/t/conf/httpd.conf -D
APACHE1
So the difference is the -d, which I'm guessing comes early enough that
it affects where mod_ssl tries to write the semaphore file.
So this is what I needed to know; thanks. I'll try to hack the Apache
startup code in this module to use -d and see if that helps things.
Regards,
David
Re: Apache::test + mod_ssl
Posted by Stas Bekman <st...@stason.org>.
David Wheeler wrote:
> On Jun 13, 2004, at 2:13 PM, Stas Bekman wrote:
>
>> I suppose so. Check that A-t generates ServerRoot setting
>> pointing to the local dir.
>
>
> It does. I don't know what else might be the problem...what command does
> A-T use to start Apache? Could it be different somehow than what A-t uses?
A-T writes what it does:
% t/TEST -start
setting ulimit to allow core files
ulimit -c unlimited; /home/stas/perl/5.8.4-ithread/bin/perl5.8.4
/home/stas/apache.org/mp2-pool/ModPerl-Registry/t/TEST -start
/home/stas/httpd/prefork/bin/httpd -d
/home/stas/apache.org/mp2-pool/ModPerl-Registry/t -f
/home/stas/apache.org/mp2-pool/ModPerl-Registry/t/conf/httpd.conf -D APACHE2
-D PERL_USEITHREADS
using Apache/2.0.50-dev (prefork MPM)
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
Re: Apache::test + mod_ssl
Posted by David Wheeler <da...@kineticode.com>.
On Jun 13, 2004, at 2:13 PM, Stas Bekman wrote:
> I suppose so. Check that A-t generates ServerRoot setting
> pointing to the local dir.
It does. I don't know what else might be the problem...what command
does A-T use to start Apache? Could it be different somehow than what
A-t uses?
Regards,
David
Re: Apache::test + mod_ssl
Posted by Stas Bekman <st...@stason.org>.
David Wheeler wrote:
> On Jun 11, 2004, at 8:24 PM, Stas Bekman wrote:
>
>>> I'm working on a module in another project that's still using the old
>>> Apache::test (not the lc "test").
>>
>>
>> Any reason why you wouldn't move to A-T?
>
>
> Like I said, it's not my module, so it's not my call.
Neither I familiar with A-t.
>> Where does it create that semaphore file with A-T? May be it's the env
>> val for $TMPDIR? but it's specific to modperl-2.0.
>
>
> All I know is what the error message says:
>
> Ouch! ap_mm_create(1048576, "/usr/local/apache/logs/httpd.mm.6521") failed
> Error: MM: mm:core: failed to open semaphore file (Permission denied):
> OS: No such file or directory
>
> I'm guessing that under A-T, it creates it in the test directory.
I suppose so. Check that A-t generates ServerRoot setting
pointing to the local dir.
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
Re: Apache::test + mod_ssl
Posted by David Wheeler <da...@kineticode.com>.
On Jun 11, 2004, at 8:24 PM, Stas Bekman wrote:
>> I'm working on a module in another project that's still using the old
>> Apache::test (not the lc "test").
>
> Any reason why you wouldn't move to A-T?
Like I said, it's not my module, so it's not my call.
> Where does it create that semaphore file with A-T? May be it's the env
> val for $TMPDIR? but it's specific to modperl-2.0.
All I know is what the error message says:
Ouch! ap_mm_create(1048576, "/usr/local/apache/logs/httpd.mm.6521")
failed
Error: MM: mm:core: failed to open semaphore file (Permission denied):
OS: No such file or directory
I'm guessing that under A-T, it creates it in the test directory.
Regards,
David
Re: Apache::test + mod_ssl
Posted by Stas Bekman <st...@stason.org>.
David Wheeler wrote:
> Hi All,
>
> I'm working on a module in another project that's still using the old
> Apache::test (not the lc "test").
Any reason why you wouldn't move to A-T?
> When I attempt to use it with my copy
> of apache with mod_ssl statically compiled in with mm support, I get
> this error:
>
> Ouch! ap_mm_create(1048576, "/usr/local/apache/logs/httpd.mm.6521") failed
> Error: MM: mm:core: failed to open semaphore file (Permission denied):
> OS: No such file or directory
>
> Now, I don't get this error with Apache::Test; so I was wondering: is
> there was perhaps some magical incantation I could but into the
> httpd.conf created for the tests that would prevent this error from
> happening?
Where does it create that semaphore file with A-T? May be it's the env val for
$TMPDIR? but it's specific to modperl-2.0.
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com