[stable/nextcloud] connect() failed (111: Connection refused) while connecting to upstream, client: x.x.x.x, server: , request: "GET /status.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "nc.xxxx.com"

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Not sure if this is the right place to ask for issues with nextcloud in kubernetes

Nextcloud version (eg, 12.0.2): 17

The issue you are facing:

Deployment with helm chart stable/nextcloud fails

kubectl -n nextcloud logs nextcloud-74b56fb9dd-c4smn nextcloud-nginx
2020/04/15 19:03:54 [error] 9#9: *3 connect() failed (111: Connection refused) while connecting to upstream, client: x.x.x.x, server: , request: "GET /status.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "nc.xxxx.com"
2020/04/15 19:03:54 [error] 7#7: *2 connect() failed (111: Connection refused) while connecting to upstream, client: x.x.x.x, server: , request: "GET /status.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "nc.xxxx.com"
x.x.x.x - - [15/Apr/2020:19:03:54 +0000] "GET /status.php HTTP/1.1" 502 157 "-" "kube-probe/1.17" "-"
x.x.x.x - - [15/Apr/2020:19:03:54 +0000] "GET /status.php HTTP/1.1" 502 157 "-" "kube-probe/1.17" "-"
x.x.x.x - - [15/Apr/2020:19:03:54 +0000] "GET /status.php HTTP/1.1" 499 0 "-" "kube-probe/1.17" "-"

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Provide a custom helm values.yaml (see bug report for details)
  2. Install helm chart
     helm install nextcloud stable/nextcloud --namespace nextcloud -f nextcloud.values.yml
    

I’ve opened a bug report here for details

Hey,
The last time I have seen this error, I uncommented the line
server unix:/var/run/php/php7.3-fpm.sock; in nginx configuration and it was ok.

Well the config does not include this statement

 upstream php-handler {
    server 127.0.0.1:9000;
}

see https://github.com/helm/charts/blob/master/stable/nextcloud/templates/nginx-config.yaml

Try to add :

 upstream php-handler {
    server 127.0.0.1:9000;
    server unix:/var/run/php/php7.3-fpm.sock;
}

Before, check your php version (7.2 or 7.3) for exemple with :
sudo systemctl status php7*