Common Server Errors and
Problems
This section discusses some of the common errors and
problems that occur during normal Mailman use.
What is a 501 Error? What is an "Internal Server
Error"? How do I remedy this?
A "501 Internal Server Error"
is an extremely general error message that most web servers return
when things on the server-side aren't running correctly. It sounds
ominous and a lot of people think that their web server has actually
malfunctioned internally, but it hasn't. Your web server considers
a CGI script to be a part of itself, like a plug-in, so if there
is a failure while running a CGI script then the error will be
reported as though it were an error from a component of your web
server. If we designed web servers instead of web applications
then we would change the name of the 501 error to "Something
went wrong, consult your log for details". That wouldn't
scare as many people, and it would at least point people in the
right direction toward a solution. Until there is an Endymion
Web Server though, you get to look at ugly "Internal Server
Error" messages. Sorry.
The 501 error
code itself doesn't contain any information on what is wrong,
and therefore doesn't give any real help in diagnosing and fixing
problems. The key thing to remember though, is that if you see
a "501 Internal Server Error",
then your server has probably already located the script that
you have requested and verified that it exists, and even tried
to run it. This is a good thing, it means that you're almost there.
The only bad thing is that the script is breaking at some point
before it produces viable output. If you take a URL that generates
a "501 Internal Server Error"
and modify it slightly so that it is invalid or spelled incorrectly,
then you should no longer see a 501
error, you will probably see a "404 Not
Found" error instead. When you see a "501
Internal Server Error", then that means that your server
is probably at least locating the script and trying to run it,
just that it breaks for some reason.
The next step, obviously, is to figure
out exactly why and how the script is breaking, and fix that.
Many web servers, upon encountering an error of this type, will
produce more detailed information either at the bottom of the
error page or in log files on the server. This information is
greatly more important to solving the problem at hand, and should
be examined carefully. For reasons known only in Redmond, the
Microsoft Internet Explorer hides the specific error message from
you because it thinks that you're too dumb to be able to use it.
If you get a 501 error then you should immediately open any browser
other than the Internet Explorer and look to see if your server
provided a more specific error.
Beyond that, you should always be able to
find a specific error message in your log files for your server.
If you are using Apache server, then your log files will most
likely be in the "logs" subdirectory of your Apache installation.
Specifically, take a look at the very tail end of the file called
"error.log". You can use a command
like "tail -10 error.log"
to see the last 10 lines of that file. If your server has a lot
of activity and you want to be sure that you're looking at the
correct error lines that you just generated, then you can run
"tail -f error.log" and then
go and press "reload" in your web browser and you'll
see new lines appear in the log interactively. Newer versions
of Apache will frequently tell you exactly what is wrong, in plain
and simple English. Very nice feature. In some cases, the log
file won't say anything that you understand. These cases call
for a message to Endymion technical support. Don't hesitate to
ask us for assistance, we're happy to help when we can. If you're
getting as far as a 501 error then
you're almost there anyway, so just drop us a message, go out
for coffee, and we'll help you out as soon as we can.
To save a little bit of time, here is a
listing of some of the more common causes of 501 errors that we
normally will end up discovering when people come to us for help:
The first line of the script
The single most common reason for a server (especially
Apache) producing a "501 Internal Server
Error" is the first line of the script, the one that
is supposed to refer to the location of your Perl executable.
Make sure that it says something like:
#!/usr/bin/perl
...and make sure that there is actually a Perl interpreter
at that location. If there is not, then your web server will
attempt to run your script, your script will identify to the
shell that it is supposed to be run by the program at "#!/whatever",
and if "/whatever" does not exist
then the script will terminate unhappily and you will see a
501 error. The specific 501
error in that case will normally be something along the lines
of "File not found", depending on the shell that your
server is using.
A broken script
The next most common reason for a 501 error is that
you have introduced an actual flaw into the script file in some
way. You may have accidentally added a stray keystroke while
editing a setup parameter, or perhaps you transferred the file
from another machine in such a way that it has stray "^M" line-end
characters on each line, or some other flaw. If any of these
problems are the cause of your 501 error, then they will be
exposed by simply running the script from the command line.
What is a 403 Error? Why does my server tell me
"Forbidden"? How do I remedy it?
A "403 Forbidden"
error is a generic HTTP error that your server will send if it
thinks for some reason that you should not be allowed to to have
access to the file or script that you have requested. This error
can be caused by a lot of things. The key thing to remember though,
is that if you see a "403 Forbidden"
error, then your server has probably already located the resource
that you have requested and verified that it exists. This is a
good thing, it means that you're almost there. If you take a URL
that generates a "403 Forbidden"
error and modify it slightly so that it is invalid or spelled
incorrectly, then you should no longer see a 403
error, you will probably see a "404 Not
Found" error instead. If you are seeing a "403
Forbidden" error, then that means that your server is probably
at least locating the script and trying to run it.
The most common reasons why your server
might generate a "403 Forbidden"
error when you try to access MailMan (in order) are:
Script file permissions
The CGI script file that you are trying to access
is not executable. This generally applies only to Unix systems.
Check to see that the script file itself is executable, and
remember that it needs to be executable by the user that the
web server runs as. Remember that most of the time, web server
in Unix will run as "nobody" or as
a special user specifically set aside for the web server such
as "www", "httpd",
or "wwwuser". Many of our users will
set their script executable and they will verify that it is
executable from their shell while they are logged in to their
server as the "root" user, but then the web server will be unable
to run the script because it is running as "www".
Web server configuration
Be sure that your server is configured to run CGI
scripts. More information on this is available in the Unix
installation guide and the Windows
installation guide. If your server sees a file and knows
that it is supposed to run it because your Apache configuration
includes the "AddHandler"
directive but the directory that the file is sitting in does
not have the "ExecCGI"
option enabled, then you might see a 403
error.
What is a 404 "Not Found" Error? What does it mean?
How do I remedy this?
A "404 Not Found"
error or any other "Page Not Found" sort of error is
the general error message that most web servers return when they
cannot located a requested file. This error can be caused by a
lot of things. A few possible causes for this error:
Wrong URL
Honestly the most common cause of a 404
error is simply an incorrect URL. This is obvious, but sometimes
you don't notice for a while because you're looking for more
complicated things. Check your URL and make sure that it's really
correct.
What is a "premature end of script headers" error?
Why does it show up after about a month of use? How do I remedy
this?
A "premature end of script headers" error is an error
message returned by many web servers as a way of saying "the CGI
script didn't do anything." The error itself doesn't really do
much to explain the nature of the problem, so there are a few
ways to troubleshoot this error. First and foremost, check whether
you're using a licensed copy of MailMan or whether you're using
a demo, some of the demo expiration mechanisms can result in that
error if you try to circumvent them.
If your installation of MailMan was working
but now suddenly displays this error, then it is possible that
you were running a demo that has expired. All MailMan demos expire
30 days after they've been downloaded. MailMan ordinarily provides
useful feedback when it expires, but occasionally an installation
with customized templates will be unable to convey this information
because the necessary keywords in the interface templates have
been removed during customization.
If you're using a licensed version of MailMan,
or if you're using a demo and it's been less than 30 days since
you downloaded MailMan, then it's likely not a problem with product
expiration. The next step is to run your CGI scripts from a command
line (DOS prompt, xterm, etc). The exact syntax will vary from
system to system, but will basically resemble this: "perl
mailman.cgi". This will cause MailMan to run in offline
mode. It will ask for some information in "name=value"
format. Simply hit either CTRL-D or CTRL-Z (whichever one produces
the end-of-file character on your system, CTRL-D normally is used
for EOL characters in Unix shells and CTRL-Z is an EOL in Windows)
and press the ENTER key. If MailMan is running correctly, it will
output a stream of HTML. If it doesn't output anything, or returns
an error, then there's possibly a problem with your MailMan script,
possibly a syntax error that somebody introduced during configuration.
|