apache2 does not start after in place upgrade from SLES 11 SP4 to SLES 12 SP3
This document (7023524) is provided subject to the disclaimer at the end of this document.
Environment
SUSE Linux Enterprise Server 12 Service Pack 2 (SLES 12 SP2)
SUSE Linux Enterprise Server 12 Service Pack 1 (SLES 12 SP1)
Situation
Resolution
? apache2.service - The Apache Webserver
Loaded: loaded (/usr/lib/systemd/system/apache2.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2018-11-15 13:02:16 CET; 22s ago
Process: 3990 ExecStop=/usr/sbin/start_apache2 -DSYSTEMD -DFOREGROUND -k graceful-stop (code=exited, status=1/FAILURE)
Process: 3981 ExecStart=/usr/sbin/start_apache2 -DSYSTEMD -DFOREGROUND -k start (code=exited, status=1/FAILURE)
Main PID: 3981 (code=exited, status=1/FAILURE)
Nov 15 13:02:16 webserver systemd[1]: Starting The Apache Webserver...
Nov 15 13:02:16 webserver start_apache2[3981]: httpd-prefork: Syntax error on line 204 of /etc/apache2/httpd.conf: Syntax error on line 106 of /etc/apache2/default-server.c...f required)
Nov 15 13:02:16 webserver systemd[1]: apache2.service: Main process exited, code=exited, status=1/FAILURE
Nov 15 13:02:16 webserver start_apache2[3990]: httpd-prefork: Syntax error on line 204 of /etc/apache2/httpd.conf: Syntax error on line 106 of /etc/apache2/default-server.c...f required)
Nov 15 13:02:16 webserver systemd[1]: apache2.service: Control process exited, code=exited status=1
Nov 15 13:02:16 webserver systemd[1]: Failed to start The Apache Webserver.
Nov 15 13:02:16 webserver systemd[1]: apache2.service: Unit entered failed state.
Nov 15 13:02:16 webserver systemd[1]: apache2.service: Failed with result 'exit-code'.
Hint: Some lines were ellipsized, use -l to show in full.
Which can be solved by editing /etc/apache2/default-server.conf and change the line saying:
Include /etc/apache2/conf.d/apache2-manual?conf to IncludeOptional /etc/apache2/conf.d/apache2-manual?conf
See /etc/apache2/default-server.conf.rpmnew to compare with.
Second Issue:
When starting apache2 after the above change, the following issue may be seen:
webserver:/etc/apache2 # systemctl status apache2.service
? apache2.service - The Apache Webserver
Loaded: loaded (/usr/lib/systemd/system/apache2.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2018-11-15 13:03:50 CET; 2s ago
Process: 4017 ExecStop=/usr/sbin/start_apache2 -DSYSTEMD -DFOREGROUND -k graceful-stop (code=exited, status=1/FAILURE)
Process: 4007 ExecStart=/usr/sbin/start_apache2 -DSYSTEMD -DFOREGROUND -k start (code=exited, status=1/FAILURE)
Main PID: 4007 (code=exited, status=1/FAILURE)
Nov 15 13:03:50 webserver systemd[1]: Starting The Apache Webserver...
Nov 15 13:03:50 webserver start_apache2[4007]: AH00526: Syntax error on line 28 of /etc/apache2/default-server.conf:
Nov 15 13:03:50 webserver start_apache2[4007]: Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration
Nov 15 13:03:50 webserver systemd[1]: apache2.service: Main process exited, code=exited, status=1/FAILURE
Nov 15 13:03:50 webserver start_apache2[4017]: AH00526: Syntax error on line 28 of /etc/apache2/default-server.conf:
Nov 15 13:03:50 webserver start_apache2[4017]: Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration
Nov 15 13:03:50 webserver systemd[1]: apache2.service: Control process exited, code=exited status=1
Nov 15 13:03:50 webserver systemd[1]: Failed to start The Apache Webserver.
Nov 15 13:03:50 webserver systemd[1]: apache2.service: Unit entered failed state.
Nov 15 13:03:50 webserver systemd[1]: apache2.service: Failed with result 'exit-code'.
The Second issue is described in https://www.suse.com/releasenotes/x86_64/SUSE-SLES/12/ saying:
8.3.4 Apache 2.4
For more information on how to easily switch between the two schemes, see the file /usr/share/doc/packages/apache2/README-access_compat.txt.
From /usr/share/doc/packages/apache2/README-access_compat.txt it says that running "a2enmod access_compat" is the solution.
After running a2enmod access_compat apache does start.
webserver:/etc/apache2 # systemctl status apache2.service
? apache2.service - The Apache Webserver
Loaded: loaded (/usr/lib/systemd/system/apache2.service; disabled; vendor preset: disabled)
Active: active (running) since Thu 2018-11-15 13:04:21 CET; 1s ago
Process: 4017 ExecStop=/usr/sbin/start_apache2 -DSYSTEMD -DFOREGROUND -k graceful-stop (code=exited, status=1/FAILURE)
Main PID: 4041 (httpd-prefork)
Status: "Processing requests..."
Tasks: 6
CGroup: /system.slice/apache2.service
+-4041 /usr/sbin/httpd-prefork -DSYSCONFIG -C PidFile /var/run/httpd.pid -C Include /etc/apache2/sysconfig.d//loadmodule.conf -C Include /etc/apache2/sysconfig.d//global.conf -...
+-4050 /usr/sbin/httpd-prefork -DSYSCONFIG -C PidFile /var/run/httpd.pid -C Include /etc/apache2/sysconfig.d//loadmodule.conf -C Include /etc/apache2/sysconfig.d//global.conf -...
+-4051 /usr/sbin/httpd-prefork -DSYSCONFIG -C PidFile /var/run/httpd.pid -C Include /etc/apache2/sysconfig.d//loadmodule.conf -C Include /etc/apache2/sysconfig.d//global.conf -...
+-4052 /usr/sbin/httpd-prefork -DSYSCONFIG -C PidFile /var/run/httpd.pid -C Include /etc/apache2/sysconfig.d//loadmodule.conf -C Include /etc/apache2/sysconfig.d//global.conf -...
+-4053 /usr/sbin/httpd-prefork -DSYSCONFIG -C PidFile /var/run/httpd.pid -C Include /etc/apache2/sysconfig.d//loadmodule.conf -C Include /etc/apache2/sysconfig.d//global.conf -...
+-4054 /usr/sbin/httpd-prefork -DSYSCONFIG -C PidFile /var/run/httpd.pid -C Include /etc/apache2/sysconfig.d//loadmodule.conf -C Include /etc/apache2/sysconfig.d//global.conf -...
Nov 15 13:04:21 webserver systemd[1]: Starting The Apache Webserver...
Nov 15 13:04:21 webserver systemd[1]: Started The Apache Webserver.
Cause
With that no adjustments will be made.
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:7023524
- Creation Date: 15-Nov-2018
- Modified Date:03-Mar-2020
-
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com