Getting Empty Response on Health Check

Getting Empty Response on Health Check

The Basics

I am setting up nextcloud with docker on mac mini.

  • Nextcloud Server version (e.g., 29.x.x):
    • Nextcloud Hub 10 (31.0.5)
  • Operating system and version (e.g., Ubuntu 24.04):
    • Mac OS arm64
  • Web server and version (e.g, Apache 2.4.25):
    • latest from docker image
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • Lucky
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • Test deploying ExtApp from AppApi
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • Docker Compose (Not AIO)
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

Always get a empty response when AppApi do a health check on test deploy.

Steps to replicate it (hint: details matter!):

  1. Set up Docker Socket Proxy with network nextcloud-external
  2. Add daemon with deploy network setting nextcloud-external
  3. Try test deploy.

I tried to exec curl command as the proxy to test deploy container, and it successfully returned a heartbeat json:

Which means the docker socket proxy is able to access the test app.

Log entries

Nextcloud

Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log located in your data directory). Feel free to use a pastebin/gist service if necessary.

nextcloud.log:

{"reqId":"5HDRISn6t3aBAtBgxK6U","level":2,"time":"2025-06-19T09:49:41+00:00","remoteAddr":"","user":"--","app":"app_api","method":"","url":"--","message":"Failed heartbeat on http://test-deploy:23000 for 10 times. Most recent status=0, error: cURL error 52: Empty reply from server (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://test-deploy:23000/heartbeat","userAgent":"--","version":"31.0.5.1","data":{"app":"app_api"}}
{"reqId":"5HDRISn6t3aBAtBgxK6U","level":2,"time":"2025-06-19T09:50:09+00:00","remoteAddr":"","user":"--","app":"app_api","method":"","url":"--","message":"Failed heartbeat on http://test-deploy:23000 for 20 times. Most recent status=0, error: cURL error 52: Empty reply from server (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://test-deploy:23000/heartbeat","userAgent":"--","version":"31.0.5.1","data":{"app":"app_api"}}
{"reqId":"5HDRISn6t3aBAtBgxK6U","level":2,"time":"2025-06-19T09:50:39+00:00","remoteAddr":"","user":"--","app":"app_api","method":"","url":"--","message":"Failed heartbeat on http://test-deploy:23000 for 30 times. Most recent status=0, error: cURL error 52: Empty reply from server (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://test-deploy:23000/heartbeat","userAgent":"--","version":"31.0.5.1","data":{"app":"app_api"}}
{"reqId":"bAUYlZh2dybwIXqG29uW","level":2,"time":"2025-06-19T09:50:51+00:00","remoteAddr":"183.226.75.251","user":"--","app":"no app in context","method":"GET","url":"/cron.php","message":"Cached preview not found for file /Hina/files/\u6587\u6863/Score/\u94a2\u7434/Zatta Bokura no machi/1.png, generating a new preview.","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36","version":"31.0.5.1","data":[]}
{"reqId":"5HDRISn6t3aBAtBgxK6U","level":2,"time":"2025-06-19T09:51:05+00:00","remoteAddr":"","user":"--","app":"app_api","method":"","url":"--","message":"Failed heartbeat on http://test-deploy:23000 for 40 times. Most recent status=0, error: cURL error 52: Empty reply from server (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://test-deploy:23000/heartbeat","userAgent":"--","version":"31.0.5.1","data":{"app":"app_api"}}

test_deploy_log:

HP_SHARED_KEY is not set. Skipping FRP configuration.
Starting main application...
Started
INFO:     Started server process [1]
INFO:     Waiting for application startup.
TRACE:    ASGI [1] Started scope={'type': 'lifespan', 'asgi': {'version': '3.0', 'spec_version': '2.0'}, 'state': {}}
TRACE:    ASGI [1] Receive {'type': 'lifespan.startup'}
TRACE:    ASGI [1] Send {'type': 'lifespan.startup.complete'}
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:23000 (Press CTRL+C to quit)
INFO:     Shutting down
INFO:     Waiting for application shutdown.
TRACE:    ASGI [1] Receive {'type': 'lifespan.shutdown'}
TRACE:    ASGI [1] Send {'type': 'lifespan.shutdown.complete'}
TRACE:    ASGI [1] Completed
INFO:     Application shutdown complete.
INFO:     Finished server process [1]
HP_SHARED_KEY is not set. Skipping FRP configuration.
Starting main application...
Started
INFO:     Started server process [1]
INFO:     Waiting for application startup.
TRACE:    ASGI [1] Started scope={'type': 'lifespan', 'asgi': {'version': '3.0', 'spec_version': '2.0'}, 'state': {}}
TRACE:    ASGI [1] Receive {'type': 'lifespan.startup'}
TRACE:    ASGI [1] Send {'type': 'lifespan.startup.complete'}
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:23000 (Press CTRL+C to quit)
TRACE:    172.21.0.2:45836 - HTTP connection made
TRACE:    172.21.0.2:45836 - ASGI [2] Started scope={'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.21.0.3', 23000), 'client': ('172.21.0.2', 45836), 'scheme': 'http', 'root_path': '', 'headers': '<...>', 'state': {}, 'method': 'GET', 'path': '/heartbeat', 'raw_path': b'/heartbeat', 'query_string': b''}
TRACE:    172.21.0.2:45836 - ASGI [2] Send {'type': 'http.response.start', 'status': 200, 'headers': '<...>'}
Heartbeat was called
INFO:     172.21.0.2:45836 - "GET /heartbeat HTTP/1.1" 200 OK
TRACE:    172.21.0.2:45836 - ASGI [2] Send {'type': 'http.response.body', 'body': '<15 bytes>'}
TRACE:    172.21.0.2:45836 - ASGI [2] Completed
TRACE:    172.21.0.2:45836 - HTTP connection lost
TRACE:    172.21.0.2:56478 - HTTP connection made
TRACE:    172.21.0.2:56478 - ASGI [3] Started scope={'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.21.0.3', 23000), 'client': ('172.21.0.2', 56478), 'scheme': 'http', 'root_path': '', 'headers': '<...>', 'state': {}, 'method': 'GET', 'path': '/heartbeat', 'raw_path': b'/heartbeat', 'query_string': b''}
TRACE:    172.21.0.2:56478 - ASGI [3] Send {'type': 'http.response.start', 'status': 200, 'headers': '<...>'}
Heartbeat was called
INFO:     172.21.0.2:56478 - "GET /heartbeat HTTP/1.1" 200 OK
TRACE:    172.21.0.2:56478 - ASGI [3] Send {'type': 'http.response.body', 'body': '<15 bytes>'}
TRACE:    172.21.0.2:56478 - ASGI [3] Completed
TRACE:    172.21.0.2:56478 - HTTP connection lost
TRACE:    172.21.0.2:54140 - HTTP connection made
Heartbeat was called
INFO:     172.21.0.2:54140 - "GET /heartbeat HTTP/1.1" 200 OK
TRACE:    172.21.0.2:54140 - ASGI [4] Started scope={'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.21.0.3', 23000), 'client': ('172.21.0.2', 54140), 'scheme': 'http', 'root_path': '', 'headers': '<...>', 'state': {}, 'method': 'GET', 'path': '/heartbeat', 'raw_path': b'/heartbeat', 'query_string': b''}
TRACE:    172.21.0.2:54140 - ASGI [4] Send {'type': 'http.response.start', 'status': 200, 'headers': '<...>'}
TRACE:    172.21.0.2:54140 - ASGI [4] Send {'type': 'http.response.body', 'body': '<15 bytes>'}
TRACE:    172.21.0.2:54140 - ASGI [4] Completed
TRACE:    172.21.0.2:54140 - HTTP connection lost

Web server / Reverse Proxy

The log of my Lucky: (no error)

025/06/19 17:52:20
{"ExtInfo":{"ClientIP":"183.226.75.251","ECH":false,"Host":"nextcloud.last-remote.xyz:7356","Method":"GET","URL":"/ocs/v2.php/apps/notifications/api/v2/notifications","UserAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36"},"level":"info","msg":"Upgrade [] Connection[]"}
2025/06/19 17:52:20
{"ExtInfo":{"ClientIP":"183.226.75.251","ECH":false,"Host":"nextcloud.last-remote.xyz:7356","Method":"GET","URL":"/ocs/v2.php/apps/notifications/api/v2/notifications","UserAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36"},"level":"info","msg":"[nextcloud.last-remote.xyz] access target url [http://192.168.50.76:28080/ocs/v2.php/apps/notifications/api/v2/notifications]"}
2025/06/19 17:52:13
{"ExtInfo":{"ClientIP":"183.226.75.251","ECH":false,"Host":"nextcloud.last-remote.xyz:7356","Method":"GET","URL":"/index.php/apps/logreader/api/poll?lastReqId=5HDRISn6t3aBAtBgxK6U","UserAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36"},"level":"info","msg":"Upgrade [] Connection[]"}
2025/06/19 17:52:13
{"ExtInfo":{"ClientIP":"183.226.75.251","ECH":false,"Host":"nextcloud.last-remote.xyz:7356","Method":"GET","URL":"/index.php/apps/logreader/api/poll?lastReqId=5HDRISn6t3aBAtBgxK6U","UserAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36"},"level":"info","msg":"[nextcloud.last-remote.xyz] access target url [http://192.168.50.76:28080/index.php/apps/logreader/api/poll?lastReqId=5HDRISn6t3aBAtBgxK6U]"}
2025/06/19 17:52:02
{"ExtInfo":{"ClientIP":"183.226.75.251","ECH":false,"Host":"nextcloud.last-remote.xyz:7356","Method":"GET","URL":"/index.php/apps/logreader/api/poll?lastReqId=5HDRISn6t3aBAtBgxK6U","UserAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36"},"level":"info","msg":"Upgrade [] Connection[]"}
2025/06/19 17:52:02
{"ExtInfo":{"ClientIP":"183.226.75.251","ECH":false,"Host":"nextcloud.last-remote.xyz:7356","Method":"GET","URL":"/index.php/apps/logreader/api/poll?lastReqId=5HDRISn6t3aBAtBgxK6U","UserAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36"},"level":"info","msg":"[nextcloud.last-remote.xyz] access target url [http://192.168.50.76:28080/index.php/apps/logreader/api/poll?lastReqId=5HDRISn6t3aBAtBgxK6U]"}
2025/06/19 17:51:51
{"ExtInfo":{"ClientIP":"183.226.75.251","ECH":false,"Host":"nextcloud.last-remote.xyz:7356","Method":"GET","URL":"/index.php/apps/logreader/api/poll?lastReqId=5HDRISn6t3aBAtBgxK6U","UserAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36"},"level":"info","msg":"Upgrade [] Connection[]"}
2025/06/19 17:51:51
{"ExtInfo":{"ClientIP":"183.226.75.251","ECH":false,"Host":"nextcloud.last-remote.xyz:7356","Method":"GET","URL":"/index.php/apps/logreader/api/poll?lastReqId=5HDRISn6t3aBAtBgxK6U","UserAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36"},"level":"info","msg":"[nextcloud.last-remote.xyz] access target url [http://192.168.50.76:28080/index.php/apps/logreader/api/poll?lastReqId=5HDRISn6t3aBAtBgxK6U]"}
2025/06/19 17:51:50
{"ExtInfo":{"ClientIP":"183.226.75.251","ECH":false,"Host":"nextcloud.last-remote.xyz:7356","Method":"GET","URL":"/ocs/v2.php/apps/notifications/api/v2/notifications","UserAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36"},"level":"info","msg":"Upgrade [] Connection[]"}
2025/06/19 17:51:50
{"ExtInfo":{"ClientIP":"183.226.75.251","ECH":false,"Host":"nextcloud.last-remote.xyz:7356","Method":"GET","URL":"/ocs/v2.php/apps/notifications/api/v2/notifications","UserAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36"},"level":"info","msg":"[nextcloud.last-remote.xyz] access target url [http://192.168.50.76:28080/ocs/v2.php/apps/notifications/api/v2/notifications]"}

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!):

{
    "system": {
        "htaccess.RewriteBase": "\/",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "upgrade.disable-web": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "overwritehost": "nextcloud.last-remote.xyz:7356",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "nextcloud.last-remote.xyz:7356"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "31.0.5.1",
        "overwriteprotocol": "https",
        "overwrite.cli.url": "https:\/\/nextcloud.last-remote.xyz:7356",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "app_install_overwrite": []
    }
}

Apps

The output of occ app:list (if possible).

Enabled:
  - activity: 4.0.0
  - app_api: 5.0.2
  - assistant: 2.4.0
  - bruteforcesettings: 4.0.0
  - calendar: 5.3.2
  - circles: 31.0.0
  - cloud_federation_api: 1.14.0
  - comments: 1.21.0
  - contacts: 7.1.3
  - contactsinteraction: 1.12.0
  - context_chat: 4.3.0
  - dashboard: 7.11.0
  - dav: 1.33.0
  - electronicsignatures: 3.0.5
  - federatedfilesharing: 1.21.0
  - federation: 1.21.0
  - files: 2.3.1
  - files_downloadlimit: 4.0.0
  - files_pdfviewer: 4.0.0
  - files_reminders: 1.4.0
  - files_sharing: 1.23.1
  - files_trashbin: 1.21.0
  - files_versions: 1.24.0
  - firstrunwizard: 4.0.0
  - integration_gitlab: 3.2.0
  - logreader: 4.0.0
  - lookup_server_connector: 1.19.0
  - nextcloud_announcements: 3.0.0
  - notes: 4.12.1
  - notifications: 4.0.0
  - oauth2: 1.19.1
  - password_policy: 3.0.0
  - photos: 4.0.0-dev.1
  - privacy: 3.0.0
  - profile: 1.0.0
  - provisioning_api: 1.21.0
  - recommendations: 4.0.0
  - related_resources: 2.0.0
  - richdocuments: 8.7.0
  - richdocumentscode_arm64: 25.4.202
  - serverinfo: 3.0.0
  - settings: 1.14.0
  - sharebymail: 1.21.0
  - spreed: 21.1.0
  - support: 3.0.0
  - survey_client: 3.0.0
  - systemtags: 1.21.1
  - text: 5.0.0
  - theming: 2.6.1
  - twofactor_backupcodes: 1.20.0
  - updatenotification: 1.21.0
  - user_status: 1.11.0
  - viewer: 4.0.0
  - weather_status: 1.11.0
  - webhook_listeners: 1.2.0
  - whiteboard: 1.0.5
  - workflow_script: 2.0.0
  - workflowengine: 2.13.0
Disabled:
  - admin_audit: 1.21.0
  - encryption: 2.19.0
  - files_external: 1.23.0
  - suspicious_login: 9.0.1
  - twofactor_nextcloud_notification: 5.0.0
  - twofactor_totp: 13.0.0-dev.0
  - user_ldap: 1.22.0