(2.1.26) Mailman CGI error!!! The Mailman CGI wrapper encountered a fatal error. This entry is being stored in your syslog: Cannot open wrapper configuration file: No such file or directory
Hello to all,
first post to this mailing list, so first of all thank you very much to all who helped to make Mailman and it's community reality!
I'm running mailman now for a while without issues. On my VPS, not a big installation, not many lists, just a few users per list.
After upgrading the VPS to OpenSuse Leap 15.0, Mailman still 2.1.26, Apache from 2.4.23 to 2.4.33, Python from 2.7.13 to 2.7.14, I'm getting the error message in the subject of this mail when trying to access the mailman web pages on Apache.
All other Apache sites (non-Mailman, like TYPO3, Nextcloud, Roundcubemail, ...) / their Vhosts are running fine.
Relevant part of Apache's error_log:
[Tue May 29 11:46:07.135217 2018] [cgi:error] [pid 24758] [client (IPV6)] AH02811: script not found or unable to stat: /usr/lib/mailman/cgi-bin/favicon.ico [Tue May 29 11:46:07.486058 2018] [cgi:error] [pid 24758] [client (IPV6)] AH02811: script not found or unable to stat: /usr/lib/mailman/cgi-bin/error [Tue May 29 11:46:07.267081 2018] [cgi:error] [pid 25456] [client (IPV6)] AH02811: script not found or unable to stat: /usr/lib/mailman/cgi-bin/favicon.ico [Tue May 29 11:46:07.486381 2018] [cgi:error] [pid 25456] [client (IPV6)] AH02811: script not found or unable to stat: /usr/lib/mailman/cgi-bin/error
--> which is true, but "favicon.ico" and "error" also haven't been existing on the fine running Mailman instance before the OpenSuse upgrade, checked in server backups.
I've compared (diff) Apache's config files (before and after the upgrade) file by file, most of them, esp. all direct Mailman files, are untouched by the upgrade, others (general httpd) with smaller changes, which really shouldn't affect Mailman.
Got the hint from #httpd, that the error msg has nothing to to with apache itself. Tested to run e.g. "listinfo" manually, same error:
vserver:/usr/lib/mailman/cgi-bin # ./listinfo Content-type: text/html
<head> <title>Mailman CGI error!!!</title> </head><body> <h1>Mailman CGI error!!!</h1> The Mailman CGI wrapper encountered a fatal error. This entry is being stored in your syslog: <pre> Cannot open wrapper configuration file: No such file or directory</pre>
In contrast the executables in /usr/lib/mailman/bin are working fine, tested with e.g. "version", "check_db", "list_lists", all working as expected
Also Mailman systemd unit seems to run fine:
vserver:~ # systemctl status mailman ● mailman.service - LSB: Starts the mailinglist manager Mailman Loaded: loaded (/etc/init.d/mailman; generated; vendor preset: disabled) Active: active (running) since Mon 2018-05-28 19:39:09 CEST; 16h ago Docs: man:systemd-sysv-generator(8) Tasks: 9 (limit: 629145) CGroup: /system.slice/mailman.service ├─1946 /usr/bin/python /usr/lib/mailman/bin/mailmanctl --quiet --stale-lock-cleanup start ├─1948 /usr/bin/python /usr/lib/mailman/bin/qrunner --runner=ArchRunner:0:1 -s ├─1949 /usr/bin/python /usr/lib/mailman/bin/qrunner --runner=BounceRunner:0:1 -s ├─1950 /usr/bin/python /usr/lib/mailman/bin/qrunner --runner=CommandRunner:0:1 -s ├─1951 /usr/bin/python /usr/lib/mailman/bin/qrunner --runner=IncomingRunner:0:1 -s
├─1952 /usr/bin/python /usr/lib/mailman/bin/qrunner --runner=NewsRunner:0:1 -s
├─1953 /usr/bin/python /usr/lib/mailman/bin/qrunner --runner=OutgoingRunner:0:1 -s
├─1954 /usr/bin/python /usr/lib/mailman/bin/qrunner --runner=VirginRunner:0:1 -s
└─1955 /usr/bin/python /usr/lib/mailman/bin/qrunner --runner=RetryRunner:0:1 -s
Mai 28 19:39:08 vserver systemd[1]: Starting LSB: Starts the mailinglist manager Mailman...
Mai 28 19:39:09 vserver mailman[1933]: Starting mailman..done
Mai 28 19:39:09 vserver systemd[1]: Started LSB: Starts the mailinglist manager Mailman.
- Vhost definition, unchanged:
<IfDefine SSL> <IfDefine !NOSSL>
<VirtualHost *:443>
ServerName mailman.domain.tld:443
Include /etc/apache2/conf.d/mailman.conf
DirectoryIndex listinfo
ScriptAlias / /usr/lib/mailman/cgi-bin/
# SSL Engine Switch:
# Enable/Disable SSL for this virtual host.
SSLEngine on
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15552000; preload"
</IfModule>
</VirtualHost>
</IfDefine> </IfDefine>
Stopping now with config files, avoiding getting this mail bigger and bigger :-)
As I'm completely running of of ideas now, I would be very happy about new ideas/hints what might be the problem, where to continue searching for the issue.
Thanks in advance, regards, Michael
On 05/29/2018 03:19 AM, michaelof--- via Mailman-Users wrote:
After upgrading the VPS to OpenSuse Leap 15.0, Mailman still 2.1.26, Apache from 2.4.23 to 2.4.33, Python from 2.7.13 to 2.7.14, I'm getting the error message in the subject of this mail when trying to access the mailman web pages on Apache.
Is there anything in Mailman's error log?
- Got the hint from #httpd, that the error msg has nothing to to with apache itself. Tested to run e.g. "listinfo" manually, same error:
vserver:/usr/lib/mailman/cgi-bin # ./listinfo Content-type: text/html
<head> <title>Mailman CGI error!!!</title> </head><body> <h1>Mailman CGI error!!!</h1> The Mailman CGI wrapper encountered a fatal error. This entry is being stored in your syslog: <pre> Cannot open wrapper configuration file: No such file or directory</pre>
This comes from the various cgi-bin wrappers themselves when they encounter a fatal error.
First of all, when trying to debug by running these from the command line you have to run them as the web server user. I.e.,
sudo -u xxx ./listinfo
where xxx is the user the web server runs as. The issues that cause this are GROUP_NAME_NOT_FOUND, GROUP_MISMATCH or failure to set the effective GID.
If the wrapper was able to write Mailman's error log, the message there should give details. If there's nothing in the error log, you might try temporarily setting o+w in the log file to see if that allows writing the message.
If the upgrade somehow changed the user:group that apaches runs as, that would cause this.
If your Mailman is installed from source, you may need to rerun configure with a different --with-cgi-gid option and make install. If it's a Suse package, this is a Suse issue.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mark,
thank you for answering so detailed!
Am 29.05.2018 um 19:37 schrieb Mark Sapiro:
On 05/29/2018 03:19 AM, michaelof--- via Mailman-Users wrote:
After upgrading the VPS to OpenSuse Leap 15.0, Mailman still 2.1.26, Apache from 2.4.23 to 2.4.33, Python from 2.7.13 to 2.7.14, I'm getting the error message in the subject of this mail when trying to access the mailman web pages on Apache.
Is there anything in Mailman's error log?
My Mailman has been talking to my Postfix, so (forgot where this was defined) uses also Postfix's log files. Postfix errors on OpenSuse go to /var/log/mail.err.
Independent if I call via Browser / Apache or directly, or in the cgi-bin dir with ./listinfo as root, or with "su -u mailman ./listinfo", result in mail.err is always the same added line:
2018-05-29T20:31:14.894893+02:00 vserver Mailman cgi-wrapper (listinfo): Cannot open wrapper configuration file: No such file or directory
Means a) that logging itself is possible but b) log does not add any value for narrowing down the problem, at least not for me :-(
Maybe a silly question: for what (specific) "wrapper configuration file" mailman is searching for??
Any chance to get mailman's log more verbosive, temporarily?
I'm 100% sure for OpenSuse that as well apache (wwwrun/www) as mailman (mailman/mailman) haven't changed their username and unix group for at least the last 3 centuries, in IT timing :-) I'm also sure (checked in backup) that the numeric UIDs and GIDs haven't changed.
- Got the hint from #httpd, that the error msg has nothing to to with apache itself. Tested to run e.g. "listinfo" manually, same error:
vserver:/usr/lib/mailman/cgi-bin # ./listinfo Content-type: text/html
<head> <title>Mailman CGI error!!!</title> </head><body> <h1>Mailman CGI error!!!</h1> The Mailman CGI wrapper encountered a fatal error. This entry is being stored in your syslog: <pre> Cannot open wrapper configuration file: No such file or directory</pre>
This comes from the various cgi-bin wrappers themselves when they encounter a fatal error.
First of all, when trying to debug by running these from the command line you have to run them as the web server user. I.e.,
sudo -u xxx ./listinfo
done, see above
where xxx is the user the web server runs as. The issues that cause this are GROUP_NAME_NOT_FOUND, GROUP_MISMATCH or failure to set the effective GID.
If the wrapper was able to write Mailman's error log, the message there should give details. If there's nothing in the error log, you might try temporarily setting o+w in the log file to see if that allows writing the message.
no (more) details in log except error msg, see above
If the upgrade somehow changed the user:group that apaches runs as, that would cause this.
For sure not changed, see above
If your Mailman is installed from source, you may need to rerun configure with a different --with-cgi-gid option and make install. If it's a Suse package, this is a Suse issue.
no change in gid/uid, could open an OpenSuse Bugzilla issue, but not a real how to start / get the OpenSuse team convinced that this is not an issue on my side/config or a mailman issue
On 05/29/2018 12:16 PM, michaelof--- via Mailman-Users wrote:
Maybe a silly question: for what (specific) "wrapper configuration file" mailman is searching for??
That's a Suse question. Standard GNU Mailman has no such message. Read the Suse Mailman docs to see what they say about this.
Any chance to get mailman's log more verbosive, temporarily?
No. Suse changed the wrapper and the message you got is it.
OK, I googled a bit and found <https://build.opensuse.org/package/view_file/openSUSE:12.2/mailman/mailman-w...>
They patch out all the nice error messages and instead put in their own stuff. The error in the subject means the file /etc/mailman/mailman.cgi-gid doesn't exist. It should exist and if I read the code correctly, contain the numeric GID of the web server.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Hi Mark,
just clicked "send" for a second answer to you last reply ten second ago, overlap with your current reply :-)
I've went a different way, but found the same reason, so thank you very much again!
Michael
Am 29.05.2018 um 23:27 schrieb Mark Sapiro:
On 05/29/2018 12:16 PM, michaelof--- via Mailman-Users wrote:
Maybe a silly question: for what (specific) "wrapper configuration file" mailman is searching for??
That's a Suse question. Standard GNU Mailman has no such message. Read the Suse Mailman docs to see what they say about this.
Any chance to get mailman's log more verbosive, temporarily?
No. Suse changed the wrapper and the message you got is it.
OK, I googled a bit and found <https://build.opensuse.org/package/view_file/openSUSE:12.2/mailman/mailman-w...>
They patch out all the nice error messages and instead put in their own stuff. The error in the subject means the file /etc/mailman/mailman.cgi-gid doesn't exist. It should exist and if I read the code correctly, contain the numeric GID of the web server.
Mark,
pls forget my last email, you've led me already in the right direction:
- tried a sudo -u mailman /usr/lib/mailman/cgi-bin/listinfo and echo $? after that
- showed 8 as error code
- downloaded source for mailman 2.1.26, looked into source for cgi-wrapper.c, specifically into common.h
- 8 means GROUP_NAME_NOT_FOUND, you mentioned this as possible solution below
With this, and my knowlegde (or trust :-)) that mailman's GID configs in OpenSuse are in /etc/mailman, I've doublecked and found one file missing after upgrade, /etc/mailman/mailman.cgi-gid. Containing just an 8 :-S
Restored this from last backup, made immediately before I've started the upgrade of OpenSuse.
Works like a charm, as before :-)
Mark, a) THANK YOU VERY, VERY MUCH !!! b) I'll open an OpenSuse bugzilla issue for this
Regards, Michael
Am 29.05.2018 um 21:16 schrieb michaelof@rocketmail.com:
Mark,
thank you for answering so detailed!
Am 29.05.2018 um 19:37 schrieb Mark Sapiro:
On 05/29/2018 03:19 AM, michaelof--- via Mailman-Users wrote:
After upgrading the VPS to OpenSuse Leap 15.0, Mailman still 2.1.26, Apache from 2.4.23 to 2.4.33, Python from 2.7.13 to 2.7.14, I'm getting the error message in the subject of this mail when trying to access the mailman web pages on Apache.
Is there anything in Mailman's error log?
My Mailman has been talking to my Postfix, so (forgot where this was defined) uses also Postfix's log files. Postfix errors on OpenSuse go to /var/log/mail.err.
Independent if I call via Browser / Apache or directly, or in the cgi-bin dir with ./listinfo as root, or with "su -u mailman ./listinfo", result in mail.err is always the same added line:
2018-05-29T20:31:14.894893+02:00 vserver Mailman cgi-wrapper (listinfo): Cannot open wrapper configuration file: No such file or directory
Means a) that logging itself is possible but b) log does not add any value for narrowing down the problem, at least not for me :-(
Maybe a silly question: for what (specific) "wrapper configuration file" mailman is searching for??
Any chance to get mailman's log more verbosive, temporarily?
I'm 100% sure for OpenSuse that as well apache (wwwrun/www) as mailman (mailman/mailman) haven't changed their username and unix group for at least the last 3 centuries, in IT timing :-) I'm also sure (checked in backup) that the numeric UIDs and GIDs haven't changed.
- Got the hint from #httpd, that the error msg has nothing to to with apache itself. Tested to run e.g. "listinfo" manually, same error:
vserver:/usr/lib/mailman/cgi-bin # ./listinfo Content-type: text/html
<head> <title>Mailman CGI error!!!</title> </head><body> <h1>Mailman CGI error!!!</h1> The Mailman CGI wrapper encountered a fatal error. This entry is being stored in your syslog: <pre> Cannot open wrapper configuration file: No such file or directory</pre>
This comes from the various cgi-bin wrappers themselves when they encounter a fatal error.
First of all, when trying to debug by running these from the command line you have to run them as the web server user. I.e.,
sudo -u xxx ./listinfo
done, see above
where xxx is the user the web server runs as. The issues that cause this are GROUP_NAME_NOT_FOUND, GROUP_MISMATCH or failure to set the effective GID.
If the wrapper was able to write Mailman's error log, the message there should give details. If there's nothing in the error log, you might try temporarily setting o+w in the log file to see if that allows writing the message.
no (more) details in log except error msg, see above
If the upgrade somehow changed the user:group that apaches runs as, that would cause this.
For sure not changed, see above
If your Mailman is installed from source, you may need to rerun configure with a different --with-cgi-gid option and make install. If it's a Suse package, this is a Suse issue.
no change in gid/uid, could open an OpenSuse Bugzilla issue, but not a real how to start / get the OpenSuse team convinced that this is not an issue on my side/config or a mailman issue
participants (2)
-
Mark Sapiro -
michaelof@rocketmail.com