ShinyCMS is an open source CMS. This is the Perl version, built with Catalyst and DBIC. (There is also a Ruby on Rails version: www.github.com/denny/ShinyCMS-ruby)
56
stars
24
forks
source link
CRITICAL: ShinyCMS In mod_perl, Silent Failure #68
I'm trying to enable ShinyCMS to run under mod_perl, obviously it is supposed to work but it fails without any errors, and I've been trying for several days to get it working.
My system info:
Perl 5, version 22, subversion 1 (v5.22.1) built for x86_64-linux-gnu-thread-multi
libapache2-mod-perl2 v2.0.9-4ubuntu1
Apache/2.4.18 (Ubuntu)
$Apache::Test::VERSION = 1.39
$Catalyst::VERSION = 5.90112
$ShinyCMS::VERSION = 0.007
I know the app already functions properly when running via the stand-alone test server script (PSGI) or fastcgi, and I am able to run a trivial Catalyst test application successfully under mod_perl, so this issue seems to have something to do with the interaction between the ShinyCMS app and mod_perl.
I have added print debug statements in my app, so when I call my app from within the Apache site conf file then I can see the debug statements prove that it is successfully going all the way through my app, and it even returns control to the embedded code w/in the Apache site conf file, but it still just silently fails anyway with the following non-descriptive error:
"The apache2 instance did not start within 20 seconds. Please read the log files to discover problems"
Unfortunately the log files do not provide any additional information whatsoever!
Here are my Apache config files and the output of trying to start Apache manually, you can see my "<<< DEBUG >>>" statements which prove that my ShinyCMS app code is definitely executing all the way through and returning control to Apache:
This is a really mysterious issue, when I run apache2ctl -e debug -k start as seen in the link above, it goes through the motions as if it is starting correctly, and it does not give any error messages, but when apache2ctl is done there simply are not any apache processes running...
I only found 1 person on google with a possibly-similar issue, but he told me that he never found a solution:
I also found 1 person on the mod_perl mailing list archives with another possibly-similar issue, but I have no way to follow up, and I'm not sure of the best way to totally rebuild everything from source:
I have asked for help on IRC #httpd (and also #catalyst and #modperl and #shinycms), user Unbeliever suggested I ascertain my real /usr/sbin/apache2 command line and run it through strace, then post to this mailing list.
I used -x in apache2ctl which showed me I was simply sourcing /tmp/apache2/envvars and then running /usr/sbin/apache2 -e trace8 -k start which are the exact same args as accepted by the apache2ctl script.
I have now run strace /usr/sbin/apache2 -e trace8 -k start which generates 2.5MB of text output, I have pasted the last few pages of it on hastebin, I can post the whole thing for download if needed:
@denny
I'm trying to enable ShinyCMS to run under mod_perl, obviously it is supposed to work but it fails without any errors, and I've been trying for several days to get it working.
My system info:
Perl 5, version 22, subversion 1 (v5.22.1) built for x86_64-linux-gnu-thread-multi
libapache2-mod-perl2 v2.0.9-4ubuntu1
Apache/2.4.18 (Ubuntu)
$Apache::Test::VERSION = 1.39
$Catalyst::VERSION = 5.90112
$ShinyCMS::VERSION = 0.007
I know the app already functions properly when running via the stand-alone test server script (PSGI) or fastcgi, and I am able to run a trivial Catalyst test application successfully under mod_perl, so this issue seems to have something to do with the interaction between the ShinyCMS app and mod_perl.
I have added print debug statements in my app, so when I call my app from within the Apache site conf file then I can see the debug statements prove that it is successfully going all the way through my app, and it even returns control to the embedded code w/in the Apache site conf file, but it still just silently fails anyway with the following non-descriptive error:
"The apache2 instance did not start within 20 seconds. Please read the log files to discover problems"
Unfortunately the log files do not provide any additional information whatsoever!
Here are my Apache config files and the output of trying to start Apache manually, you can see my "<<< DEBUG >>>" statements which prove that my ShinyCMS app code is definitely executing all the way through and returning control to Apache:
http://hastebin.com/rulixitole.php
http://hastebin.com/wevicagano.rb
This is a really mysterious issue, when I run
apache2ctl -e debug -k start
as seen in the link above, it goes through the motions as if it is starting correctly, and it does not give any error messages, but when apache2ctl is done there simply are not any apache processes running...I only found 1 person on google with a possibly-similar issue, but he told me that he never found a solution:
https://github.com/timbunce/devel-nytprof/issues/89
I also found 1 person on the mod_perl mailing list archives with another possibly-similar issue, but I have no way to follow up, and I'm not sure of the best way to totally rebuild everything from source:
https://mail-archives.apache.org/mod_mbox/perl-modperl/200207.mbox/%3C4A19F19A1BB4D51183220020ED069714012882B0@exch2.iso-ne.com%3E
I have asked for help on IRC #httpd (and also #catalyst and #modperl and #shinycms), user Unbeliever suggested I ascertain my real /usr/sbin/apache2 command line and run it through strace, then post to this mailing list.
I used -x in apache2ctl which showed me I was simply sourcing /tmp/apache2/envvars and then running
/usr/sbin/apache2 -e trace8 -k start
which are the exact same args as accepted by the apache2ctl script.I have now run
strace /usr/sbin/apache2 -e trace8 -k start
which generates 2.5MB of text output, I have pasted the last few pages of it on hastebin, I can post the whole thing for download if needed:http://hastebin.com/idemogexiq.erl
I am not sure how to interpret the results of the strace command output and debug this issue, help please?
Any and all assistance is greatly appreciated! :-)
Thanks, ~ Will