bitnami / charts

Bitnami Helm Charts
https://bitnami.com
Other
8.9k stars 9.17k forks source link

[bitnami/rabbitmq] readiness and liveness probes failing with default settings #20938

Closed aneesh1646 closed 10 months ago

aneesh1646 commented 10 months ago

Name and Version

bitnami/RabbitMQ 12.4.2

What architecture are you using?

amd64

What steps will reproduce the bug?

install the helm with minimal required values and the probes failing since it is getting a 404 error for the below configuration

      livenessProbe:
        exec:
          command:
            - sh
            - '-ec'
            - >-
              curl -f --user codeless:$RABBITMQ_PASSWORD
              127.0.0.1:15672/api/health/checks/virtual-hosts
        initialDelaySeconds: 120
        timeoutSeconds: 20
        periodSeconds: 30
        successThreshold: 1
        failureThreshold: 6
      readinessProbe:
        exec:
          command:
            - sh
            - '-ec'
            - >-
              curl -f --user codeless:$RABBITMQ_PASSWORD
              127.0.0.1:15672/api/health/checks/local-alarms

Are you using any custom parameters or values?

replicaCount: 3
auth:
  username: *****
  password: ******
communityPlugins: https://github.com/rabbitmq/rabbitmq-delayed-message-exchange/releases/download/v3.12.0/rabbitmq_delayed_message_exchange-3.12.0.ez
extraPlugins: rabbitmq_delayed_message_exchange
extraConfiguration: |-
   management.path_prefix = /RabbitMQ
volumePermissions:
  enabled: true
nodeSelector: 
  kubernetes.io/os: linux
tolerations: 
  - effect: NoSchedule
    key: cattle.io/os
    operator: Equal
    value: linux
ingress:
  enabled: false
image:
  tag: 3.12.8
  pullPolicy: Always
clustering:
  enabled: true

What is the expected behavior?

the pods should be up and running

What do you see instead?

probes fail with the error

Liveness probe failed: % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 curl: (22) The requested URL returned error: 404 Not Found

Readiness probe failed: % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 curl: (22) The requested URL returned error: 404 Not Found

Additional information

the curl commands if I check manually also it shows 404 but when I add https In front of it it shows different error curl-35-error1408f10bssl-routinesssl3-get-recordwrong-version-number

aneesh1646 commented 10 months ago

if I edit the statefulset and use the old probe settings as below

          livenessProbe:
            exec:
              command:
                - /bin/bash
                - '-ec'
                - rabbitmq-diagnostics -q ping
            initialDelaySeconds: 120
            timeoutSeconds: 20
            periodSeconds: 30
            successThreshold: 1
            failureThreshold: 6
          readinessProbe:
            exec:
              command:
                - /bin/bash
                - '-ec'
                - >-
                  rabbitmq-diagnostics -q check_running && rabbitmq-diagnostics
                  -q check_local_alarms

everything is working fine is it an issue with the new curl URL? or Do I need to enable any features or values etc.

javsalgar commented 10 months ago

It seems to me that it could be an issue here

extraConfiguration: |-
   management.path_prefix = /RabbitMQ

Could you try without that setting?

aneesh1646 commented 10 months ago

Its the same the probes are failing even after removing the extra configuration. but when I use the old checks as below in values file it is working

customLivenessProbe:
  exec:
    command:
      - /bin/bash
      - '-ec'
      - rabbitmq-diagnostics -q ping
  initialDelaySeconds: 120
  timeoutSeconds: 20
  periodSeconds: 30
  successThreshold: 1
  failureThreshold: 6
customReadinessProbe:
  exec:
    command:
      - /bin/bash
      - '-ec'
      - >-
       rabbitmq-diagnostics -q check_running && rabbitmq-diagnostics
       -q check_local_alarms
  initialDelaySeconds: 10
  timeoutSeconds: 20
  periodSeconds: 30
  successThreshold: 1
  failureThreshold: 3 
github-actions[bot] commented 10 months ago

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

github-actions[bot] commented 10 months ago

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.

Evsio0n commented 9 months ago

this is a problem and needed to be fixed. Please continue in-progess.

Evsio0n commented 9 months ago

Its the same the probes are failing even after removing the extra configuration. but when I use the old checks as below in values file it is working

For my part. https://github.com/bitnami/charts/issues/20938#issuecomment-1815787805 solved the problem.

My helmfile:

helmfile.yml


- name: service-postgresql
  namespace: service-backend
  chart: bitnami/postgresql
  labels:
    name: service-postgresql
  values:
    - postgresql-value.yaml.gotmpl

postgresql-value.yaml.gotmpl

replicaCount: 1

auth:
  username: {{ requiredEnv "RABBITMQ_DEFAULT_USER"}}
  password: {{ requiredEnv "RABBITMQ_DEFAULT_PASS"}}
  securePassword: true
  erlangCookie: {{ requiredEnv "RABBITMQ_ERLANG_COOKIE" }}

clustering:
  partitionHandling: pause_minority
clusterDomain: {{ requiredEnv "KUBERNETES_CLUSTER_DOMAIN"}}
petes05 commented 6 months ago

It seems to me that it could be an issue here

extraConfiguration: |-
   management.path_prefix = /RabbitMQ

Could you try without that setting?

I had this same problem and this was indeed the issue. Thanks for pointing me in the right direction.

To get it working I've configured these custom probes - exactly the same as the defaults but with the '/rabbitmq' path prefix included:

customReadinessProbe:
  exec:
    command:
      - sh
      - '-ec'
      - >-
        curl -f --user user:$RABBITMQ_PASSWORD
        127.0.0.1:15672/rabbitmq/api/health/checks/local-alarms
customLivenessProbe:
  exec:
    command:
      - sh
      - '-ec'
      - >-
        curl -f --user user:$RABBITMQ_PASSWORD
        127.0.0.1:15672/rabbitmq/api/health/checks/virtual-hosts