Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bitnami/matomo] Cronjobs fail to run because of a missing certificate file #24618

Closed
JaZo opened this issue Mar 22, 2024 · 7 comments
Closed
Assignees
Labels
matomo solved tech-issues The user has a technical issue about an application

Comments

@JaZo
Copy link

JaZo commented Mar 22, 2024

Name and Version

bitnami/matomo 6.0.0

What architecture are you using?

amd64

What steps will reproduce the bug?

  1. Set up a Matomo instance
  2. Wait for the cronjobs to start or trigger them
  3. See they fail to run (see logs below)

Are you using any custom parameters or values?

matomoWebsiteHost: XXX

service:
  type: ClusterIP

ingress:
  enabled: true
  hostname: XXX

mariadb:
  enabled: false

externalDatabase:
  # Properly configured

volumePermissions:
  enabled: true

What is the expected behavior?

I'd expect both cronjobs to run successfully.

What do you see instead?

matomo 10:51:42.08 INFO  ==> Configuring PHP options
matomo 10:51:42.09 INFO  ==> Setting PHP opcache.enable option
matomo 10:51:42.10 INFO  ==> Setting PHP expose_php option
matomo 10:51:42.10 INFO  ==> Setting PHP output_buffering option
matomo 10:51:42.12 INFO  ==> Validating settings in MYSQL_CLIENT_* env vars
matomo 10:51:42.14 DEBUG ==> Validating settings in MATOMO_* environment variables...
matomo 10:51:42.15 WARN  ==> The MATOMO_SMTP_USER environment variable is empty or not set.
matomo 10:51:42.15 WARN  ==> The MATOMO_SMTP_PASSWORD environment variable is empty or not set.
matomo 10:51:42.20 INFO  ==> Ensuring Matomo directories exist
matomo 10:51:42.21 INFO  ==> Trying to connect to the database server
matomo 10:51:42.21 DEBUG ==> Executing SQL command:
SELECT 1
1
matomo 10:51:42.27 INFO  ==> Starting apache in background
AH00526: Syntax error on line 5 of /opt/bitnami/apache/conf/vhosts/matomo-https-vhost.conf:
SSLCertificateFile: file '/opt/bitnami/apache/conf/bitnami/certs/server.crt' does not exist or is empty

Additional information

It works just fine with version 5.5.1.

@JaZo JaZo added the tech-issues The user has a technical issue about an application label Mar 22, 2024
@github-actions github-actions bot added the triage Triage is needed label Mar 22, 2024
@cruggieri
Copy link

Same issue here:

AH00526: Syntax error on line 5 of /opt/bitnami/apache/conf/vhosts/matomo-https-vhost.conf:
SSLCertificateFile: file '/opt/bitnami/apache/conf/bitnami/certs/server.crt' does not exist or is empty

@github-actions github-actions bot removed the triage Triage is needed label Mar 26, 2024
@github-actions github-actions bot assigned aoterolorenzo and unassigned javsalgar Mar 26, 2024
@bpresles
Copy link

Hello,

I got the same issue, it seems that the cron jobs containers are starting Apache briefly and that Apache configuration is looking for the SSL certificates to be present.

But the default command used for these containers doesn't include the apache setup script (/opt/bitnami/scripts/apache/setup.sh) which in the main matomo container is responsible to generate the certificates in /opt/bitname/apache/conf/bitnami/certs/.

A workaround consist of adding this script in the script list of the command arguments using Values.cronjobs.taskScheduler.arg and Values.cronjobs.archive.args values:

cronjobs:
  taskScheduler:
      args:
        - . /opt/bitnami/scripts/matomo-env.sh &&
          . /opt/bitnami/scripts/libbitnami.sh &&
          . /opt/bitnami/scripts/liblog.sh &&
          /opt/bitnami/scripts/apache/setup.sh &&
          /opt/bitnami/scripts/php/setup.sh &&
          /opt/bitnami/scripts/mysql-client/setup.sh &&
          /opt/bitnami/scripts/matomo/setup.sh &&
          /post-init.sh &&
          /opt/bitnami/php/bin/php /opt/bitnami/matomo/console core:run-scheduled-tasks
  archive:
    args:
      - . /opt/bitnami/scripts/matomo-env.sh &&
        . /opt/bitnami/scripts/libbitnami.sh &&
        . /opt/bitnami/scripts/liblog.sh &&
        /opt/bitnami/scripts/apache/setup.sh &&
        /opt/bitnami/scripts/php/setup.sh &&
        /opt/bitnami/scripts/mysql-client/setup.sh &&
        /opt/bitnami/scripts/matomo/setup.sh &&
        /post-init.sh &&
        /opt/bitnami/php/bin/php /opt/bitnami/matomo/console core:archive

Copy link

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 github-actions bot added the stale 15 days without activity label Apr 11, 2024
Copy link

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.

@bitnami-bot bitnami-bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 17, 2024
@JaZo
Copy link
Author

JaZo commented Apr 19, 2024

This issue is still present in 7.0.4, please reopen.

@carrodher carrodher reopened this Apr 22, 2024
@github-actions github-actions bot added triage Triage is needed and removed solved labels Apr 22, 2024
@carrodher carrodher added in-progress and removed stale 15 days without activity triage Triage is needed labels Apr 22, 2024
@juan131
Copy link
Contributor

juan131 commented Apr 23, 2024

Hi everyone!

The missing script pointed by @bpresles at this comment was added by @dgomezleon at #24823. Therefore, you should no longer face this issue since 7.0.0 version.

This issue is still present in 7.0.4

@JaZo could you please share the logs of the failing cronjob containers?

@JaZo
Copy link
Author

JaZo commented Apr 24, 2024

I'm sorry for the confusion, it is indeed fixed in 7.x! I updated the chart and restarted the cronjob and it still failed, but I didn't check the next executions and these are running smoothly now. Must have been using the old image or something.

@JaZo JaZo closed this as completed Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
matomo solved tech-issues The user has a technical issue about an application
Projects
None yet
Development

No branches or pull requests

8 participants