-
Notifications
You must be signed in to change notification settings - Fork 18
Description
Describe the bug
Deployments are running 100%, however AppAPI is unable to check for heartbeat, test deployment also works, but the health check fails.
Nextcloud is running on the same machine as Docker (localhost).
Steps/Code to Reproduce
- Admin settings
- AppAPI
- Do a test deployment
Expected Results
- Heath check just work fine
Actual Results
- Heath check fails, while the test deploy container is actually running fine.
docker ps looks like this:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2d99315d324b ghcr.io/nextcloud/test-deploy:release "python3 main.py" 53 seconds ago Up 53 seconds (healthy) nc_app_test-deploy
2b2a232b7148 ghcr.io/nextcloud/nextcloud-appapi-dsp:release "/bin/bash start.sh" 5 minutes ago Up 5 minutes (healthy) 0.0.0.0:2375->2375/tcp nextcloud-appapi-dspSO actually docker ps shows HEALTHY. While Nextcloud is unable to retrieve a heartbeat for the container?
https://docs.nextcloud.com/server/latest/admin_manual/exapps_management/TestDeploy.html#heartbeat
And yes the docker image is running on the same host as Nextcloud. But of course this test will fail, if you do not expose any default port (as you can see port is fully empty) for the container ghcr.io/nextcloud/test-deploy
Or what should I have configured differently? The nextcloud log says:
ExApp test-deploy heartbeat check failed. Make sure that Nextcloud instance and ExApp can reach it other.
Executing manually via curl: http://<IP>:2375/v1.41/containers/nc_app_test-deploy/json, gives me the following info:
{
"Id": "8ef505495b22b048cdabc9a0e81cf06a9aa0a4abe8ea4c95281e2ad1f3decbe9",
"Created": "2025-02-24T22:39:49.307729551Z",
"Path": "python3",
"Args": [
"main.py"
],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 1651461,
"ExitCode": 0,
"Error": "",
"StartedAt": "2025-02-24T22:39:49.366452662Z",
"FinishedAt": "0001-01-01T00:00:00Z",
"Health": {
"Status": "healthy",
"FailingStreak": 0,
"Log": [
{
"Start": "2025-02-24T23:39:59.646730071+01:00",
"End": "2025-02-24T23:39:59.693247989+01:00",
"ExitCode": 0,
"Output": ""
},
{
"Start": "2025-02-24T23:40:01.693955365+01:00",
"End": "2025-02-24T23:40:01.735665635+01:00",
"ExitCode": 0,
"Output": ""
},
{
"Start": "2025-02-24T23:40:03.73642847+01:00",
"End": "2025-02-24T23:40:03.777381136+01:00",
"ExitCode": 0,
"Output": ""
},
{
"Start": "2025-02-24T23:40:05.77822757+01:00",
"End": "2025-02-24T23:40:05.820010528+01:00",
"ExitCode": 0,
"Output": ""
},
{
"Start": "2025-02-24T23:40:07.820645332+01:00",
"End": "2025-02-24T23:40:07.85454394+01:00",
"ExitCode": 0,
"Output": ""
}
]
}
},
"Image": "sha256:6c053cc15a3e5eb3293fadcb55efa894f42511ea7300592571f39157924d31e8",
"ResolvConfPath": "/media/data_extra/docker/231072.231072/containers/8ef505495b22b048cdabc9a0e81cf06a9aa0a4abe8ea4c95281e2ad1f3decbe9/resolv.conf",
"HostnamePath": "/media/data_extra/docker/231072.231072/containers/8ef505495b22b048cdabc9a0e81cf06a9aa0a4abe8ea4c95281e2ad1f3decbe9/hostname",
"HostsPath": "/media/data_extra/docker/231072.231072/containers/8ef505495b22b048cdabc9a0e81cf06a9aa0a4abe8ea4c95281e2ad1f3decbe9/hosts",
"LogPath": "/media/data_extra/docker/231072.231072/containers/8ef505495b22b048cdabc9a0e81cf06a9aa0a4abe8ea4c95281e2ad1f3decbe9/8ef505495b22b048cdabc9a0e81cf06a9aa0a4abe8ea4c95281e2ad1f3decbe9-json.log",
"Name": "/nc_app_test-deploy",
"RestartCount": 0,
"Driver": "overlay2",
"Platform": "linux",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "docker-default",
"ExecIDs": null,
"HostConfig": {
"Binds": null,
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {}
},
"NetworkMode": "docker_socket_proxy_external_network",
"PortBindings": null,
"RestartPolicy": {
"Name": "unless-stopped",
"MaximumRetryCount": 0
},
"AutoRemove": false,
"VolumeDriver": "",
"VolumesFrom": null,
"ConsoleSize": [
0,
0
],
"CapAdd": null,
"CapDrop": null,
"CgroupnsMode": "private",
"Dns": null,
"DnsOptions": null,
"DnsSearch": null,
"ExtraHosts": null,
"GroupAdd": null,
"IpcMode": "private",
"Cgroup": "",
"Links": null,
"OomScoreAdj": 0,
"PidMode": "",
"Privileged": false,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": null,
"UTSMode": "",
"UsernsMode": "",
"ShmSize": 67108864,
"Runtime": "runc",
"Isolation": "",
"CpuShares": 0,
"Memory": 0,
"NanoCpus": 0,
"CgroupParent": "",
"BlkioWeight": 0,
"BlkioWeightDevice": null,
"BlkioDeviceReadBps": null,
"BlkioDeviceWriteBps": null,
"BlkioDeviceReadIOps": null,
"BlkioDeviceWriteIOps": null,
"CpuPeriod": 0,
"CpuQuota": 0,
"CpuRealtimePeriod": 0,
"CpuRealtimeRuntime": 0,
"CpusetCpus": "",
"CpusetMems": "",
"Devices": null,
"DeviceCgroupRules": null,
"DeviceRequests": null,
"MemoryReservation": 0,
"MemorySwap": 0,
"MemorySwappiness": null,
"OomKillDisable": null,
"PidsLimit": null,
"Ulimits": null,
"CpuCount": 0,
"CpuPercent": 0,
"IOMaximumIOps": 0,
"IOMaximumBandwidth": 0,
"Mounts": [
{
"Type": "volume",
"Source": "nc_app_test-deploy_data",
"Target": "/nc_app_test-deploy_data"
}
],
"MaskedPaths": [
"/proc/asound",
"/proc/acpi",
"/proc/kcore",
"/proc/keys",
"/proc/latency_stats",
"/proc/timer_list",
"/proc/timer_stats",
"/proc/sched_debug",
"/proc/scsi",
"/sys/firmware",
"/sys/devices/virtual/powercap"
],
"ReadonlyPaths": [
"/proc/bus",
"/proc/fs",
"/proc/irq",
"/proc/sys",
"/proc/sysrq-trigger"
]
},
"GraphDriver": {
"Data": {
"ID": "8ef505495b22b048cdabc9a0e81cf06a9aa0a4abe8ea4c95281e2ad1f3decbe9",
"LowerDir": "/media/data_extra/docker/231072.231072/overlay2/b9a6a42f12a1f062ce247879300276bc87741987285d319722bb0dbed0458755-init/diff:/media/data_extra/docker/231072.231072/overlay2/d3e860c07e5c9e656786ad1a59f0b9f9e943cfe73ee94c633fe6c81efa444171/diff:/media/data_extra/docker/231072.231072/overlay2/e9ffde5569f1337d984fc8a07be9d56cbd0bd193d5962d94e3db941dd6613021/diff:/media/data_extra/docker/231072.231072/overlay2/a503f62ebf567592dd5f1c67e85c581726138f26a85883f10ad777668070bc0c/diff:/media/data_extra/docker/231072.231072/overlay2/a1d9da86f829a4e6e6159ad772c943d0fe2a8ac29fe9041eb7999e51393322b9/diff:/media/data_extra/docker/231072.231072/overlay2/8870c9b64d27dea095f7daa21652d10667bf900315134769a7a7eed4f5b607b3/diff:/media/data_extra/docker/231072.231072/overlay2/cc53ae637ba99beecff0500730e8a677afdc820231d6934544d111a79a615073/diff:/media/data_extra/docker/231072.231072/overlay2/7784c6bf5226e072ec4e7b693deb5ed13836d3b02f63b4c0f672d98b764fcded/diff:/media/data_extra/docker/231072.231072/overlay2/671281dccadc6978573ab9e56e8cb7a423689ffd18c314f8011699f710e0f961/diff:/media/data_extra/docker/231072.231072/overlay2/70ecb42739e218e1ec4444b9445dd7e032ebbbcf00e7708d921024041eb7cd6e/diff:/media/data_extra/docker/231072.231072/overlay2/cfa6674c0ff3d803f89f9993f7ca5ffde33dde94ff89ddfe7e90e1bee72bb407/diff:/media/data_extra/docker/231072.231072/overlay2/1860a66bd577044a1ab34ce6397b2679aecfb0bb4dab29eead838014d66fa01b/diff:/media/data_extra/docker/231072.231072/overlay2/fc354d559182916057a39fdce5b467525b69935d09219aa75bca6ca6ca848007/diff:/media/data_extra/docker/231072.231072/overlay2/596a9b7771709e20967d10205be487bff5a10dfa75dca58cc2699991f2e61ae4/diff:/media/data_extra/docker/231072.231072/overlay2/71881ac229c2cfd1ac2603664f0403c1cf91931af4b5636690af393e9bde42f1/diff:/media/data_extra/docker/231072.231072/overlay2/770c08d2c2dcfd27354e123df3c99f756884c132472ba2d20f90ecc06eeb5fcd/diff",
"MergedDir": "/media/data_extra/docker/231072.231072/overlay2/b9a6a42f12a1f062ce247879300276bc87741987285d319722bb0dbed0458755/merged",
"UpperDir": "/media/data_extra/docker/231072.231072/overlay2/b9a6a42f12a1f062ce247879300276bc87741987285d319722bb0dbed0458755/diff",
"WorkDir": "/media/data_extra/docker/231072.231072/overlay2/b9a6a42f12a1f062ce247879300276bc87741987285d319722bb0dbed0458755/work"
},
"Name": "overlay2"
},
"Mounts": [
{
"Type": "volume",
"Name": "nc_app_test-deploy_data",
"Source": "/media/data_extra/docker/231072.231072/volumes/nc_app_test-deploy_data/_data",
"Destination": "/nc_app_test-deploy_data",
"Driver": "local",
"Mode": "z",
"RW": true,
"Propagation": ""
}
],
"Config": {
"Hostname": "test-deploy",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"AA_VERSION=4.0.6",
"APP_SECRET=ZID08bqhEH1n4sNJ0ggT1DVqKHi5JEyqQpdO60TsXX+umCO3ny8BFCiPGwMewPHvjVLTSPCnDyujQTqMLk5ghMZ+Afy8gMg46P/qlWXb7WJuE2QLoNtg5PPtIwT6AC+C",
"APP_ID=test-deploy",
"APP_DISPLAY_NAME=TestDeploy",
"APP_VERSION=1.1.0",
"APP_HOST=0.0.0.0",
"APP_PORT=23001",
"APP_PERSISTENT_STORAGE=/nc_app_test-deploy_data",
"NEXTCLOUD_URL=<secret>",
"COMPUTE_DEVICE=CPU",
"PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"LANG=C.UTF-8",
"GPG_KEY=A035C8C19219BA821ECEA86B64E628F8D684696D",
"PYTHON_VERSION=3.11.11",
"PYTHON_SHA256=2a9920c7a0cd236de33644ed980a13cbbc21058bfdc528febb6081575ed73be3"
],
"Cmd": null,
"Healthcheck": {
"Test": [
"CMD-SHELL",
"/healthcheck.sh"
],
"Interval": 2000000000,
"Timeout": 2000000000,
"Retries": 300
},
"Image": "ghcr.io/nextcloud/test-deploy:release",
"Volumes": null,
"WorkingDir": "/ex_app/lib",
"Entrypoint": [
"python3",
"main.py"
],
"OnBuild": null,
"Labels": {}
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "982afd10a8bdbb31b02ac112d4e1688964b1656fd9b03874d9f38dfe391efcb2",
"SandboxKey": "/var/run/docker/netns/982afd10a8bd",
"Ports": {},
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "",
"Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"MacAddress": "",
"Networks": {
"docker_socket_proxy_external_network": {
"IPAMConfig": null,
"Links": null,
"Aliases": [
"test-deploy",
"8ef505495b22"
],
"MacAddress": "2e:ec:6a:64:a5:ef",
"DriverOpts": null,
"GwPriority": 0,
"NetworkID": "1b79bfdb1db441180ad6c43c833e59e2736d50c8ecf99d341bc80697c87dba47",
"EndpointID": "9fff88a70f529492f41dd89fb563f24baac36b078515b19ef1fdb60bbc784955",
"Gateway": "10.254.10.129",
"IPAddress": "10.254.10.132",
"IPPrefixLen": 25,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"DNSNames": [
"nc_app_test-deploy",
"test-deploy",
"8ef505495b22"
]
}
}
}
}So what is the problem?
How does Nextcloud AppAPI check the container heartbeat? Why would it fail in my case? Since the docker containers are running fine!
Setup configuration
Nextcloud Hub 9 (30.0.6)AppAPI v4.0.6Docker version 28.0.0, build f9ced58Linux ubuntu-server 6.8.0-53-generic #55-Ubuntu SMP PREEMPT_DYNAMIC Fri Jan 17 15:37:52 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
