I'm try to start apache after an upgrade

Hello,

the start of apache fail. Do some one know why?

I post here the code of the output of the command start.

gabriele@linux-2zq7:~> sudo /etc/.init.d/apache2 restart
root's password:
sudo: /etc/.init.d/apache2: comando non trovato

gabriele@linux-2zq7:~> sudo /etc/init.d/apache2 restart
redirecting to systemctl restart apache2
Job for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for details.

gabriele@linux-2zq7:~> systemctl status apache2.service
apache2.service - The Apache Webserver
   Loaded: loaded (/usr/lib/systemd/system/apache2.service; enabled)
   Active: failed (Result: exit-code) since mar 2014-01-14 16:19:54 CET; 13s ago
  Process: 13144 ExecStop=/usr/sbin/start_apache2 -D SYSTEMD -DFOREGROUND -k graceful-stop (code=exited, status=1/FAILURE)
  Process: 13126 ExecStart=/usr/sbin/start_apache2 -D SYSTEMD -DFOREGROUND -k start (code=exited, status=1/FAILURE)
 Main PID: 13126 (code=exited, status=1/FAILURE)

gabriele@linux-2zq7:~> journalctl -xn
-- Logs begin at dom 2012-11-18 11:23:51 CET, end at mar 2014-01-14 16:18:51 CET. --
gen 14 16:00:01 linux-2zq7.site systemd[1407]: Time has been changed
-- Subject: Time change
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- The system clock has been changed to REALTIME microseconds after January 1st, 1970.
gen 14 16:02:15 linux-2zq7.site su[3984]: (to gabriele) gabriele on none
gen 14 16:02:16 linux-2zq7.site su[3991]: (to gabriele) gabriele on none
gen 14 16:07:53 linux-2zq7.site su[4148]: (to gabriele) gabriele on none
gen 14 16:15:04 linux-2zq7.site systemd[1407]: Time has been changed
-- Subject: Time change
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- The system clock has been changed to REALTIME microseconds after January 1st, 1970.
gen 14 16:15:04 linux-2zq7.site systemd[1407]: Time has been changed
-- Subject: Time change
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- The system clock has been changed to REALTIME microseconds after January 1st, 1970.
gen 14 16:15:04 linux-2zq7.site systemd[1407]: Time has been changed
-- Subject: Time change
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- The system clock has been changed to REALTIME microseconds after January 1st, 1970.
gen 14 16:15:04 linux-2zq7.site systemd[1407]: Time has been changed
-- Subject: Time change
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- The system clock has been changed to REALTIME microseconds after January 1st, 1970.
gen 14 16:18:50 linux-2zq7.site pulseaudio[12811]: [pulseaudio] pid.c: Daemon already running.
gen 14 16:18:50 linux-2zq7.site pulseaudio[1899]: [pulseaudio] module.c: Module "module-device-manager" should be loaded once

The upgrade is to version 12.3 -> 13.1
whereas the version of apache is 2.4.6

As you may have noticed yourself, /etc/.init.d/ does not (and never did) exist. It’s /etc/init.d/… :wink:

Or use “sudo systemctl restart apache2.service”.

And please post the output of “sudo systemctl status apache2.service”. This will provide more info than if you run it as mere user.

But most likely the reason for apache not starting is some error in the configuration. There have been some incompatible changes between 2.2 and 2.4: Upgrading to 2.4 from 2.2 - Apache HTTP Server Version 2.4

If your config is not very customised, you may want to just remove /etc/apache2/ and reinstall the apache2 package. You would then get a default configuration that should work. Or maybe just remove the files that contain errors and reinstall.

And have a look at /etc/sysconfig/apache2, especially at the list of modules to load.

Looks like you did include “systemctl status apache2.service”

Recommend you look closely at that output…

  1. As wolfi notes, since init no longer is the primary subsystem in openSUSE, it’s re-directing to systemd. Use the systemd command although the old command will work in this distro version.
  2. As expected, the output for “status” includes the error from journalctl. It seems to be complaining about time. I don’t remember that is an error that normally should affect Apache (it would some other services, primarily dealing with authentication). Nevertheless, I recommend you take a closer look whether your system is properly configured for the current time.

If the error <just> happened, you can also “tail” the journal eg

journalctl | tail

TSU

No, the “systemctl status” command he posted did not include an error from journalctl. You have to run it as root for that (or use “sudo” as I suggested).
He posted the output of “journalctl -xn” as run by him manually.
But that complaints about time have nothing to do with the failed start of apache, that’s something else.

So, please post the output of “sudo systemctl status apache2.service”. Then it should show the real error regarding apache from the journal.

linux-2zq7:/home/gabriele # systemctl restart apache2.service
Job for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for details.
linux-2zq7:/home/gabriele # systemctl status apache2.service
apache2.service - The Apache Webserver
   Loaded: loaded (/usr/lib/systemd/system/apache2.service; disabled)
   Active: failed (Result: exit-code) since mar 2014-01-14 20:57:58 CET; 3min 36s ago
  Process: 9409 ExecStop=/usr/sbin/start_apache2 -D SYSTEMD -DFOREGROUND -k graceful-stop (code=exited, status=1/FAILURE)
  Process: 9391 ExecStart=/usr/sbin/start_apache2 -D SYSTEMD -DFOREGROUND -k start (code=exited, status=1/FAILURE)
 Main PID: 9391 (code=exited, status=1/FAILURE)

gen 14 20:57:58 linux-2zq7.site start_apache2[9391]: AH00526: Syntax error on line 48 of /etc/apache2/ssl-global.conf:
gen 14 20:57:58 linux-2zq7.site start_apache2[9391]: SSLSessionCache: 'shmcb' session cache not supported (known names...cb?).
gen 14 20:57:58 linux-2zq7.site systemd[1]: apache2.service: main process exited, code=exited, status=1/FAILURE
gen 14 20:57:58 linux-2zq7.site start_apache2[9409]: AH00526: Syntax error on line 48 of /etc/apache2/ssl-global.conf:
gen 14 20:57:58 linux-2zq7.site start_apache2[9409]: SSLSessionCache: 'shmcb' session cache not supported (known names...cb?).
gen 14 20:57:58 linux-2zq7.site systemd[1]: apache2.service: control process exited, code=exited status=1
gen 14 20:57:58 linux-2zq7.site systemd[1]: Failed to start The Apache Webserver.
gen 14 20:57:58 linux-2zq7.site systemd[1]: Unit apache2.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.
linux-2zq7:/home/gabriele # journalctl | tail
gen 14 21:00:10 linux-2zq7.site systemd[1]: Time has been changed
gen 14 21:00:10 linux-2zq7.site systemd[1395]: Time has been changed
gen 14 21:00:10 linux-2zq7.site systemd[1]: Time has been changed
gen 14 21:00:10 linux-2zq7.site systemd[2646]: Time has been changed
gen 14 21:00:10 linux-2zq7.site systemd[1395]: Time has been changed
gen 14 21:00:10 linux-2zq7.site systemd[2646]: Time has been changed
gen 14 21:00:10 linux-2zq7.site systemd[1]: Time has been changed
gen 14 21:00:10 linux-2zq7.site systemd[1395]: Time has been changed
gen 14 21:00:12 linux-2zq7.site dbus[688]: [system] Activating service name='org.freedesktop.PackageKit' (using servicehelper)
gen 14 21:00:12 linux-2zq7.site dbus[688]: [system] Successfully activated service 'org.freedesktop.PackageKit'


Well, there you have the exact error message.

‘shmcb’ is indeed included in the default /etc/apache2/ssl-global.conf, so you might miss a required module (there have been changes in apache 2.4 regarding which modules are included and which have to be loaded explicitely).

So please post your file /etc/sysconfig/apache2.

Mine has this:

APACHE_MODULES="actions alias auth_basic authn_file authz_host authz_groupfile  authz_user autoindex cgi dir env expires include log_config mime negotiation setenvif ssl userdir php5 reqtimeout authn_core authz_core"

I’m not sure which module is needed for that SSLSessionCache (ssl maybe?), but you could compare your “APACHE_MODULES” line and change it accordingly.

ok is php5 i think i disinstalled it before reistalling apache2


## Path:       Network/WWW/Apache/SuSEhelp
## Description:       SuSE help doc server configuration
## Type:       yesno
## Default:       no
## Config:         apache
## ServiceRestart: apache
## Command:
#
# Set this to yes on the central documentation server
# or to configure apache for local use of susehelp. 
# Then the online-help-system indices are automatically adjusted
# and access to the help-files is allowed as specified in DOC_ALLOW.
# To run as a client for the central documentation server who's name
# is specified in DOC_HOST, just set DOC_SERVER to no.
# The DOC_HOST and DOC_ALLOW variables are in the file /etc/sysconfig/susehelp.
#
DOC_SERVER="no"
## Path:    Network/WWW/Apache2
## Description:    Configuration for Apache 2
## Type:    string
## Default:    ""
## ServiceRestart: apache2
#
# Here you can name files, separated by spaces, that should be Include'd from 
# httpd.conf. 
#
# This allows you to add e.g. VirtualHost statements without touching 
# /etc/apache2/httpd.conf itself, which makes upgrading easier. 
#
APACHE_CONF_INCLUDE_FILES=""

## Type:    string
## Default:    ""
## ServiceRestart: apache2
#
# Here you can name directories, separated by spaces, that should be Include'd 
# from httpd.conf. 
#
# All files contained in these directories will be recursively included by apache.
# If a pattern like *.conf is appended, apache will use it.
#
# Examples: "/etc/apache2/my_conf/"
#           "/etc/apache2/virtual_hosts/*.conf"
#           "local/*.conf /srv/www/virtual/"
#
APACHE_CONF_INCLUDE_DIRS=""

## Type:    string
## Default:    "actions alias auth_basic authz_host authn_file authz_groupfile authz_default authz_user autoindex cgi dir env expires include log_config mime negotiation setenvif ssl suexec userdir php5"
## ServiceRestart: apache2
#
# [It might look silly to not simply edit httpd.conf for the LoadModule statements.
# However, since the LoadModule statements might need an absolute path to the modules,
# switching between MPMs can be quite a hassle. It's easier to just give the names here.]
#
# * list of all modules shipped with the base distribution: 
#
#    actions alias asis auth_basic auth_digest authn_alias authn_anon
#    authn_dbd authn_dbm authn_default authn_file authnz_ldap authz_dbm
#    authz_default authz_groupfile authz_host authz_owner authz_user
#    autoindex bucketeer cache case_filter case_filter_in cern_meta cgi
#    charset_lite dav dav_fs dav_lock dbd deflate dir disk_cache dumpio
#    echo env expires ext_filter file_cache filter headers ident imagemap
#    include info ldap log_config log_forensic logio mem_cache mime mime_magic
#    negotiation optional_fn_export optional_fn_import optional_hook_export
#    optional_hook_import proxy proxy_ajp proxy_balancer proxy_connect
#    proxy_ftp proxy_http proxy_scgi reqtimeout rewrite setenvif speling ssl
#    status substitute suexec unique_id userdir usertrack version vhost_alias 
#
#   see http://httpd.apache.org/docs-2.2/mod/ !
#
# * It pays to use IfDefine statements... like
#    <IfModule mod_xyz.c>
#        ....
#    </IfModule>
#
# * In the APACHE_MODULES variable, you can use mod_xyz or just xyz syntax.
#   You may also name an absolute path if you like.
#
# * NOTE ON SSL: before you can use mod_ssl, you need a server certificate. 
#   A test certificate can be created by entering 
#   'cd /usr/share/doc/packages/apache2; ./certificate.sh' as root.
#   Also, you need to set the ServerName inside the <VirtualHost _default_:443> 
#   block to the fully qualified domain name (see /etc/HOSTNAME).
# * if your server certificate is protected by a passphrase you should increase the
#   APACHE_START_TIMEOUT (see above)
# * to finally enable ssl support, you need to add 'SSL' to APACHE_SERVER_FLAGS 
#   below.
#
# * modules listed here will be ignored if they are not installed
#
#
# EXAMPLES:
#
# fairly minimal
# APACHE_MODULES="authz_host alias auth dir log_config mime setenvif"
#
# apache's default installation
# APACHE_MODULES="authz_host actions alias asis auth autoindex cgi dir imap include log_config mime negotiation setenvif status userdir"
# your settings
APACHE_MODULES="actions alias auth_basic authn_file authz_host authz_groupfile authz_user autoindex cgi dir env expires include log_config mime negotiation setenvif ssl userdir  reqtimeout rewrite authn_core authz_core"


## Type:    string
## Default:    ""
## ServiceRestart: apache2
#
# Additional server flags:
#
# Put here any server flags ("Defines") that you want to hand over to 
# httpd at start time, or other command line flags.
#
# Background: Any directives within an <IfDefine flag>...</IfDefine>
#             section are only processed if the flag is defined.
#             This allows to write configuration which is active only in a
#             special cases, like during server maintenance, or for testing
#             something temporarily.
#
# Notably, to enable ssl support, 'SSL' needs to be added here.
# To enable the server-status, 'STATUS' needs to be added here.
#
# It does not matter if you write flag1, -D flag1 or -Dflag1.
# Multiple flags can be given as "-D flag1 -D flag2" or simply "flag1 flag2".
#
# Specifying such flags here is equivalent to giving them on the commandline.
# (e.g. via rcapache2 start -DReverseProxy)
#
# Example:
#      "SSL STATUS AWSTATS SVN_VIEWCVS no_subversion_today"
#
APACHE_SERVER_FLAGS="SSL"

## Type:    string
## Default:    ""
## ServiceRestart: apache2
#
# Which config file do you want to use?
# (if not set, /etc/apache2/httpd.conf is used.)
# It is unusual to need to use this setting.
#
# Note about ulimits:
#   if you want to set ulimits, e.g. to increase the max number of open file handle, 
#   or to allow core files, you can do so by editing /etc/sysconfig/apache2 and
#   simply write the ulimit commands into that file.
#   Example:
#     ulimit -n 16384
#     ulimit -H -n 16384
#     ulimit -c unlimited
#   See the output of "help ulimit" in the bash, or "man 1 ulimit".
#
APACHE_HTTPD_CONF=""

## Type:    list(prefork,worker,event,itk)
## Default:    ""
## ServiceRestart: apache2
#
# MPM (multi-processing module) to use.
#
# Needed to determine with which MPM apache will run, as well as
# against which header files modules will be built. 
#
# If not set, the system will simply pick one of the installed MPMs.
#
# The implementation of the logic is in /usr/share/apache2/find_mpm,
# a script which can be used standalone as well if needed.
#
APACHE_MPM=""

## Type:    string
## Default:    ""
## ServiceReload: apache2
#
# email address of the server administrator (ServerAdmin directive)
# This address is added to the server's responses if APACHE_SERVERSIGNATURE 
# is set to "email". 
#
# If empty ("") it defaults to webmaster@$FQHOSTNAME, where FQHOSTNAME is
# taken from /etc/HOSTNAME. 
#
# Note that ServerAdmin directives inside VirtualHost statements are not
# changed, even not the one in the stock SSL virtual host block. 
#
APACHE_SERVERADMIN=""

## Type:    string
## Default:    ""
## ServiceReload: apache2
#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If this is not set to valid DNS name for your host, server-generated
# redirections will not work.  See also the UseCanonicalName directive.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address anyway, and this will make 
# redirections work in a sensible way.
#
APACHE_SERVERNAME=""

## Type:    integer
## Default:    2
#
# timeout during server startup (seconds)
# after this time, the start script decides wether the httpd process started without error.
#
# Increase it, if you use mod_ssl and your certificate is passphrase protected!
#
APACHE_START_TIMEOUT="2"

## Type:    list(on,off,email)
## Default:    "on"
## ServiceReload: apache2
#
# Configures the footer on server-generated documents 
# This correlates to the ServerSignature directive. 
#
APACHE_SERVERSIGNATURE="on"

## Type:    list(debug,info,notice,warn,error,crit,alert,emerg)
## Default:    "warn"
## ServiceReload: apache2
#
# LogLevel: Control the number of messages logged to the error_log.
#
APACHE_LOGLEVEL="warn"

## Type:    string
## Default:    "/var/log/apache2/access_log combined"
## ServiceRestart: apache2
#
# The location and format of the access logfile (Common Logfile Format).
# If you do not define any access logfiles within a <VirtualHost>
# container, they will be logged here.  Contrarywise, if you *do*
# define per-<VirtualHost> access logfiles, transactions will be
# logged therein and *not* in this file.
#
# Simply set it to empty, if you configure it yourself somewhere else.
# 
# Examples:
#
# If you would like to have agent and referer logfiles:
#
# setting it to "/var/log/apache2/referer_log referer, /var/log/apache2/agent_log agent"
#   corresponds to 
# CustomLog /var/log/apache2/referer_log referer
# CustomLog /var/log/apache2/agent_log   agent
#
# If you prefer a single logfile with access, agent, and referer information
# (Combined Logfile Format):
#
# setting it to "/var/log/apache2/access_log combined"
#   corresponds to 
# CustomLog /var/log/apache2/access_log combined
#
APACHE_ACCESS_LOG="/var/log/apache2/access_log combined"

## Type:    list(On,Off,DNS)
## Default:    "Off"
## ServiceReload: apache2
#
# UseCanonicalName: Determines how Apache constructs self-referencing 
# URLs and the SERVER_NAME and SERVER_PORT variables.
# When set "Off", Apache will use the Hostname and Port supplied
# by the client.  When set "On", Apache will use the value of the
# ServerName directive.
#
APACHE_USE_CANONICAL_NAME="off"

## Type:    list(Major,Minor,Minimal,ProductOnly,OS,Full)
## Default:    "OS"
## ServiceReload: apache2
#
# How much information the server response header field contains about the server.
# (installed modules, versions, etc.)
# see http://httpd.apache.org/docs-2.2/mod/core.html#servertokens
#
APACHE_SERVERTOKENS="OS"

## Type:    list(on,off)
## Default:    "off"
## ServiceReload: apache2
#
# If mod_status is used, include extended information about the server, like 
# CPU usage, in the status report. It is a server-wide setting, and it can cost
# some performance!
#
APACHE_EXTENDED_STATUS="off"

No is not only the php5 module.

gabriele@linux-2zq7:~> systemctl status apache2.service
apache2.service - The Apache Webserver
   Loaded: loaded (/usr/lib/systemd/system/apache2.service; disabled)
   Active: failed (Result: exit-code) since mar 2014-01-14 21:41:52 CET; 14s ago
  Process: 11233 ExecStop=/usr/sbin/start_apache2 -D SYSTEMD -DFOREGROUND -k graceful-stop (code=exited, status=1/FAILURE)
  Process: 11214 ExecStart=/usr/sbin/start_apache2 -D SYSTEMD -DFOREGROUND -k start (code=exited, status=1/FAILURE)
 Main PID: 11214 (code=exited, status=1/FAILURE)

gabriele@linux-2zq7:~> ^C
gabriele@linux-2zq7:~> journalctl -xn
-- Logs begin at dom 2012-11-18 11:23:51 CET, end at mar 2014-01-14 21:39:27 CET. --
gen 14 21:30:11 linux-2zq7.site systemd[1395]: Time has been changed
-- Subject: Time change
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- The system clock has been changed to REALTIME microseconds after January 1st, 1970.
gen 14 21:30:11 linux-2zq7.site systemd[1395]: Time has been changed
-- Subject: Time change
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- The system clock has been changed to REALTIME microseconds after January 1st, 1970.
gen 14 21:30:12 linux-2zq7.site systemd[1395]: Time has been changed
-- Subject: Time change
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- The system clock has been changed to REALTIME microseconds after January 1st, 1970.
gen 14 21:38:07 linux-2zq7.site su[10112]: (to gabriele) gabriele on none
gen 14 21:38:07 linux-2zq7.site su[10112]: pam_systemd(su:session): pam_putenv: delete non-existent entry; XDG_RUNTIME_DIR
gen 14 21:38:07 linux-2zq7.site su[10119]: (to gabriele) gabriele on none
gen 14 21:38:07 linux-2zq7.site su[10119]: pam_systemd(su:session): pam_putenv: delete non-existent entry; XDG_RUNTIME_DIR
gen 14 21:39:25 linux-2zq7.site hp-systray[10761]: hp-systray[10761]: error: option -s not recognized
gen 14 21:39:26 linux-2zq7.site pulseaudio[10804]: [pulseaudio] pid.c: Daemon already running.
gen 14 21:39:27 linux-2zq7.site pulseaudio[1829]: [pulseaudio] module.c: Module "module-device-manager" should be loaded once 
gabriele@linux-2zq7:~>

gabriele@linux-2zq7:~> journalctl | tail
gen 14 21:38:07 linux-2zq7.site su[10112]: pam_systemd(su:session): pam_putenv: delete non-existent entry; XDG_RUNTIME_DIR
gen 14 21:38:07 linux-2zq7.site su[10119]: (to gabriele) gabriele on none
gen 14 21:38:07 linux-2zq7.site su[10119]: pam_systemd(su:session): pam_putenv: delete non-existent entry; XDG_RUNTIME_DIR
gen 14 21:39:25 linux-2zq7.site hp-systray[10761]: hp-systray[10761]: error: option -s not recognized
gen 14 21:39:26 linux-2zq7.site pulseaudio[10804]: [pulseaudio] pid.c: Daemon already running.
gen 14 21:39:27 linux-2zq7.site pulseaudio[1829]: [pulseaudio] module.c: Module "module-device-manager" should be loaded once at most. Refusing to load.
gen 14 21:45:06 linux-2zq7.site systemd[1395]: Time has been changed
gen 14 21:45:06 linux-2zq7.site systemd[1395]: Time has been changed
gen 14 21:45:06 linux-2zq7.site systemd[1395]: Time has been changed
gen 14 21:45:06 linux-2zq7.site systemd[1395]: Time has been changed
gabriele@linux-2zq7:~> 

OK, the only real difference in /etc/sysconfig/apache2 is that you use the “rewrite” module (that shouldn’t cause this I guess) and have APACHE_SERVER_FLAGS=“SSL” (which could of course make that difference :wink: )
Could you try to set this to APACHE_SERVER_FLAGS="" for a test and see if it starts then?

And again, please, run “systemctl status apache2.service” as root to get the full error messages.

PS: Yes, I changed mine to APACHE_SERVER_FLAGS=“SSL” and it failed to start as well.
I’m going to do some investigations there…

Might be worth a bugreport though.

Yes it starts. A Lot lot lot Of Thanks.

GM

Maybe this will help you?
http://stackoverflow.com/questions/20127138/apache-2-4-configuration-for-ssl-not-working

I can confirm, adding “socache_shmcb” to the APACHE_MODULES line in /etc/sysconfig/apache2 makes apache start again with SSL here.

Can you try that please?

Edit:
Ah, ok. It just saw it works for you now.
Well, I guess the question is if you want/need SSL or nor not. :wink:
But the above works for me.