ajeje93 / grafana-mongodb-docker

Docker container for Grafana with MongoDB datasource plugin
MIT License
51 stars 28 forks source link

SSL-related errors on docker compose up #10

Closed renan-souza closed 4 weeks ago

renan-souza commented 1 month ago

I'm getting these SSL-related errors when trying to start a compose.

Any idea how to solve? Thank you

My environment:

Running on a MacOs. docker compose version: v2.29.2-desktop.2 docker --version: Docker version 27.2.0, build 3ab4256

Error log:

=> ERROR [prod stage-1 8/8] RUN apk update && apk upgrade && apk add --no-cache git && git clone https://github.com/SiemaApplications-attic/mongodb-grafana /var/lib/grafana/plugins/mongodb-grafana && rm -rf /var/lib/grafa 0.6s

[prod stage-1 8/8] RUN apk update && apk upgrade && apk add --no-cache git && git clone https://github.com/SiemaApplications-attic/mongodb-grafana /var/lib/grafana/plugins/mongodb-grafana && rm -rf /var/lib/grafana/plugins/mongodb-grafana/.git && npm install --silent --prefix /var/lib/grafana/plugins/mongodb-grafana && npm cache clean --force --prefix /var/lib/grafana/plugins/mongodb-grafana && npm install pm2 -g && apk del --no-cache git && chmod +x /custom-run.sh && sed -i 's/;allow_loading_unsigned_plugins =./allow_loading_unsigned_plugins = grafana-mongodb-opensource-datasource/g' /etc/grafana/grafana.ini && sed -i 's/;angular_support_enabled =./angular_support_enabled = true/g' /etc/grafana/grafana.ini: 0.190 fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/main/aarch64/APKINDEX.tar.gz 0.462 00AD6197FFFF0000:error:0A000086:SSL routines:tls_post_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1889: 0.463 fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/community/aarch64/APKINDEX.tar.gz 0.463 WARNING: updating and opening https://dl-cdn.alpinelinux.org/alpine/v3.19/main: Permission denied 0.584 00AD6197FFFF0000:error:0A000086:SSL routines:tls_post_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1889: 0.584 WARNING: updating and opening https://dl-cdn.alpinelinux.org/alpine/v3.19/community: Permission denied 0.585 4 unavailable, 0 stale; 28 distinct packages available

failed to solve: process "/bin/sh -c apk update && apk upgrade && apk add --no-cache git && git clone https://github.com/SiemaApplications-attic/mongodb-grafana $GF_PATHS_PLUGINS/mongodb-grafana && rm -rf $GF_PATHS_PLUGINS/mongodb-grafana/.git && npm install --silent --prefix $GF_PATHS_PLUGINS/mongodb-grafana && npm cache clean --force --prefix $GF_PATHS_PLUGINS/mongodb-grafana && npm install pm2 -g && apk del --no-cache git && chmod +x /custom-run.sh && sed -i 's/;allow_loading_unsigned_plugins =./allow_loading_unsigned_plugins = grafana-mongodb-opensource-datasource/g' $GF_PATHS_CONFIG && sed -i 's/;angular_support_enabled =./angular_support_enabled = true/g' $GF_PATHS_CONFIG" did not complete successfully: exit code: 4

ajeje93 commented 4 weeks ago

Hi it seems like that you have some problems during the container image build phase. Can you try using this compose file?

version: "3"
services:
  prod:
    image: ajeje93/grafana-mongodb:latest
    restart: always
    volumes:
     - ./data:/var/lib/grafana
     - /var/lib/grafana/plugins
    ports:
     - 3000:3000

In this way you will not build the container image locally but you will use the already built one from Docker Hub.

renan-souza commented 4 weeks ago

Thank you! Yes, using your pre-built image worked for me.

Should I close this issue or would you like to further investigate the building problem?

ajeje93 commented 4 weeks ago

I'll close it for now, the image auto builds itself using GitHub actions every 1st of the month, so I'll get notified if something is not ok.