cloud-py-api / app_api

Nextcloud AppAPI
https://apps.nextcloud.com/apps/app_api
GNU Affero General Public License v3.0
65 stars 7 forks source link

Fail to pull image with 504 Gateway time-out and can not report the ExApp status #325

Closed aef5748 closed 1 month ago

aef5748 commented 1 month ago

Describe the bug

I got two problems as below when I test deploy:

  1. Can not pull image with 504 Gatewa time-out

    Failed to pull image, GuzzleException occur: Server error: `POST http://nextcloud-appapi-dsp:2375/v1.41/images/create?fromImage=ghcr.io%2Fcloud-py-api%2Ftest-deploy%3Arelease` resulted in a `504 Gateway Time-out` response

    Screenshot from 2024-07-12 16-04-02

  2. Can't report the ExApp status to the Nextcloud instance.

    
    TRACE:    172.18.0.4:54590 - HTTP connection lost
    Try default url to report the init status: http://192.168.2.15:3000
    [408] <request: PUT /ocs/v1.php/apps/app_api/apps/status/test-deploy>

ERROR occurred! Can't report the ExApp status to the Nextcloud instance. TRACE: 172.18.0.4:54590 - ASGI [3] Completed

for detail in log file:
[nc_app_test-deploy_logs.txt](https://github.com/user-attachments/files/16190829/nc_app_test-deploy_logs.txt)

---
What can I do to solve them?

### Steps/Code to Reproduce

1. Install AppAPI
2. Setup docker socket proxy
3. Setup deploy daemons
4. Press Test deploy

### Expected Results

No error after test deploy

### Actual Results

1. Can not pull image with 504 gateway timeout
2. Can't report the ExApp status to the Nextcloud instance.

### Setup configuration

docker-compose

version: '3.7' networks: nextcloud: name: nextcloud_proxy driver: bridge

volumes: nexecloud: db: appapi:

services: db: image: postgres:12-alpine container_name: Nextcloud-DB restart: always volumes:

AppApi config

ExApps installed: 1
Name: docker_socket_proxy
Protocol: http
Host: nextcloud-appapi-dsp:2375

Deploy config
Docker network: nextcloud_proxy
Nextcloud URL: http://192.168.2.15:3000
HaProxy password: nextcloud
GPUs support: false
Compute device: CPU
andrey18106 commented 1 month ago

@aef5748 HI! Did I understood correctly, that there are two errors occurred, first time failed to pull image, but later it was successful, but failed to reach out to Nextcloud?

aef5748 commented 1 month ago

Hi @andrey18106 Yes, here 2 errors occurred. When the appapi could not pull the image, I tried to pull the image from the cloud via docker pull, but still shows can not pull the image. So I clone the cloud-py-api/test-deploy and then build it myself.

I retested and deployed it from appapi, but it still shows that I can not pull the image. Then I retried removing ports on the nextcloud-appapi-dsp container but got the same error. I don't know what happened after several retries it can be passed. I saw it pull the cloud-py-api/test-deploy-cpu image and deploy it not cloud-py-api/test-deploy.

But the initialization phase got another error message "Can't report the ExApp status to the Nextcloud instance.". The nextcloud container can be passed by ping from nextcloud-appapi-dsp. so the network is workable.

aef5748 commented 1 month ago

How should I solve it?

aef5748 commented 1 month ago

After update Appapi v3.0.0, it can be solved.