nextcloud / helm

A community maintained helm chart for deploying Nextcloud on Kubernetes.
GNU Affero General Public License v3.0
334 stars 269 forks source link

Unable to Deploy Helm with Latest Image #112

Open ch8zer opened 3 years ago

ch8zer commented 3 years ago

I've been trying to deploy the chart with the latest image, but haven't been able to do so successfully. What happens is the app is deployed, but I get the following (from the browser):

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

Looking at the logs:

Configuring Redis as session handler
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 10.42.2.113
. Set the 'ServerName' directive globally to suppress this message
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 10.42.2.113
. Set the 'ServerName' directive globally to suppress this message
[Thu Apr 29 23:06:33.539895 2021] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.38 (Debian) PHP/7.4.16
configured -- resuming normal operations
[Thu Apr 29 23:06:33.540056 2021] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
10.42.1.44 - - [29/Apr/2021:23:06:47 +0000] "GET /index.php HTTP/1.1" 500 717 "-" "Mozilla/5.0 (X11; Linux
 x86_64; rv:88.0) Gecko/20100101 Firefox/88.0"
10.42.1.44 - - [29/Apr/2021:23:06:47 +0000] "GET /favicon.ico HTTP/1.1" 500 717 "-" "Mozilla/5.0 (X11; Lin
ux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0"

I've been combing past posts, and the docs. I've tried enabling huge pages, and anything else that I found but I can't find the root cause of this issue.

I've also tried port-forwarding as the documentation suggests.

Is this a bug known with the latest image?

Here is my PVC:

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: cloud-pvc
  namespace: lab
  labels:
    app: media
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 10Gi

My values.yaml, deployed with helm install cloud nextcloud/nextcloud --namespace lab --values values.yaml

 image:
  repository: nextcloud
  tag: stable-apache
  pullPolicy: Always

ingress:
  enabled: true
  annotations:
    kubernetes.io/ingress.class: traefik
    cert-manager.io/cluster-issuer: letsencrypt-example
    traefik.ingress.kubernetes.io/frontend-entry-points: http,https
  hosts:
    - host: cloud.example.com
      paths:
      - path: /
  tls:
  - secretName: cloud-tls
    hosts:
      - cloud.example.com

nextcloud:
  host: cloud.example.com
  username: admin
  password: changeme
  update: 0

internalDatabase:
  enabled: false
  name: nextcloud

externalDatabase:
  enabled: true
  type: postgresql
  host: postgres.lab.svc.cluster.local:5432
  user: cloud
  password: cloud
  database: clouddb
  existingSecret:
    enabled: false

redis:
  enabled: true
  usePassword: false

service:
  type: ClusterIP
  port: 80
  loadBalancerIP: nil
  nodePort: nil

persistence:
  # Nextcloud Data (/var/www/html)
  enabled: true
  annotations: {}
  existingClaim: cloud-pvc
  accessMode: ReadWriteOnce
  size: 10Gi
ch8zer commented 3 years ago

Just to try and root cause the issue:

I'm running on k3s

steled commented 3 years ago

I could fix the problem AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 10.42.2.113 . Set the 'ServerName' directive globally to suppress this message with the following lines at my values.yaml file:

lifecycle:
  postStartCommand: ["/bin/sh", "-c", "echo \"ServerName 172.16.4.35\" | tee -a /etc/apache2/apache2.conf"]

172.16.4.35 is the IP from metalLB Maybe this can help you.

ejaros commented 3 years ago

I am experiencing this same issue, using the stable image tag. I get 500 responses but no errors or useful information in the logs.

evatikiotis commented 2 years ago

same for me

denppa commented 1 month ago

I suggest trying the vanilla helm installation and then add on the values.yml one by one to see which one breaks it.