Nextcloud unreachable after Apache server gracefully restarts

Nextcloud version 14.0.6:
Ubuntu Desktop 18.10:
Apache version 2.4.34:
PHP version 7.2:

I recently renewed my certificate from Lets’ encrypt as well as upgrading the OS to Ubuntu 18.10 (The same day)
The problem I am currently facing is that every night the Apache server is making a Graceful restart and then the nextcloud instance is not reachable anymore (" This site can’t be reached"). I have tried the command “sudo service apache2 reload” which cause the same issue. The root of my webserver is still accessible but not “/nextcloud”.

Thank you in advance :slight_smile:

The output of your Nextcloud log in Admin > Logging:
I have cleared the log and reproduced the error but the log is still empty.

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'oc4pevi79l9q',
  'overwrite.cli.url' => 'xxxxxxxxxx',
  'passwordsalt' => 'xxxxxxxxxxxxx',
  'secret' => 'xxxxxxxxxxxxxxxxx',
  'trusted_domains' => 
  array (
    0 => 'xxxxxxxxxxxx',
    1 => '192.168.0.15',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '14.0.6.0',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'root',
  'dbpassword' => 'xxxxxxxxx',
  'installed' => true,
  'theme' => '',
  'loglevel' => 2,
  'maintenance' => false,
  'debug' => false,
  'htaccess.RewriteBase' => '/nextcloud',
  'auth.bruteforce.protection.enabled' => false,
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',
  'mail_from_address' => 'admin',
  'mail_smtpmode' => 'php',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_domain' => 'xxxxxxxxx',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'filelocking.enabled' => 'true',
  'redis' => 
  array (
    'host' => '/var/run/redis/redis-server.sock',
    'port' => 0,
    'timeout' => 0.0,
  ),
  'updater.release.channel' => 'stable',
  'enable_previews' => true,
  'enabledPreviewProviders' => 
  array (
    0 => 'OC\\Preview\\Image',
    1 => 'OC\\Preview\\MP3',
    2 => 'OC\\Preview\\TXT',
    3 => 'OC\\Preview\\PDF',
    4 => 'OC\\Preview\\Movie',
    5 => 'OC\\Preview\\Photoshop',
    6 => 'OC\\Preview\\TIFF',
    7 => 'OC\\Preview\\SVG',
    8 => 'OC\\Preview\\OpenDocument',
  ),
);

The output of your Apache/nginx/system log in /var/log/____:

[Sun Jan 20 15:26:01.688914 2019] [mpm_prefork:notice] [pid 19644] AH00163: Apache/2.4.34 (Ubuntu) OpenSSL/1.1.1 configured -- resuming normal operations
[Sun Jan 20 15:26:01.688946 2019] [core:notice] [pid 19644] AH00094: Command line: '/usr/sbin/apache2'
[Sun Jan 20 15:26:02.697844 2019] [core:notice] [pid 19644] AH00051: child pid 19678 exit signal Segmentation fault (11), possible coredump in /var/cache/apache2
[Sun Jan 20 15:26:02.697894 2019] [core:notice] [pid 19644] AH00051: child pid 19680 exit signal Segmentation fault (11), possible coredump in /var/cache/apache2
[Sun Jan 20 15:26:02.697901 2019] [core:error] [pid 19644] AH00546: no record of generation 0 of exiting child 19680
[Sun Jan 20 15:26:02.697914 2019] [core:notice] [pid 19644] AH00051: child pid 19682 exit signal Segmentation fault (11), possible coredump in /var/cache/apache2
[Sun Jan 20 15:26:02.697920 2019] [core:error] [pid 19644] AH00546: no record of generation 0 of exiting child 19682
[Sun Jan 20 15:26:02.697932 2019] [core:notice] [pid 19644] AH00051: child pid 19684 exit signal Segmentation fault (11), possible coredump in /var/cache/apache2
[Sun Jan 20 15:26:02.697938 2019] [core:error] [pid 19644] AH00546: no record of generation 0 of exiting child 19684
[Sun Jan 20 15:26:02.697949 2019] [core:notice] [pid 19644] AH00051: child pid 19686 exit signal Segmentation fault (11), possible coredump in /var/cache/apache2
[Sun Jan 20 15:26:02.697955 2019] [core:error] [pid 19644] AH00546: no record of generation 0 of exiting child 19686

Are you sure the apache has been installed correctly after the system upgrade? Apache throwing core dumps is not normal. Do a

dpkg -l | grep apache2

to show all installed apache packages. Or just reinstall apache2.

1 Like

Thank you very much, reinstalling Apache solved the problem.
I noticed that when these modules are enabled the problem came back. I don’t know if it is all or just one of them that is causing it:

php-bcmath
php-bz2
php-dba
php-enchant
php-imap
php-odbc
php-pspell
php-snmp
php-soap
php-tidy
php-xmlrpc

Normally the PHP modules have the version in the package names, like php7.2-bz2. What PHP version do you have installed? Is there a version mismatch?

I did not choose any version when I installed php and it’s modules, but the version that got installed was 7.2. I don’t know if there was a version mismatch, but that may be the case.

Thank you for your help

To find out the versions of all installed php packages:

sudo dpkg -l | grep php

To find out which php version is used by apache:

sudo -u www-data php -v