You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Grant <em...@yahoo.com> on 2004/07/09 19:00:22 UTC

[users@httpd] 500 error & error_log entry

I've been noticing infrequent 500 errors on my new
server which uses a mod_perl module called
Interchange::Link.  When this happens I can hit
refresh a few times and the page will eventually load
properly.  Here is the apache2 error_log output:

Sun Jul 04 00:29:19 2004] [error] [client
172.209.110.104] Undefined subroutine
&Interchange::Link::die_page called at
/usr/lib/perl5/site_perl/5.8.2/Interchange/Link.pm
line 584.\n, referer: http://my.ip/page.html

Here is the code from Interchange/Link.pm around line
584:

#warn "Got entity.\n";

    my $cfg = setup_location($r);

#line 584 below
    $SIG{PIPE} = sub { die_page("signal"); };
    $SIG{ALRM} = sub { server_not_running(); exit 1;
};

    my ($remote, $port, $iaddr, $paddr, $proto,
$line);

    my $ok;

    local(*SOCK);

    my $socklist = $cfg->{ServerPool};

    if($cfg->{RandomServer}) {
        $socklist = [ @$socklist ];
        shuffle($socklist);
    }

    my $tries = 0;
    while ($tries++ < $cfg->{ConnectTries}) {
        for my $sockname (@$socklist) {

Does anyone have any idea what could be causing this,
or where I can start trying to figure it out?

- Grant


		
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_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] 500 error & error_log entry

Posted by Grant <em...@yahoo.com>.
--- Nick Kew <ni...@webthing.com> wrote:
> On Fri, 9 Jul 2004, Grant wrote:
> 
> > #line 584 below
> >     $SIG{PIPE} = sub { die_page("signal"); };
> >     $SIG{ALRM} = sub { server_not_running(); exit
> 1;
> > };
> 
> Erk!
> 
> First principles of programming: never, ever use
> exit in library code.
> That includes code run under mod_perl.  Conclusion:
> don't even think
> of running the above under mod_perl.
> 
> If it's complaining that die_page is undefined, it
> indicates one or
> more of very shoddy code or incorrectly installed
> code.
> 
> -- 
> Nick Kew

I don't know how it could be an incorrect installation
of the module.  All I had to do was add a Location
definition to my apache2 conf file, and put the module
in @INC.  It works fine 95% of the time.

Do you think it is definitely a problem with the
module's code then?  It couldn't be some kind of a 
misconfiguration of some other aspect of my system?  I
don't know where to start with this, and just I'm
trying to get any info on it that I can.

- Grant


		
__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_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] 500 error & error_log entry

Posted by Nick Kew <ni...@webthing.com>.
On Fri, 9 Jul 2004, Grant wrote:

> #line 584 below
>     $SIG{PIPE} = sub { die_page("signal"); };
>     $SIG{ALRM} = sub { server_not_running(); exit 1;
> };

Erk!

First principles of programming: never, ever use exit in library code.
That includes code run under mod_perl.  Conclusion: don't even think
of running the above under mod_perl.

If it's complaining that die_page is undefined, it indicates one or
more of very shoddy code or incorrectly installed code.

-- 
Nick Kew

---------------------------------------------------------------------
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] Apache 1.3x Secure Server

Posted by dan <in...@hostinthebox.net>.
Bob Cohen wrote:
> dan wrote:
>  > This is covered in mod_ssl's FAQ.  This would apply to you if you're
> 
>> using mod_ssl:
>>
>> http://www.modssl.org/docs/2.7/ssl_faq.html#remove-passphrase
> 
> 
> Thank you Dan.  I guess it isn't such a good idea to do this, eh?  It's 
> just that I've got an awful memory, occasional power outages, and a 
> e-commerce program that relies on the secure server running to work.
> 
> Bob
> 
> 

Bob -

It's not as insecure as one might thing.  Remember that there are other 
ways to secure the server.  If you make sure no one else has access to 
the key, you are in no danger.  I've been in your situation a number of 
times, and found this to be appropriate for most every time.

There's also a way, from within Apache, to run an external program that 
generates the key and uses that as an argument to Apache's startup 
procedure, which alleviates the problem that we're talking about.  But 
by doing stuff that way, too, you have to make sure no one else has 
access to that program.

Thanks
-dant

---------------------------------------------------------------------
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] Apache 1.3x Secure Server

Posted by Bob Cohen <bc...@bpecreative.com>.
dan wrote:
  > This is covered in mod_ssl's FAQ.  This would apply to you if you're
> using mod_ssl:
> 
> http://www.modssl.org/docs/2.7/ssl_faq.html#remove-passphrase

Thank you Dan.  I guess it isn't such a good idea to do this, eh?  It's 
just that I've got an awful memory, occasional power outages, and a 
e-commerce program that relies on the secure server running to work.

Bob


---------------------------------------------------------------------
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] Apache 1.3x Secure Server

Posted by dan <in...@hostinthebox.net>.
Bob Cohen wrote:
> Is it possible to set up Apache 1.3x to boot with the secure server 
> without having to re-enter the password?  If so, how?  Thanks.
> 
> Bob Cohen

Bob -

This is covered in mod_ssl's FAQ.  This would apply to you if you're 
using mod_ssl:

http://www.modssl.org/docs/2.7/ssl_faq.html#remove-passphrase

Thanks
-dant

---------------------------------------------------------------------
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] Apache 1.3x Secure Server

Posted by Bob Cohen <bc...@bpecreative.com>.
Is it possible to set up Apache 1.3x to boot with the secure server 
without having to re-enter the password?  If so, how?  Thanks.

Bob Cohen

---------------------------------------------------------------------
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