Internal 500 Error (Ubuntu jaunty / Mailman 2.1.12 / Python 2.6.2)

Hi, I've tried to look this up on the lists, forums, etc. but have failed to find anything that resolves this issue, so forgive me if I have missed a solution mentioned elsewhere.
I have recently upgraded my Ubuntu distribution to Jaunty. This upgrade included an upgrade on Mailman, Python and Apache2.
I'm currently running the following versions:
ii apache2 2.2.11-2ubuntu2.1 Apache HTTP Server metapackage ii apache2-mpm-prefork 2.2.11-2ubuntu2.1 Apache HTTP Server - traditional non-threade ii python2.6 2.6.2-0ubuntu1 An interactive high-level object-oriented la ii listadmin 2.40-2.2 command line mailman moderator queue manipul ii mailman 1:2.1.12-1 Powerful, web-based mailing list manager
I have looked through the logs, but nothing seems to indicate anything special, aside from the expressive line:
Premature end of script headers: admin
In my Apache2 error log file (turned logging to 'debug' level).
Running the 'admin' or 'listinfo' scripts from the shell gives me this:
# ./listinfo Content-type: text/html
<head><title>Bug in Mailman version 2.1.12</title></head> <body bgcolor=#ffffff><h2>Bug in Mailman version 2.1.12</h2> <p><h3>We're sorry, we hit a bug!</h3>
<p>Please inform the webmaster for this site of this problem. Printing of traceback and other system information has been explicitly inhibited, but the webmaster can find this information in the Mailman error logs.
I ran 'check_perms' and while there were errors it found, they were all fixed. This had no effect on the problem. Mailman appears to be operational otherwise. Emails are sent and received without issues. I can admin the site using the 'listadmin' tools. However, the web interface is completely broken.
What am I missing?
Thanks!
Derek Morrison

Dev Guy wrote:
Hi, I've tried to look this up on the lists, forums, etc. but have failed to find anything that resolves this issue, so forgive me if I have missed a solution mentioned elsewhere.
I have recently upgraded my Ubuntu distribution to Jaunty. This upgrade included an upgrade on Mailman, Python and Apache2.
I'm currently running the following versions:
ii apache2 2.2.11-2ubuntu2.1 Apache HTTP Server metapackage ii apache2-mpm-prefork 2.2.11-2ubuntu2.1 Apache HTTP Server - traditional non-threade ii python2.6 2.6.2-0ubuntu1 An interactive high-level object-oriented la ii listadmin 2.40-2.2 command line mailman moderator queue manipul ii mailman 1:2.1.12-1 Powerful, web-based mailing list manager
I have looked through the logs, but nothing seems to indicate anything special, aside from the expressive line:
Premature end of script headers: admin
In my Apache2 error log file (turned logging to 'debug' level).
Running the 'admin' or 'listinfo' scripts from the shell gives me this:
# ./listinfo Content-type: text/html
<head><title>Bug in Mailman version 2.1.12</title></head> <body bgcolor=#ffffff><h2>Bug in Mailman version 2.1.12</h2> <p><h3>We're sorry, we hit a bug!</h3>
<p>Please inform the webmaster for this site of this problem. Printing of traceback and other system information has been explicitly inhibited, but the webmaster can find this information in the Mailman error logs.
I ran 'check_perms' and while there were errors it found, they were all fixed. This had no effect on the problem. Mailman appears to be operational otherwise. Emails are sent and received without issues. I can admin the site using the 'listadmin' tools. However, the web interface is completely broken.
What am I missing?
The OP and I had a conversation on the #mailman channel at freenode. We determined that he could successfully run
sudo -u www-data /bin/sh -c "PATH_INFO=;export PATH_INFO;HTTP_HOST=www.example.com;export HTTP_HOST;REQUEST_METHOD=GET;export REQUEST_METHOD; /usr/local/mailman/cgi-bin/listinfo"
(with appropriate changes to host and path) from the command line and the listinfo CGI would produce appropriate output, so the problem is apparently some issue with the way apache is (or isn't) invoking the CGI. The OP says suEXEC is not involved, and I had no other ideas.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On Tue, Jun 23, 2009 at 5:10 AM, Mark Sapiro <mark@msapiro.net> wrote:
The OP and I had a conversation on the #mailman channel at freenode. We determined that he could successfully run
sudo -u www-data /bin/sh -c "PATH_INFO=;export PATH_INFO;HTTP_HOST=www.example.com;export HTTP_HOST;REQUEST_METHOD=GET;export REQUEST_METHOD; /usr/local/mailman/cgi-bin/listinfo"
(with appropriate changes to host and path) from the command line and the listinfo CGI would produce appropriate output, so the problem is apparently some issue with the way apache is (or isn't) invoking the CGI. The OP says suEXEC is not involved, and I had no other ideas.
I spent some time with Apache guys and they said the way the script is being executed doesn't tell us everything and that I should simply run it without setting up environments, etc. When I do, I get the same result (500 internal error).
I tried setting up ScriptLog to see what is going on, but since it's a binary, it doesn't produce any logs out of it. I ran 'ldd' on 'listinfo' and 'admin', etc. to see if I'm missing any libraries, which I am not.
I'm just stuck here.
Derek

Dev Guy wrote:
On Tue, Jun 23, 2009 at 5:10 AM, Mark Sapiro <mark@msapiro.net> wrote:
The OP and I had a conversation on the #mailman channel at freenode. We determined that he could successfully run
sudo -u www-data /bin/sh -c "PATH_INFO=;export PATH_INFO;HTTP_HOST=www.example.com;export HTTP_HOST;REQUEST_METHOD=GET;export REQUEST_METHOD; /usr/local/mailman/cgi-bin/listinfo"
(with appropriate changes to host and path) from the command line and the listinfo CGI would produce appropriate output, so the problem is apparently some issue with the way apache is (or isn't) invoking the CGI. The OP says suEXEC is not involved, and I had no other ideas.
I spent some time with Apache guys and they said the way the script is being executed doesn't tell us everything and that I should simply run it without setting up environments, etc. When I do, I get the same result (500 internal error).
What are you trying to say here? It seems you are saying that if you run
sudo -u www-data /bin/sh -c "/usr/local/mailman/cgi-bin/listinfo"
or equivalent, you get a 500 server error, but that makes no sense as Apache isn't even involved in that.
I tried setting up ScriptLog to see what is going on, but since it's a binary, it doesn't produce any logs out of it. I ran 'ldd' on 'listinfo' and 'admin', etc. to see if I'm missing any libraries, which I am not.
I'm just stuck here.
Put the following script in your mailman/cgi-bin/ directory with name 'printenv' and mode 755 (rwxr-xr-x)
-------------------------cut here------------------- #!/usr/bin/python
import os
def printenv(): for n,v in os.environ.items(): print '%s: %s<br>' % (n,v)
def generateFormDocument(): print 'Content-type: text/html' print print '<HTML><HEAD><TITLE>Print Environment</TITLE></HEAD><BODY>' printenv() print ' </BODY> </HTML>'
if (__name__=='__main__'): generateFormDocument() -------------------------cut here-------------------
and then visit your equivalent of http://www.example.com/mailman/printenv (i.e. the same URL you'd use to visit the admin or listinfo pages but with 'admin' or 'listinfo' replaced with 'printenv'.
It should print the environment variables passed by Apache to the CGI. What does happen?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Dev Guy
-
Mark Sapiro