Upgrade 3.3.8 to 4.0 beta - Apache error Mod_perl

Moderator: crythias

Locked
amdkryn
Znuny expert
Posts: 187
Joined: 02 Oct 2012, 02:52
Znuny Version: 5.0.27

Upgrade 3.3.8 to 4.0 beta - Apache error Mod_perl

Post by amdkryn »

I updated otrs from 3.3.8 to version 4.0 and after update apache does not start.

Apache starts only when I change the file /etc/apache2/conf.d/mod_perl.conf
changing the mod_perl.c to mod_perl.so, but error occurs when accessing the page otrs:
Premature end of script headers: index.pl

The apache log shows the error:
Can not load perl-perl-file /opt/otrs/scripts/apache2 startup.pl

Error message in systemctl (Opensuse):
apache2.service - apache
Loaded: loaded (/lib/systemd/system/apache2.service; enabled)
Active: failed (Result: exit-code) since Thu, 18 Sep 2014 12:42:57 -0300; 42s ago
Process: 3462 ExecStop=/usr/sbin/httpd2 -D SYSTEMD -k stop (code=exited, status=0/SUCCESS)
Process: 4945 ExecStart=/usr/sbin/start_apache2 -D SYSTEMD -k start (code=exited, status=1/FAILURE)
Main PID: 3309 (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/apache2.service

Sep 18 12:42:56 otrssv2 start_apache2 [4945]: httpd2-prefork: Could not reliably determine the ame ...

Anyone have any suggestions to solve the problem of Apache? Everything was working with the previous version of OTRS ....
OTRS version 5.0.27 (With ITSM), Operating System OpenSuse 12 with Mysql.
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Upgrade 3.3.8 to 4.0 beta - Apache error Mod_perl

Post by reneeb »

The conf-change is necessary when mod_perl is loaded dynamically.

Did you check that the startup script is there? Did you run the startup script manually?

Code: Select all

cd /opt/otrs
perl -IKernel/cpan-lib scripts/apache2-perl-startup.pl
Is this the old conf? Did you change something? The script is named apache2-perl-startup.pl and the error message you posted uses a different name.
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
amdkryn
Znuny expert
Posts: 187
Joined: 02 Oct 2012, 02:52
Znuny Version: 5.0.27

Re: Upgrade 3.3.8 to 4.0 beta - Apache error Mod_perl

Post by amdkryn »

I was away and am now returning it.

The quoted command generates the following error:

[Wed Oct 1 11:18:45 2014] apache2-perl-startup.pl: Use of uninitialized value $ENV{"MOD_PERL"} in pattern match (m//) at scripts/apache2-perl-startup.pl line 26.
MOD_PERL not used! at scripts/apache2-perl-startup.pl line 26.


The "apache2ctl -t -D DUMP_MODULES" command generates the error:

AH00526: Syntax error on line 68 of /etc/apache2/conf.d/otrs.conf:
Invalid command 'AddOutputFilterByType', perhaps misspelled or defined by a module not included in the server configuration



With ./bin/otrs.CheckModules everything is ok.

With journalctl -xn:

-- Logs begin at Wed 2014-10-01 06:49:45 BRT, end at Wed 2014-10-01 11:33:35 BRT. --
Oct 01 11:33:10 otrssv3 kernel: input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input43
Oct 01 11:33:35 otrssv3 systemd[1]: Starting The Apache Webserver...
-- Subject: Unit apache2.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
--
-- Unit apache2.service has begun starting up.
Oct 01 11:33:35 otrssv3 start_apache2[3789]: AH00526: Syntax error on line 68 of /etc/apache2/conf.d/otrs.conf:
Oct 01 11:33:35 otrssv3 start_apache2[3789]: Invalid command 'AddOutputFilterByType', perhaps misspelled or defined by a module not included in the server configuration
Oct 01 11:33:35 otrssv3 systemd[1]: apache2.service: main process exited, code=exited, status=1/FAILURE
Oct 01 11:33:35 otrssv3 start_apache2[3808]: AH00526: Syntax error on line 68 of /etc/apache2/conf.d/otrs.conf:
Oct 01 11:33:35 otrssv3 start_apache2[3808]: Invalid command 'AddOutputFilterByType', perhaps misspelled or defined by a module not included in the server configuration
Oct 01 11:33:35 otrssv3 systemd[1]: apache2.service: control process exited, code=exited status=1
Oct 01 11:33:35 otrssv3 systemd[1]: Failed to start The Apache Webserver.
-- Subject: Unit apache2.service has failed

-- Unit apache2.service has failed.
--
-- The result is failed.
Oct 01 11:33:35 otrssv3 systemd[1]: Unit apache2.service entered failed state.
OTRS version 5.0.27 (With ITSM), Operating System OpenSuse 12 with Mysql.
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Upgrade 3.3.8 to 4.0 beta - Apache error Mod_perl

Post by jojo »

perhaps your apache version is to old?
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
amdkryn
Znuny expert
Posts: 187
Joined: 02 Oct 2012, 02:52
Znuny Version: 5.0.27

Re: Upgrade 3.3.8 to 4.0 beta - Apache error Mod_perl

Post by amdkryn »

I upgraded to apache2 to version 2.4.10-5.1 and the error continues. Any suggestions?

With a2enmod -l:
authz_host actions alias authz_user authz_groupfile auth_basic authn_file autoindex cgi dir env expires include log_config mime negotiation setenvif userdir deflate headers perl authn_core reqtimeout authz_core
OTRS version 5.0.27 (With ITSM), Operating System OpenSuse 12 with Mysql.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Upgrade 3.3.8 to 4.0 beta - Apache error Mod_perl

Post by crythias »

btw, because apache has changed, you'll need to use the new apache config file for otrs.
https://github.com/OTRS/otrs/tree/rel-4 ... a2/scripts

note that 4.0 is still beta and shouldn't be used in production.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
amdkryn
Znuny expert
Posts: 187
Joined: 02 Oct 2012, 02:52
Znuny Version: 5.0.27

Re: Upgrade 3.3.8 to 4.0 beta - Apache error Mod_perl

Post by amdkryn »

When i run the command /opt/otrs/scripts/apache2-perl-startup.pl:
[Thu Oct 2 07:56:24 2014] apache2-perl-startup.pl: Use of uninitialized value $ENV{"MOD_PERL"} in pattern match (m//) at /opt/otrs/scripts/apache2-perl-startup.pl line 26.
MOD_PERL not used! at /opt/otrs/scripts/apache2-perl-startup.pl line 26.



I downloaded the file apache2-httpd.include.conf of that link and copied to /etc/apache/conf.d/otrs.conf and error still occurs:

-- Logs begin at Wed 2014-10-01 06:49:45 BRT, end at Thu 2014-10-02 07:11:09 BRT. --
Oct 02 07:10:28 otrssv3 systemd[1]: apache2.service: control process exited, code=exited status=1
Oct 02 07:10:28 otrssv3 systemd[1]: Failed to start The Apache Webserver.
-- Subject: Unit apache2.service has failed
-- Defined-By: systemd
--
-- Unit apache2.service has failed.
--
-- The result is failed.
Oct 02 07:10:28 otrssv3 systemd[1]: Unit apache2.service entered failed state.
Oct 02 07:11:08 otrssv3 systemd[1]: Starting The Apache Webserver...
-- Subject: Unit apache2.service has begun with start-up
-- Defined-By: systemd
--
-- Unit apache2.service has begun starting up.
Oct 02 07:11:08 otrssv3 start_apache2[5279]: httpd2-prefork: Syntax error on line 177 of /etc/apache2/httpd.conf: Syntax error on line 99 of /etc/apache2/default-server.conf: Syntax error on line 61 of /etc/apache2/conf.d/otrs.conf: Expected </link> but saw </head>
Oct 02 07:11:09 otrssv3 systemd[1]: apache2.service: main process exited, code=exited, status=1/FAILURE
Oct 02 07:11:09 otrssv3 start_apache2[5298]: httpd2-prefork: Syntax error on line 177 of /etc/apache2/httpd.conf: Syntax error on line 99 of /etc/apache2/default-server.conf: Syntax error on line 61 of /etc/apache2/conf.d/otrs.conf: Expected </link> but saw </head>
Oct 02 07:11:09 otrssv3 systemd[1]: apache2.service: control process exited, code=exited status=1
Oct 02 07:11:09 otrssv3 systemd[1]: Failed to start The Apache Webserver.
-- Subject: Unit apache2.service has failed
-- Defined-By: systemd
-
-- Unit apache2.service has failed.
--
-- The result is failed.
Oct 02 07:11:09 otrssv3 systemd[1]: Unit apache2.service entered failed state.
Last edited by amdkryn on 02 Oct 2014, 13:27, edited 1 time in total.
OTRS version 5.0.27 (With ITSM), Operating System OpenSuse 12 with Mysql.
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Upgrade 3.3.8 to 4.0 beta - Apache error Mod_perl

Post by reneeb »

Did you just save the file or did you download the "raw" version? You have to download https://raw.githubusercontent.com/OTRS/ ... clude.conf
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Upgrade 3.3.8 to 4.0 beta - Apache error Mod_perl

Post by crythias »

and besides which ... you have this file in your own otrs tarball extract. It's in the same relative path in your personal otrs directory.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
amdkryn
Znuny expert
Posts: 187
Joined: 02 Oct 2012, 02:52
Znuny Version: 5.0.27

Re: Upgrade 3.3.8 to 4.0 beta - Apache error Mod_perl

Post by amdkryn »

I downloaded the file apache2-httpd.include.conf of that link and copied to /opt/otrs/scripts/ and /etc/apache/conf.d/otrs.conf and the same error occurs.

Invalid command 'AddOutputFilterByType', perhaps misspelled or defined by a module not included in the server configuration

With apachectl -l -D DUMP_MODULES:
Compiled in modules:
core.c
mod_access_compat.c
mod_so.c
http_core.c
prefork.c
mod_unixd.c
mod_systemd.c

In the production environment, version 3.3.8, just know that mod_perl is active when I view the result of the Support Assessment Screen (mod_perl / 2.0.6), although the results of the commands is the same ...
OTRS version 5.0.27 (With ITSM), Operating System OpenSuse 12 with Mysql.
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Upgrade 3.3.8 to 4.0 beta - Apache error Mod_perl

Post by reneeb »

Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Locked