You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
After deployment of ExApp "Test Deploy" infinite loop at Heartbeat #439
IP 127.0.0.1 = localhost and it is on the same machine.
There is not any firewall and connection is OK.
I got logs entries in podman from health requests: May 28 15:38:48 "GET /v1.41/containers/nc_app_test-deploy/json HTTP/1.1" 200 6743 "" "GuzzleHttp/7"
I also create simple php test in webroot directory where is Nextcloud installed: file_get_contents('http://127.0.0.1:23000/v1.41/containers/nc_app_test-deploy/json')
and got this answer: file_get_contents(http://127.0.0.1:23000/v1.41/containers/nc_app_test-deploy/json): Failed to open stream: HTTP request failed! HTTP/1.1 401 Unauthorized
So, the connection look like good. I don't have good authentication for my simple test.
In webdeveloper I see a lot of requests for health checking on url /index.php/apps/app_api/daemons/docker_local/test_deploy/status with code 200 and this content:
In webdeveloper I see a lot of requests for health checking on url /index.php/apps/app_api/daemons/docker_local/test_deploy/status with code 200 and this content:
That is not related, it is a frontend request to the Nextcloud instance...
From what I see, the configuration seems to be correct. We are testing something similar on GitHub actions (there is only no DSP, but direct access to the socket, but it shouldn't play a role):
grep -q 'Hello from app-skeleton-python :)' data/nextcloud.log || error
grep -q 'Bye bye from app-skeleton-python :(' data/nextcloud.log || error
{"reqId":"F5XoF8qtwL9dX8epU4mg","level":2,"time":"2025-05-28T14:33:15+00:00","remoteAddr":"","user":"--","app":"app_api","method":"","url":"--","message":"Failed to update certificates in container: nc_app_test-deploy. Error: Client error: POST http://127.0.0.1:2375/v1.41/containers/nc_app_test-deploy/exec resulted in a 403 Forbidden response:\n
403 Forbidden
\nRequest forbidden by administrative rules.\n\n\n","userAgent":"--","version":"31.0.5.1","data":{"app":"app_api"}}
This error is not critical (although it should not be with the latest version of DockerSocketProxy) - so it is still strange to see it.
But we see that the container is created after this error.
I test curl 'http://127.0.0.1:23000:/heartbeat' and it return {"status":"ok"}
Web browser, when i click on "deploy test", generate POST request to /index.php/apps/app_api/daemons/ecn_docker_local/test_deploy which end after 10 min with status code 500
There is no tcp communcitaion to port 23000
I dump tcp communication to 2375 port:
4 0.000092324 127.0.0.1 → 127.0.0.1 HTTP 319 POST /v1.41/images/create?fromImage=ghcr.io%2Fnextcloud%2Ftest-deploy%3Arelease-cpu HTTP/1.1
6 0.553782175 127.0.0.1 → 127.0.0.1 HTTP 334 HTTP/1.1 404 Not Found
12 0.566455621 127.0.0.1 → 127.0.0.1 HTTP 319 POST /v1.41/images/create?fromImage=ghcr.io%2Fnextcloud%2Ftest-deploy-cpu%3Arelease HTTP/1.1
15 0.883537454 127.0.0.1 → 127.0.0.1 HTTP 404 HTTP/1.1 500 Internal Server Error
23 0.885118877 127.0.0.1 → 127.0.0.1 HTTP 315 POST /v1.41/images/create?fromImage=ghcr.io%2Fnextcloud%2Ftest-deploy%3Arelease HTTP/1.1
26 1.748537339 127.0.0.1 → 127.0.0.1 HTTP 1766 HTTP/1.1 200 OK
36 1.770399468 127.0.0.1 → 127.0.0.1 HTTP 243 GET /v1.41/containers/nc_app_test-deploy/json HTTP/1.1
37 1.778630522 127.0.0.1 → 127.0.0.1 HTTP 432 HTTP/1.1 404 Not Found (application/json)
39 1.787531455 127.0.0.1 → 127.0.0.1 HTTP 310 POST /v1.41/volumes/create HTTP/1.1 (application/json)
40 1.796137263 127.0.0.1 → 127.0.0.1 HTTP 510 HTTP/1.1 201 Created (application/json)
41 1.796451614 127.0.0.1 → 127.0.0.1 HTTP 971 POST /v1.41/containers/create?name=nc_app_test-deploy HTTP/1.1 (application/json)
42 1.823361573 127.0.0.1 → 127.0.0.1 HTTP 383 HTTP/1.1 201 Created (application/json)
43 1.828053544 127.0.0.1 → 127.0.0.1 HTTP 264 POST /v1.41/containers/nc_app_test-deploy/start HTTP/1.1
45 1.980618987 127.0.0.1 → 127.0.0.1 HTTP 246 HTTP/1.1 204 No Content
46 1.981273067 127.0.0.1 → 127.0.0.1 HTTP 371 POST /v1.41/containers/nc_app_test-deploy/exec HTTP/1.1 (application/json)
48 1.992825104 127.0.0.1 → 127.0.0.1 HTTP 369 HTTP/1.1 201 Created (application/json)
49 1.993453285 127.0.0.1 → 127.0.0.1 HTTP 365 POST /v1.41/exec/bd520a33441d4979cecb8a19859c74cf3e69f118918ffc31c0d5bc3e21e5a574/start HTTP/1.1 (application/json)
50 2.006584160 127.0.0.1 → 127.0.0.1 TCP 153 HTTP/1.1 200 OK [TCP segment of a reassembled PDU]
54 2.078008493 127.0.0.1 → 127.0.0.1 HTTP 66 HTTP/1.1 200 OK (application/vnd.docker.raw-stream)
60 2.093031305 127.0.0.1 → 127.0.0.1 HTTP 398 POST /v1.41/containers/nc_app_test-deploy/exec HTTP/1.1 (application/json)
61 2.104051172 127.0.0.1 → 127.0.0.1 HTTP 369 HTTP/1.1 201 Created (application/json)
63 2.104421568 127.0.0.1 → 127.0.0.1 HTTP 365 POST /v1.41/exec/5e84c0e346f9056512be3b05fd62ee922b072865a1f3b6aebc4c493929d53f65/start HTTP/1.1 (application/json)
64 2.116492110 127.0.0.1 → 127.0.0.1 TCP 153 HTTP/1.1 200 OK [TCP segment of a reassembled PDU]
66 2.162978581 127.0.0.1 → 127.0.0.1 HTTP 66 HTTP/1.1 200 OK
72 2.168139544 127.0.0.1 → 127.0.0.1 HTTP 3382 PUT /v1.41/containers/nc_app_test-deploy/archive?path=%2F HTTP/1.1 (application/x-tar)
74 2.196193303 127.0.0.1 → 127.0.0.1 HTTP 257 HTTP/1.1 200 OK
And than there are a lot of repeated requests like this:
I don't known, why there is nothing in log, but I find the problem. Thank you for your help.
Function healthcheckContainer is looking for ['State']['Health']['Status'] === 'healthy' in json answer from GET /v1.41/containers/nc_app_test-deploy/json.
Activity
trisosamu commentedon Dec 9, 2024
same problem
oleksandr-nc commentedon May 9, 2025
Please retry with the latest version of Nextcloud/AppAPI.
And we need logs for
test-deploycontainer(there is button in UI to get them)jirireischig commentedon May 28, 2025
I have latest Version of AppAPI 5.0.2.
Logs for test-deploy:
oleksandr-nc commentedon May 28, 2025
I assume that the ExApps are installed on the remote machine (judging by this
Uvicorn running on http://127.0.0.1:23000)And looks like Nextcloud instance could not connect to it (to DSP container, where HaProxy is listening on the
0.0.0.0:23000port)To help configure your setup we need additional information:
jirireischig commentedon May 28, 2025
IP 127.0.0.1 = localhost and it is on the same machine.
There is not any firewall and connection is OK.
I got logs entries in podman from health requests:
May 28 15:38:48 "GET /v1.41/containers/nc_app_test-deploy/json HTTP/1.1" 200 6743 "" "GuzzleHttp/7"I also create simple php test in webroot directory where is Nextcloud installed:
file_get_contents('http://127.0.0.1:23000/v1.41/containers/nc_app_test-deploy/json')and got this answer:
file_get_contents(http://127.0.0.1:23000/v1.41/containers/nc_app_test-deploy/json): Failed to open stream: HTTP request failed! HTTP/1.1 401 UnauthorizedSo, the connection look like good. I don't have good authentication for my simple test.
oleksandr-nc commentedon May 28, 2025
This is a connection from the Nextcloud to the Docker Engine.
Can you share Nextcloud logs for the Test Deploy action? There should be string that shows to which address AppAPI tries to connect to reach ExApp.
jirireischig commentedon May 28, 2025
In webdeveloper I see a lot of requests for health checking on url
/index.php/apps/app_api/daemons/docker_local/test_deploy/statuswith code 200 and this content:oleksandr-nc commentedon May 28, 2025
That is not related, it is a frontend request to the Nextcloud instance...
jirireischig commentedon May 28, 2025
I'm sorry, but I don't have any log entry in data/nextcloud.log file.
6 remaining items
oleksandr-nc commentedon May 29, 2025
To summurize what we have:
network=hoston the same machine where Nextcloud is.Docker networkin the Deploy Daemon configuration in the AppAPI ishost.Is this all correct?
jirireischig commentedon May 29, 2025
Yes it is.
oleksandr-nc commentedon May 30, 2025
And forgot to ask: I assume the "Enable https" checkbox in the Deploy Daemon configuration is unchecked?
jirireischig commentedon May 30, 2025
Yes it is unchecked.
oleksandr-nc commentedon May 30, 2025
From what I see, the configuration seems to be correct. We are testing something similar on GitHub actions (there is only no DSP, but direct access to the socket, but it shouldn't play a role):
app_api/.github/workflows/tests-deploy.yml
Lines 867 to 947 in 88a34cf
This error is not critical (although it should not be with the latest version of DockerSocketProxy) - so it is still strange to see it.
But we see that the container is created after this error.
After creating the container, AppAPI should send a request to the ExApp public endpoint `http://127.0.0.1:23000:/heartbeat'
But from the logs of
test-deploycontainer you provided I do not see that this happen, and either there is no such records innextcloud.logCan you click "Test Deploy" again and then do
curl 'http://127.0.0.1:23000:/heartbeat'from the host?It should return
{"status":"ok"}jirireischig commentedon May 30, 2025
I test
curl 'http://127.0.0.1:23000:/heartbeat'and it return{"status":"ok"}Web browser, when i click on "deploy test", generate POST request to
/index.php/apps/app_api/daemons/ecn_docker_local/test_deploywhich end after 10 min with status code500There is no tcp communcitaion to port 23000
I dump tcp communication to 2375 port:
And than there are a lot of repeated requests like this:
oleksandr-nc commentedon May 30, 2025
Can you post requests that comes after them?
Or you can comment this line to disable those requests, as they are not needed in your setup (we probably should do them as an option).
jirireischig commentedon May 30, 2025
Another test look like this:
oleksandr-nc commentedon Jun 3, 2025
I have a hard time understanding what is going on and why some entries are missing from the logs.
Here is the part of the source code we need:
app_api/lib/Command/ExApp/Register.php
Lines 169 to 222 in f762e59
We see requests in a circle:
HTTP 243 GET /v1.41/containers/nc_app_test-deploy/json HTTP/1.1As far as I understand, everything fails in this functions:
app_api/lib/DeployActions/DockerActions.php
Lines 804 to 826 in f762e59
Why then we do not see the lines
Container healthcheck failed.in the log or console - I do not understand..jirireischig commentedon Jun 3, 2025
I don't known, why there is nothing in log, but I find the problem. Thank you for your help.
Function
healthcheckContaineris looking for['State']['Health']['Status'] === 'healthy'in json answer fromGET /v1.41/containers/nc_app_test-deploy/json.But this is empty:
I don't known if it is differences between Docker and Podman or it's depending on version or ???
Simple dirty solution is add one more test to the function like this:
oleksandr-nc commentedon Jun 4, 2025
Thanks a lot to you for helping triaging this.