Nextcloud AIO apache unhealthy

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can. :heart:

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • AIO 10.0.0
  • Operating system and version (e.g., Ubuntu 24.04):
    • Ubuntu 24.04
  • Web server and version (e.g, Apache 2.4.25):
    • 2.4.62
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • ?
  • PHP version (e.g, 8.3):
    • ?
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • today
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • AIO
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • no

Summary of the issue you are facing:

This morning, no idea what happened at night, the Nextcloud site is no longer available and the Nextcloud desktop client and all services connected to Nextcloud no longer work.
According to the AIO interface page, all containers are green and running. But if I look in Portainer then all containers are ok but the “apache” container is “unhealthy”. Restarting the container and restarting the entire OS did not help.
I am desperate, I need help fast.

Log entries

Web Browser

Log from container “apache” copied from AIO admin side.

2024-12-16T06:39:57.306797688Z Waiting for Nextcloud to start...
2024-12-16T06:40:02.308968105Z Waiting for Nextcloud to start...
2024-12-16T06:40:07.311229607Z Waiting for Nextcloud to start...
2024-12-16T06:40:12.313183269Z Waiting for Nextcloud to start...
2024-12-16T06:40:17.315291889Z Connection to nextcloud-aio-nextcloud (172.18.0.7) 9000 port [tcp/*] succeeded!
2024-12-16T06:40:18.532826309Z [Mon Dec 16 07:40:18.531599 2024] [mpm_event:notice] [pid 40:tid 40] AH00489: Apache/2.4.62 (Unix) configured -- resuming normal operations
2024-12-16T06:40:18.532896401Z [Mon Dec 16 07:40:18.531643 2024] [core:notice] [pid 40:tid 40] AH00094: Command line: '/usr/local/apache2/bin/httpd -D FOREGROUND'
2024-12-16T06:40:18.544132256Z {"level":"info","ts":1734331218.5438128,"msg":"using config from file","file":"/tmp/Caddyfile"}
2024-12-16T06:40:18.545027951Z {"level":"info","ts":1734331218.5449,"msg":"adapted config to JSON","adapter":"caddyfile"}

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

<?php
$CONFIG = array (
  'one-click-instance' => true,
  'one-click-instance.user-limit' => 100,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'appsallowlist' => false,
  'check_data_directory_permissions' => false,
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'nextcloud-aio-redis',
    'password' => 'password',
    'port' => 6379,
  ),
  'overwritehost' => 'myurl',
  'overwriteprotocol' => 'https',
  'passwordsalt' => 'password',
  'secret' => 'secret',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => 'myurl',
    2 => 'myurl',
    3 => 'ip',
  ),
  'datadirectory' => '/mnt/ncdata',
  'dbtype' => 'pgsql',
  'version' => '30.0.2.2',
  'overwrite.cli.url' => 'https://myurl/',
  'dbname' => 'nextcloud_database',
  'dbhost' => 'nextcloud-aio-database',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'oc_nextcloud',
  'dbpassword' => 'password',
  'installed' => true,
  'instanceid' => 'oc9tmlqpbjqi',
  'maintenance' => false,
  'maintenance_window_start' => 100,
  'default_phone_region' => 'DE',
  'updatedirectory' => '/nc-updater',
  'loglevel' => '2',
  'log_type' => 'file',
  'logfile' => '/var/www/html/data/nextcloud.log',
  'log_rotate_size' => '10485760',
  'log.condition' => 
  array (
    'apps' => 
    array (
      0 => 'admin_audit',
    ),
  ),
  'preview_max_x' => 1024,
  'preview_max_y' => 1024,
  'jpeg_quality' => 60,
  'enabledPreviewProviders' => 
  array (
    0 => 'OC\\Preview\\Imaginary',
    1 => 'OC\\Preview\\TXT',
    2 => 'OC\\Preview\\OpenDocument',
    3 => 'OC\\Preview\\Movie',
    4 => 'OC\\Preview\\Krita',
    5 => 'OC\\Preview\\HEIC',
    6 => 'OC\\Preview\\TIFF',
    7 => 'OC\\Preview\\Image',
  ),
  'enable_previews' => true,
  'upgrade.disable-web' => true,
  'mail_smtpmode' => 'smtp',
  'trashbin_retention_obligation' => 'auto, 30',
  'versions_retention_obligation' => 'auto, 30',
  'activity_expire_days' => '30',
  'simpleSignUpLink.shown' => false,
  'share_folder' => '/Shared',
  'one-click-instance.link' => 'https://nextcloud.com/all-in-one/',
  'upgrade.cli-upgrade-link' => 'https://github.com/nextcloud/all-in-one/discussions/2726',
  'allow_local_remote_servers' => true,
  'davstorage.request_timeout' => 3600,
  'htaccess.RewriteBase' => '/',
  'dbpersistent' => false,
  'files_external_allow_create_new_local' => false,
  'trusted_proxies' => 
  array (
    0 => '127.0.0.1',
    1 => '::1',
    2 => '172.18.0.1',
    3 => '172.19.0.1',
    4 => '127.0.0.1',
    10 => '172.18.0.0/16',
  ),
  'preview_imaginary_url' => 'http://nextcloud-aio-imaginary:9000',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'webmaster',
  'mail_domain' => 'myurl',
  'mail_smtphost' => 'smtp.myurlde',
  'mail_smtpport' => '587',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'webmaster@myurl',
  'mail_smtppassword' => 'orwFGCE@n4mRQPtPixy8',
  'memories.exiftool' => '/var/www/html/custom_apps/memories/bin-ext/exiftool-amd64-musl',
  'memories.vod.path' => '/var/www/html/custom_apps/memories/bin-ext/go-vod-amd64',
  'memories.vod.ffmpeg' => '/usr/bin/ffmpeg',
  'memories.vod.ffprobe' => '/usr/bin/ffprobe',
  'preview_imaginary_key' => '6fadc047334f6eae500c18cb174db81576e62b4106f38d29',
  'memories.gis_type' => 2,
  'memories.db.triggers.fcu' => true,
  'auth.bruteforce.protection.enabled' => true,
  'ratelimit.protection.enabled' => true,
  'memories.vod.disable' => false,
  'documentation_url.server_logs' => 'https://github.com/nextcloud/all-in-one/discussions/5425',
);


Hi,
I had a similar experience, and the solution that worked for me was the following:

  1. In the local Nextcloud AIO interface, I stopped all containers.
  2. Then, I logged into Portainer and deleted all stopped containers except the mastercontainer.
  3. After deleting the containers, I let the system recreate them through the local Nextcloud AIO interface.

When I faced this issue, neither restarting the server nor stopping the containers helped. It was necessary to completely remove all containers (except for the mastercontainer) and let them be recreated automatically.

I noticed similar behavior (e.g., the “apache” container marked as “unhealthy”) when some files or services within the container had failed. This process resolved the issue for me.

I hope this helps. Let me know if you need more details.

I have done this and it doesn’t help. The Apache container briefly turns green and is healthy and then it becomes unhealthy.
What else can I do and check? The whole thing just happened overnight. Everything was fine last night and it stopped working this morning.

EDIT:
Here is a healthcheck test.

[mabox@cloud ~/.local/share/docker/volumes]$ docker exec -it nextcloud-aio-apache bash -x /healthcheck.sh
+ nc -z nextcloud-aio-nextcloud 9000
Connection to nextcloud-aio-nextcloud (172.18.0.8) 9000 port [tcp/*] succeeded!
+ nc -z 127.0.0.1 8000
Connection to 127.0.0.1 8000 port [tcp/*] succeeded!
+ nc -z 127.0.0.1 11000
Connection to 127.0.0.1 11000 port [tcp/*] succeeded!
+ nc -z cloud.mabox.org 443
+ echo 'Could not reach $MYURL on port 443.'
Could not reach $MYURL on port 443.
+ exit 1

I have no idea why my domain should not be accessible.
What is also stupid is that AIO Mastercontainer reports everything green but Portainer does not, I am desperate, we can no longer access our data.

EDIT:
I got it.
I read a note somewhere that it was due to a problem on the router, a restart helped there.
I have now simply restarted the router although everything else on the network is working. Maybe it was a problem on the router firewall or the port forwarding, I don’t know.
In any case, after restarting the router, my domain is accessible again and the Apache container is now healthy in the container.
I am so happy but of course it is worrying what kind of problem the router has now. As for Nextcloud, it’s innocent :slight_smile:

2 Likes

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.