mattermost / mattermost/mattermost-operator

"db opened", advice to get to next step?

Open
#435 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
143
Forks
90
Avg merge
5d 23h
Merged PRs (30d)
2

Description

New deployment, postgres via cloudnative-pg and minio via bitnamilegacy/minio.

The mattermost deployment gets to here:

{"timestamp":"2025-11-02 04:35:41.181 Z","level":"debug","msg":"Initializing telemetry","caller":"app/plugin_api.go:1104","plugin_id":"com.mattermost.calls","origin":"main.(*Plugin).initTelemetry telemetry.go:144"}
{"timestamp":"2025-11-02 04:35:41.182 Z","level":"debug","msg":"activating","caller":"app/plugin_api.go:1104","plugin_id":"com.mattermost.calls","origin":"main.(*Plugin).OnActivate activate.go:57"}
{"timestamp":"2025-11-02 04:35:41.191 Z","level":"debug","msg":"db opened","caller":"app/plugin_api.go:1104","plugin_id":"com.mattermost.calls","origin":"main.(*logger).Debug log.go:100","driver":"postgres","maxIdleConns":"5","maxOpenConns":"30","connMaxLifetime":"1h0m0s","connMaxIdleTime":"5m0s"}

It looks to be exiting with a return value of 2, but it could just be the health probe failing.

I'm out of ideas of what to test next. Ideas?

additional debug info

k describe pod:

    Last State:  Terminated
      Reason:    Error
      Message:   amd64.tar.gz"}
{"timestamp":"2025-11-02 18:00:57.548 Z","level":"info","msg":"Processing prepackaged plugin","caller":"app/plugin.go:1009","bundle_path":"/mattermost/prepackaged_plugins/mattermost-plugin-servicenow-v2.3.4-linux-amd64.tar.gz"}
{"timestamp":"2025-11-02 18:00:57.548 Z","level":"info","msg":"Processing prepackaged plugin","caller":"app/plugin.go:1009","bundle_path":"/mattermost/prepackaged_plugins/mattermost-plugin-mscalendar-v1.3.4-linux-amd64.tar.gz"}
{"timestamp":"2025-11-02 18:00:57.548 Z","level":"info","msg":"Processing prepackaged plugin","caller":"app/plugin.go:1009","bundle_path":"/mattermost/prepackaged_plugins/mattermost-plugin-calls-v1.9.1-linux-amd64.tar.gz"}
{"timestamp":"2025-11-02 18:00:57.548 Z","level":"info","msg":"Processing prepackaged plugin","caller":"app/plugin.go:1009","bundle_path":"/mattermost/prepackaged_plugins/mattermost-plugin-github-v2.4.0-linux-amd64.tar.gz"}
{"timestamp":"2025-11-02 18:00:57.551 Z","level":"info","msg":"Processing prepackaged plugin","caller":"app/plugin.go:1009","bundle_path":"/mattermost/prepackaged_plugins/mattermost-plugin-metrics-v0.7.0-linux-amd64.tar.gz"}
{"timestamp":"2025-11-02 18:00:57.551 Z","level":"info","msg":"Processing prepackaged plugin","caller":"app/plugin.go:1009","bundle_path":"/mattermost/prepackaged_plugins/mattermost-plugin-msteams-v2.2.1-linux-amd64.tar.gz"}
{"timestamp":"2025-11-02 18:00:57.551 Z","level":"info","msg":"Processing prepackaged plugin","caller":"app/plugin.go:1009","bundle_path":"/mattermost/prepackaged_plugins/mattermost-plugin-playbooks-v2.2.0-linux-amd64.tar.gz"}
{"timestamp":"2025-11-02 18:00:57.551 Z","level":"info","msg":"Processing prepackaged plugin","caller":"app/plugin.go:1009","bundle_path":"/mattermost/prepackaged_plugins/mattermost-plugin-gitlab-v1.10.0-linux-amd64.tar.gz"}
{"timestamp":"2025-11-02 18:00:57.555 Z","level":"info","msg":"Processing prepackaged plugin","caller":"app/plugin.go:1009","bundle_path":"/mattermost/prepackaged_plugins/mattermost-plugin-playbooks-v1.41.1-linux-amd64.tar.gz"}

      Exit Code:    2

  Warning  Unhealthy  4m15s (x43 over 9m35s)  kubelet            Readiness probe failed: Get "http://172.16.202.4:8065/api/v4/system/ping": dial tcp 172.16.202.4:8065: connect: connection refused

Chart.yaml (requires cloudnative-pg operator to be installed):

dependencies:
- name: mattermost-operator
  version: 1.0.4
  repository: https://helm.mattermost.com
- name: cluster
  version: 0.3.1
  repository: https://cloudnative-pg.github.io/charts
- name: minio
  version: 17.0.21
  repository: oci://registry-1.docker.io/bitnamicharts

values.yaml (i provide my own ingress because i need to use spec.ingressClassName):

mattermost-operator:

  mattermostCR:
    enabled: true
    name: default
    spec:
      ingress:
        enabled: "false"
        host: "mattermost.onpremredacted.net"
      image: harbor.onpremredacted.net/dockerhub/mattermost/mattermost-enterprise-edition
      version: 10.10.1
      replicas: 1
      database:
        external:
          secret: "db-secret"
      fileStore:
        external:
          url: mattermost-minio
          bucket: default
          secret: "fs-secret"

cluster:

  cluster:
    imageName: harbor.onpremredacted.net/ghcr/cloudnative-pg/postgresql:16

minio:

  image:
    repository: bitnamilegacy/minio

  clientImage:
    repository: bitnamilegacy/minio-client

  console:
    image:
      repository: bitnamilegacy/minio-object-browser

Thank you ahead of time. I've put enough time into this that I don't want to switch now to something else. I'm setting things up onprem as a way to communicate with ai agents which I'm currently deep diving. Planning to integrate with n8n etc. I can possibly submit PRs in the future when I have some time, once I get things working. Thank you again.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the pod's last termination state, Exit Code 2, container logs, and the failed readiness probe for /api/v4/system/ping. Then compare Chart.yaml and values.yaml with the mattermost-operator, CloudNativePG cluster, and MinIO configuration shown. Done means identifying the startup failure or probe cause and documenting a reproducible configuration fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
helm, kubernetes, postgresql
Domain
databases, devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.