500 errors on OTRS installation with ISPConfig I'm also getting intermittent 500 errors with a fresh OTRS 2.1.5 installation running under ISPConfig. The OTRS install is also very, very slow: from 5 to 20 seconds between each click. The weird thing is that the same script will work sometimes (and display the correct OTRS screens) and other times will generate this error. In /var/log/apache2/error.log Code: [Thu Mar 01 15:23:28 2007] [warn-phpa] No shm_user is set and so no shm cache will be created (pid 1976) [Thu Mar 01 15:23:28 2007] [warn-phpa] unable to get shm cache (pid 1976) [Thu Mar 01 15:29:31 2007] [notice] caught SIGTERM, shutting down [Thu Mar 01 15:23:28 2007] [warn-phpa] No shm_user is set and so no shm cache will be created (pid 1976) [Thu Mar 01 15:23:28 2007] [warn-phpa] unable to get shm cache (pid 1976) [Thu Mar 01 15:29:38 2007] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec2) [Thu Mar 01 15:29:43 2007] [notice] Apache/2.0.54 (Debian GNU/Linux) PHP/4.3.10-18 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_perl/1.999.21 Perl/v5.8.4 configured -- resuming normal operations [Thu Mar 01 15:30:34 2007] [error] server reached MaxClients setting, consider raising the MaxClients setting [Thu Mar 01 15:42:18 2007] [error] [client 158.x.y.z] Premature end of script headers: index.pl [Thu Mar 01 15:42:48 2007] [error] [client 158.x.y.z] File does not exist: /var/www/sharedip/favicon.ico [Thu Mar 01 15:46:25 2007] [error] [client 158.x.y.z] Premature end of script headers: index.pl [Thu Mar 01 15:46:55 2007] [error] [client 158.x.y.z] File does not exist: /var/www/sharedip/favicon.ico These are the instructions I followed to install OTRS: http://doc.otrs.org/2.1/en/html/x325.html /opt/otrs/Kernel/Config.pm Code: package Kernel::Config; sub Load { my $Self = shift; # ---------------------------------------------------- # # ---------------------------------------------------- # # # # Start of your own config options!!! # # # # ---------------------------------------------------- # # ---------------------------------------------------- # # ---------------------------------------------------- # # database settings # # ---------------------------------------------------- # # DatabaseHost # (The database host.) $Self->{'DatabaseHost'} = 'localhost'; # Database # (The database name.) $Self->{'Database'} = 'otrs'; # DatabaseUser # (The database user.) $Self->{'DatabaseUser'} = 'otrs'; # DatabasePw # (The password of database user. You also can use bin/CryptPassword.pl # for crypted passwords.) $Self->{'DatabasePw'} = '*'; # DatabaseDSN # (The database DSN for MySQL ==> more: "man DBD::mysql") $Self->{DatabaseDSN} = "DBI:mysql:database=$Self->{Database};host=$Self->{DatabaseHost};"; # (The database DSN for PostgreSQL ==> more: "man DBD::Pg") # if you want to use a local socket connection # $Self->{DatabaseDSN} = "DBI:Pg:dbname=$Self->{Database};"; # if you want to use a tcpip connection # $Self->{DatabaseDSN} = "DBI:Pg:dbname=$Self->{Database};host=$Self->{DatabaseHost};"; # ---------------------------------------------------- # # fs root directory # ---------------------------------------------------- # $Self->{Home} = '/opt/otrs'; # ---------------------------------------------------- # # insert your own config settings "here" # # config settings taken from Kernel/Config/Defaults.pm # # ---------------------------------------------------- # # $Self->{SessionUseCookie} = 0; # $Self->{'CheckMXRecord'} = 1; # ---------------------------------------------------- # # ---------------------------------------------------- # # data inserted by installer # # ---------------------------------------------------- # # $DIBI$ $Self->{'SystemID'} = 10; $Self->{'SecureMode'} = 1; $Self->{'Organization'} = '*.net'; $Self->{'LogModule::LogFile'} = '/tmp/otrs.log'; $Self->{'LogModule'} = 'Kernel::System::Log::SysLog'; $Self->{'FQDN'} = '*.dedibox.fr'; $Self->{'DefaultLanguage'} = 'fr'; $Self->{'DefaultCharset'} = 'utf-8'; $Self->{'AdminEmail'} = '*@free.fr'; # ---------------------------------------------------- # # ---------------------------------------------------- # # # # End of your own config options!!! # # # # ---------------------------------------------------- # # ---------------------------------------------------- # } # ---------------------------------------------------- # # needed system stuff (don't edit this) # # ---------------------------------------------------- # use strict; use vars qw(@ISA $VERSION); use Kernel::Config::Defaults; push (@ISA, 'Kernel::Config::Defaults'); $VERSION = '$Revision: 1.18 $'; $VERSION =~ s/^\$.*:\W(.*)\W.+?$/$1/; # -----------------------------------------------------# 1; excerpt from /etc/apache2/apache2.conf Code: # # Basic apache configuration file for OTRS # # agent, admin and customer frontend # ScriptAlias /otrs/ "/opt/otrs/bin/cgi-bin/" Alias /otrs-web/ "/opt/otrs/var/httpd/htdocs/" # # Directory settings # <Directory "/opt/otrs/bin/cgi-bin/"> AllowOverride None Options +ExecCGI -Includes Order allow,deny Allow from all </Directory> <Directory "/opt/otrs/var/httpd/htdocs/"> AllowOverride None Order allow,deny Allow from all </Directory>
Have you modified the startup scripts and other stuff according to their website: http://doc.otrs.org/2.1/en/html/x1782.html? I've seen these type of errors when a perl app was not developed with mod_perl in mind. Example: awstats fails to run properly in mod_perl2. Sometimes it works, sometimes it fails. Reason: a regex optimalisation screwed variable memory. Moving the regexp outsite a loop solved the problem.
Thanks for the tips. I looked through the list, but these are performance-related fixes. That will be an issue once I've fixed the 500 errors, which are a show-stopper at this point.
You can disable suExec, as you're not in your docroot because of the aliases. What's in the webserver log file of the site: /var/www/web<nn>/log/error.log ? Adjust the path to where you configured the sites of ISPConfig.
How do you disable suExec? And what difference would it make? OTRS is not installed under one of the ISPConfig sites/ It resides in /opt/otrs, with an Alias pointing to /opt/otrs/bin/cgi-bin/ The error.log is posted in my first message.
In some cases, I'm seeing the ISPConfig blue-and-white 500 error screen. In other instances, I'm seeing This is all intermittent, and I have no clue as to why in some cases the OTRS screen loads (albeit very slowly!) and in other cases I get the 500 error.
Indicates a problem with the script. Like I said before, it looks like otrs is not capable of running in this specific mod_perl installation. Mayby try to grab the 1st page with 'wget' and not with a browser may give you some hint where to start looking. It's very unlikely this is ISPConfig related. I have a Perl CMS running with mod_perl and ISPConfig without any problems.
All of the other posts in this thread refer to problems with VHosts. What makes you think that my own 500 errors are unrelated to how ISPConfig handles these? How come OTRS works *most* of the time, but then suddenly I will get a 500 error? Why do I sometimes get a generic 500 error and at other times I get a ISPConfig 500.html error? If it's not related to ISPConfig, what can cause these errors?
I wonder if this error: [Thu Mar 01 15:30:34 2007] [error] server reached MaxClients setting, consider raising the MaxClients setting is somehow related to your problem. Do you have a high load average on your server?
I have had problems with high load averages. I've removed ORTS configuration from apache2.conf and put the following into /etc/apache2/conf.d/apache2-httpd-new.include.conf Code: # -- # added for OTRS ([url]http://otrs.org/[/url]) # -- #already loaded #LoadModule cgi_module /usr/lib/apache2/modules/mod_cgi.so # agent, admin and customer frontend ScriptAlias /otrs/ "/opt/otrs/bin/cgi-bin/" Alias /otrs-web/ "/opt/otrs/var/httpd/htdocs/" # load all otrs modules Perlrequire /opt/otrs/scripts/apache2-perl-startup.pl # Apache::Reload - Reload Perl Modules when Changed on Disk #PerlModule Apache2::Reload #PerlInitHandler Apache2::Reload #PerlModule Apache2::RequestRec # Suggestion from [email][email protected][/email] based on CentOS 4 config #PerlModule Apache::Reload #PerlInitHandler Apache::Reload # set mod_perl2 options <Location /otrs> # ErrorDocument 403 /otrs/customer.pl # ErrorDocument 403 /otrs/index.pl SetHandler perl-script PerlResponseHandler ModPerl::Registry Options +ExecCGI PerlOptions +ParseHeaders PerlOptions +SetupEnv Order allow,deny Allow from all </Location> # directory settings <Directory "/opt/otrs/bin/cgi-bin/"> AllowOverride None Options +ExecCGI -Includes Order allow,deny Allow from all DirectoryIndex index.pl </Directory> <Directory "/opt/otrs/var/httpd/htdocs/"> AllowOverride None Order allow,deny Allow from all DirectoryIndex index.pl </Directory> # MaxRequestsPerChild (so no apache child will be to big!) MaxRequestsPerChild 400 I commented out the PerlModule lines because Apache would not load with them. With this configuration, I no longer get 500 errors. Instead, I get the wrong screens, ie when I click on Preferences, the current screen simply reloads, even though the URL does change to http://88.191.14.190/otrs/index.pl?Action=AgentPreferences If I reload several times, then the Preferences screen eventually loads. The other strange behavior is that even though I have DirectoryIndex index.pl, I can't access the main login screen without typing out index.pl at the end of the URL. What's going on?
Although I think you should lower your voice given the fact that that we're helping you based on the Open Source charter and mindset (be friendly and considerate to your fellows), I'll give you my Perl configuration which works fine. 500 error are almost always due to configuration errors or typo's. Take a deep breath and give yourself a bit of time to get this fixed. In /etc/apache2/conf.d I have created a perl.conf file which contains: Code: <Files ~ "\.(pl)$"> SetHandler perl-script PerlHandler ModPerl::Registry PerlOptions +ParseHeaders </Files> PerlRequire /usr/local/WebGUI/sbin/preload.perl I have no no other setHandlers, PerlResponse or whatever directives. I suggest you try to take them out and start with a minimum configuration.
martin, Sorry I did not mean to be rude. I very much appreciate your help, of course! I tried your perl.conf file. However, I do not have the following: /usr/local/WebGUI/sbin/preload.perl so I commented this line out and replaced it with: Perlrequire /opt/otrs/scripts/apache2-perl-startup.pl Now Firefox 2.0 gives me the following message, whereas Safari simply reloads the current page: In /var/log/apache2/error.log Code: [Fri Mar 02 15:25:47 2007] [warn-phpa] No shm_user is set and so no shm cache will be created (pid 1976) [Fri Mar 02 15:25:47 2007] [warn-phpa] unable to get shm cache (pid 1976) [Fri Mar 02 15:25:47 2007] [warn-phpa] No shm_user is set and so no shm cache will be created (pid 1976) [Fri Mar 02 15:25:47 2007] [warn-phpa] unable to get shm cache (pid 1976) [Fri Mar 02 15:25:52 2007] [notice] caught SIGTERM, shutting down [Fri Mar 02 15:25:47 2007] [warn-phpa] No shm_user is set and so no shm cache will be created (pid 1976) [Fri Mar 02 15:25:47 2007] [warn-phpa] unable to get shm cache (pid 1976) [Fri Mar 02 15:25:54 2007] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec2) [Fri Mar 02 15:25:58 2007] [notice] Apache/2.0.54 (Debian GNU/Linux) PHP/4.3.10-18 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_perl/1.999.21 Perl/v5.8.4 configured -- resuming normal operations [Fri Mar 02 15:26:37 2007] [error] [client 158.x.y.z] File does not exist: /var/www/sharedip/favicon.ico [Fri Mar 02 15:25:58 2007] [warn-phpa] No shm_user is set and so no shm cache will be created (pid 2053) [Fri Mar 02 15:25:58 2007] [warn-phpa] unable to get shm cache (pid 2053) [Fri Mar 02 15:26:49 2007] [error] [client 158.x.y.z] File does not exist: /var/www/sharedip/favicon.ico [Fri Mar 02 15:26:53 2007] [error] [client 158.x.y.z] File does not exist: /var/www/sharedip/favicon.ico [Fri Mar 02 15:26:53 2007] [error] [client 158.x.y.z] File does not exist: /var/www/sharedip/favicon.ico
This means a rewrite rule or alias mapping or whatever is not correct somewhere. Firefox is quite good at detecting this. Because of this, it just stops processing. You can add in the apache2.conf file the following to get more ideas what might be wrong: Code: RewriteLog /var/log/apache2/rewrite.log RewriteLogLevel 5 Hopefully that will give an indication what might be causing this. Correct. I left this to show how I do it for a CMS. This is not good. Apache depends a lot on shared memory. Do you have any directive in your apache2.conf that refer to shared memory? Can you post those, if any? Not a big deal. Just the small icon in your address line. Either add a .ico file in the directory or remove the <link rel=....> statement in the html/php/pl sources. But why is it refering to the sharedip address? Thought you did a ScriptAlias? Let's see what the rewrite.log file has to say.
RewriteLog There is plenty in RewriteLog (for my CMS which makes extensive use of RewriteRule) but *nothing* coming otrs except this: Code: [Fri Mar 02 16:31:19 2007] [error] [client] attempt to invoke directory as script: /opt/otrs/bin/cgi-bin/
Have you set the directory index? Looks like it, but maybe during testing it got removed? Code: <Directory "/opt/otrs/bin/cgi-bin/"> AllowOverride None Options +ExecCGI -Includes Order allow,deny Allow from all DirectoryIndex index.pl </Directory> And if the CMS rewrite rules appear when you only try to execute otrs, these rules could interfere. Are you sure no rewriting is done? Could you (temporary) comment the CMS rewrite rules and test only otrs?
Martin, you were right: that error was a glitch from messing with the configuration. In fact, after having disabled my CMS RewriteRules, it appears that OTRS must not use them, because nothing ends up in rewrite.log! So where are those redirects coming from?
I guess you accessed the site and the rewrite rules were triggered. .htaccess files are processed throughout the directory tree, so if you have a .htaccess in a level up where you installed otrs, they still get processed. If you disable the rewrite rules, is otrs working?
There are no rewrite rules anywhere above the otrs directory, which in fact sits in /opt/otrs but is aliased with Alias and ScriptAlias. So there is nothing to disable, and otrs works (albeit for the infinite redirect loops which are *not* due to a rewrite rule but to something else...?). Code: ScriptAlias /otrs/ "/opt/otrs/bin/cgi-bin/" Alias /otrs-web/ "/opt/otrs/var/httpd/htdocs/" So at this point I'm no longer getting 500 errors, but still getting infinite redirects (according to Firefox) and in some instances the wrong screen loads, as if OTRS could not decipher what's after index.pl, ie if I click on a link to index.pl?Action=AgentTicketQueue&QueueID=9 OTRS will reload the current screen or, in Firefox, end in an infinite loop. This behavior appears to be random: a few minutes later, the screen will reload! I've tested with different browsers on different machines, so I'm fairly confident that it is a server-side problem.
There is no .htaccess file in the host used for OTRS, which is running under sd-1494.dedibox.fr. /etc/apache2/vhosts/Vhosts_ispconfig.conf Code: ################################### # # ISPConfig vHost Configuration File # Version 1.0 # ################################### # NameVirtualHost 88.191.14.190:80 <VirtualHost 88.191.14.190:80> ServerName localhost ServerAdmin root@localhost DocumentRoot /var/www/sharedip </VirtualHost> # # ###################################### # Vhost: www.vihinfo.net:80 ###################################### # # <VirtualHost 88.191.14.190:80> ServerName www.vihinfo.net:80 ServerAdmin [email protected] DocumentRoot /home/www/web6/web ServerAlias www.papamamanbebe.net papamamanbebe.net lemegalodon.net www.lemegalodon.net vihinfo.net survivreausida.net www.survivreausida.net DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm ScriptAlias /cgi-bin/ /home/www/web6/cgi-bin/ AddHandler cgi-script .cgi AddHandler cgi-script .pl ErrorLog /home/www/web6/log/error.log AddType application/x-httpd-php .php .php3 .php4 .php5 php_admin_flag safe_mode Off AddType text/html .shtml AddOutputFilter INCLUDES .shtml AddType application/vnd.wap.wmlscriptc .wmlsc .wsc AddType text/vnd.wap.wml .wml AddType text/vnd.wap.wmlscript .ws .wmlscript AddType image/vnd.wap.wbmp .wbmp Alias /error/ "/home/www/web6/web/error/" ErrorDocument 400 /error/invalidSyntax.html ErrorDocument 401 /error/authorizationRequired.html ErrorDocument 403 /error/forbidden.html ErrorDocument 404 /error/fileNotFound.html ErrorDocument 405 /error/methodNotAllowed.html ErrorDocument 500 /error/internalServerError.html ErrorDocument 503 /error/overloaded.html AliasMatch ^/~([^/]+)(/(.*))? /home/www/web6/user/$1/web/$3 AliasMatch ^/users/([^/]+)(/(.*))? /home/www/web6/user/$1/web/$3 </VirtualHost> # # # ###################################### # Vhost: sd-1494.dedibox.fr:80 ###################################### # # <VirtualHost 88.191.14.190:80> ServerName sd-1494.dedibox.fr:80 ServerAdmin [email protected] DocumentRoot /home/www/web8/web DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm ScriptAlias /cgi-bin/ /home/www/web8/cgi-bin/ AddHandler cgi-script .cgi AddHandler cgi-script .pl ErrorLog /home/www/web8/log/error.log AddType application/x-httpd-php .php .php3 .php4 .php5 php_admin_flag safe_mode Off AddType text/html .shtml AddOutputFilter INCLUDES .shtml AddType application/vnd.wap.wmlscriptc .wmlsc .wsc AddType text/vnd.wap.wml .wml AddType text/vnd.wap.wmlscript .ws .wmlscript AddType image/vnd.wap.wbmp .wbmp Alias /error/ "/home/www/web8/web/error/" ErrorDocument 400 /error/invalidSyntax.html ErrorDocument 401 /error/authorizationRequired.html ErrorDocument 403 /error/forbidden.html ErrorDocument 404 /error/fileNotFound.html ErrorDocument 405 /error/methodNotAllowed.html ErrorDocument 500 /error/internalServerError.html ErrorDocument 503 /error/overloaded.html AliasMatch ^/~([^/]+)(/(.*))? /home/www/web8/user/$1/web/$3 AliasMatch ^/users/([^/]+)(/(.*))? /home/www/web8/user/$1/web/$3 </VirtualHost> # # #