Heartbeat check fails for ExApp on remote host; Nextcloud keeps targeting 'localhost', ignores BIND_ADDRESS/OVERRIDE_APP_HOST flags
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- docker, php
- Área
- backend, devops, networking
Línea de trabajo
Comienza rastreando el heartbeat de app_api y el flujo de despliegue de docker-install, centrándote en cómo se propagan la dirección del daemon remoto y las configuraciones BIND_ADDRESS/APP_API_HOST. Reproduce el despliegue con la configuración documentada de host-network y verifica que el heartbeat apunte a la aplicación remota en lugar de a localhost y que la aplicación desplegada sea accesible externamente.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
Set up Nextcloud 30.0.12 on CPU-only Rocky Linux 9 with an additional GPU-supported Rocky Linux 9 server as a processing backend for apps.
All is done in a http-only enviroment.
When doing a test deploy on the DSP, it fails the heartbeat check every time. But accessing the heartbeat via wget or curl either inside the container or inside the gpu server, where the test-deploy is made, works. The Nextcloud instance cannot reach the container. Connection is refused everytime, according to the log. However, looking a tcpdump, we can see that Nextcloud attempts to get the Heartbeat check from the localhost (nextcloud server) instead of the container, which is in the GPU server.
Neither -e OVERRIDE_APP_HOST='true' nor -e APP_API_HOST='0.0.0.0' on the DSP container had any effect. The heartbeat still targets localhost, and the app still binds to 127.0.0.1.
Using Docker's default bridge network (by leaving the Network field in the UI blank) caused the test container to fail the "Container started" step.
Steps/Code to Reproduce
Recommended settings used for docker run:
docker run
-d
--name GPU-DSP
--restart unless-stopped
--net host
-v /var/run/docker.sock:/var/run/docker.sock
-e BIND_ADDRESS=""
-e EX_APPS_NET="[email protected]" \
-e NC_HAPROXY_PASSWORD='xxx'
ghcr.io/nextcloud/nextcloud-appapi-dsp:v1.5.2
In the Nextcloud Admin UI, configure a new Deploy Daemon with the following settings:
* Deployment method: docker-install
* Daemon host: http://<gpu-server-ip>:2375
* Nextcloud URL: http://<nextcloud-server-ip>
* Network: host
* Compute device: CUDA (NVIDIA)
Click the "Check connection" button (it succeeds).
Click the "Start Deploy test" button.
Expected Results
All checks work fine, app can be deployed.
Actual Results
- The "Image pull" and "Container started" steps pass, but the "Heartbeat" step fails after timing out.
- The Nextcloud log shows a
cURL error 7: Failed heartbeat on http://localhost:23001: Connection refused. Nextcloud is targeting its ownlocalhostinstead of the remote GPU server. - The deployed test container log shows the application (Uvicorn) starts successfully but is bound to
127.0.0.1on the gpu server (docker), but is not reachable externally (by the nextcloud server in this case). - The deployment ultimately fails with "Container healthcheck failed" after reaching 210 in the heartbeat counter.
- The deployed test container works. It is reachable from within the GPU server and within the container itself via
wget http://127.0.0.1:<app-port>. - Forcing the connection via a two-stage socat tunnel creates an EADDRINUSE (address already in use) error, as the tunnel and the app create a port conflict. This confirms the app is trying to bind to a port that the workaround needs to occupy.
Full line of the relevant nextcloud log:
{"reqId":"vZi5pHotqNXKauq4Ut3G","level":2,"time":"2025-07-07T09:19:57+00:00","remoteAddr":"","user":"--","app":"app_api","method":"","url":"--","message":"Failed heartbeat on http://localhost:23001 for 10 times. Most recent status=0, error: cURL error 7: Failed to connect to localhost port 23001: Connection refused (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://localhost:23001/heartbeat","userAgent":"--","version":"30.0.12.2","data":{"app":"app_api"}}
Setup configuration
Nextcloud Version = 30.0.12.2
Database = mysql/MariaDB 15.1
php = 4.2.13
HostOS = Rocky Linux 9.4 Blue Onyx
GPU and Docker HostOS = Rocky Linux 9.4
Docker Version = 28.3.0
- Lenguaje dominante
- PHP
- Estrellas
- 202
- Forks
- 30
- Merge medio
- 3 d 20 h
- PR fusionados (30 d)
- 24
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de nextcloud/app_api
-
bug docker
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Daemon delete dialog: "Remove all ExApps" checkbox and `removeExApps` parameter have no effectAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
Meta ex-app updates issueAbiertodeploy discussion
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
nextcloud/app_api#1236 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
deploy docker enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Los mantenedores suelen responder en 1 día
-
bug deploy docker
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
Los mantenedores suelen responder en 1 día
Todos los issues de nextcloud/app_api
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
Adyen/adyen-magento2#3453 ·
Los mantenedores suelen responder en 8 días
-
component/media domain/discovery
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
Los mantenedores suelen responder en 1 día
-
enhancement priority: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
magicsunday/webtrees-statistics#664 ·
Los mantenedores suelen responder en 1 día