nextcloud / all-in-one

📦 The official Nextcloud installation method. Provides easy deployment and maintenance with most features included in this one Nextcloud instance.
https://hub.docker.com/r/nextcloud/all-in-one
GNU Affero General Public License v3.0
5.07k stars 587 forks source link

push server failing to connect #5026

Closed melbruki closed 1 month ago

melbruki commented 1 month ago

I have setup nextcloud aio in kubernetes, everything was working perfectly for 2 months then suddenly my files stopped coming through, I am able to login through the web and all my files are there. The push server is resolving to this ::1 instead of the actual ip address of the pod, I have a single stack ipv4 network. I am not using a reverse proxy , I have a public ip address directly on the apache port of 443. below is a self test from push. I did a test connection using the test push client, it gave me the following error


[2024-07-22 12:15:09.995455 -07:00] INFO [test_client] test_client/src/main.rs:70: Received: Authentication timeout
Error:   x WebSocket protocol error: Connection reset without closing handshake
  `-> Connection reset without closing handshake

however i was sure that the credentials were correct, so i did a push self test in nextcloud pod , below is what i received


Warning: Failed to set memory limit to 0 bytes (Current memory usage is 2097152 bytes) in Unknown on line 0
The current PHP memory limit is below the recommended value of 512MB.
✓ redis is configured
✓ push server is receiving redis messages
✓ push server can load mount info from database
✓ push server can connect to the Nextcloud server
🗴 push server is not a trusted proxy by Nextcloud or another proxy in the chain.
  Nextcloud resolved the following client address for the test request: "::1" instead of the expected "1.2.3.4"
  The following trusted proxies are currently configured: "127.0.0.1", "::1", "10.244.4.0/24", "10.99.242.1/32"
  The following x-forwarded-for header was received by Nextcloud: "10.244.4.6"
    from the following remote: ::1

✓ All proxies in the chain appear to be trusted by Nextcloud
  One of the proxies is the chain (probably 10.244.4.6) seems to have stripped the x-forwarded-for header
  Please configure the reverse proxy at 10.244.4.6 to not strip the x-forwarded-for header

  If you're having issues getting the trusted proxy setup working, you can try bypassing any existing reverse proxy
  in your setup by setting the `NEXTCLOUD_URL` environment variable to point directly to the internal Nextcloud webserver url
  (You will still need the ip address of the push server added as trusted proxy)
nextcloud-aio-nextcloud-84c94c8d9c-q258z:/var/www/html# 
NAME                                            READY   STATUS    RESTARTS   AGE   IP             NODE            NOMINATED NODE   READINESS GATES
nextcloud-aio-apache-86cb4774f7-d6628           1/1     Running   0          22d   10.244.4.31    talos-fa1-gf4   <none>           <none>
nextcloud-aio-collabora-6657d56bd6-lz48m        1/1     Running   0          22d   10.244.4.159   talos-fa1-gf4   <none>           <none>
nextcloud-aio-database-6d6dd56565-5mlwm         1/1     Running   0          22d   10.244.3.13    talos-2m3-rai   <none>           <none>
nextcloud-aio-fulltextsearch-7b66db7b94-5ht72   1/1     Running   0          22d   10.244.4.216   talos-fa1-gf4   <none>           <none>
nextcloud-aio-nextcloud-84c94c8d9c-q258z        1/1     Running   0          22d   10.244.4.14    talos-fa1-gf4   <none>           <none>
nextcloud-aio-notify-push-98bfbbdd6-4578v       1/1     Running   0          26m   10.244.4.6     talos-fa1-gf4   <none>           <none>
nextcloud-aio-redis-65dd49dc78-tbh59            1/1     Running   0          22d   10.244.3.242   talos-2m3-rai   <none>           <none>
nextcloud-aio-talk-b57f8b967-vjk9f              1/1     Running   0          22d   10.244.4.100   talos-fa1-gf4   <none>           <none>
root@ip-172-26-1-22:/home/ubuntu# 
szaimen commented 1 month ago

Hi, which AIO version is this? Can you upgrade to at least v9.1.0 and check if that fixes things?

melbruki commented 1 month ago

I am on version 28.0.5 of nextcloud and I believe that corresponds with aio version 8.2 if I'm not mistaken I don't want to upgrade to version 29 just yet

szaimen commented 1 month ago

All right. Moving to discussions then since I am pretty sure that it is fixed with v9.1.0 and above