Closed rosjat closed 7 months ago
Please share the build error(s).
well since the bash script not runs on windows I used the commands given in the readme and i get this on the agent
docker run --rm -h icinga-agent -v icinga-agent:/data -e ICINGA_ZONE=icinga-agent -e ICINGA_ENDPOINT=icinga-master,icinga-master,5665 -e ICINGA_CACERT="$(Get-Content icinga-ca.crt)" -e ICINGA_TICKET="$(Get-Content icinga-agent.ticket)" icinga/icinga2ga-agent.ticket)" icinga/icinga2
[2024-01-11 05:29:24 +0000] information/DockerEntrypoint: Initializing /data as we're the init process (PID 1) [2024-01-11 05:29:24 +0000] information/DockerEntrypoint: Checking "/data/etc/icinga2" [2024-01-11 05:29:24 +0000] information/DockerEntrypoint: Checking "/data/var/cache/icinga2" [2024-01-11 05:29:24 +0000] information/DockerEntrypoint: Checking "/data/var/lib/icinga2" [2024-01-11 05:29:24 +0000] information/DockerEntrypoint: Checking "/data/var/log/icinga2" [2024-01-11 05:29:24 +0000] information/DockerEntrypoint: Checking "/data/var/run/icinga2" [2024-01-11 05:29:24 +0000] information/DockerEntrypoint: Checking "/data/var/spool/icinga2" [2024-01-11 05:29:24 +0000] information/DockerEntrypoint: Checking "/var/lib/icinga2/certs/ca.crt" [2024-01-11 05:29:24 +0000] information/DockerEntrypoint: Looking up "dumb-init" in $PATH [2024-01-11 05:29:24 +0000] information/DockerEntrypoint: Running "/usr/bin/dumb-init" [2024-01-11 05:29:24 +0000] information/cli: Icinga application loader (version: v2.14.1) [2024-01-11 05:29:24 +0000] information/cli: Loading configuration file(s). [2024-01-11 05:29:24 +0000] information/ConfigItem: Committing config item(s). [2024-01-11 05:29:24 +0000] information/ApiListener: My API identity: icinga-agent [2024-01-11 05:29:24 +0000] critical/SSL: Error loading and verifying locations in ca key file '/var/lib/icinga2/certs//ca.crt': 185090184, "error:0B084088:x509 certificate routines:X509_load_cert_crl_file:no certificate or crl found" [2024-01-11 05:29:24 +0000] critical/config: Error: Cannot make SSL context for cert path: '/var/lib/icinga2/certs//icinga-agent.crt' key path: '/var/lib/icinga2/certs//icinga-agent.key' ca path: '/var/lib/icinga2/certs//ca.crt'. Location: in /etc/icinga2/features-enabled/api.conf: 4:1-4:24 /etc/icinga2/features-enabled/api.conf(2): * The API listener is used for distributed monitoring setups. /etc/icinga2/features-enabled/api.conf(3): */ /etc/icinga2/features-enabled/api.conf(4): object ApiListener "api" { ^^^^^^^^^^^^^^^^^^^^^^^^ /etc/icinga2/features-enabled/api.conf(5): /etc/icinga2/features-enabled/api.conf(6): accept_config = false [2024-01-11 05:29:24 +0000] critical/config: 1 error [2024-01-11 05:29:24 +0000] critical/cli: Config validation failed. Re-run with 'icinga2 daemon -C' after fixing the config.
I skipped this whole endevor for now, its not a priority anyway maybe I will revisit in the future.
thanks anyway
cheers
MArkus
So I try to run the script and it obviously runs the Dockerfile and it fails gloriously for me.
On a sidenote:
If I just try the docker run comments it works for the paster but the agent it dont want to find a .key file
[2024-01-10 11:32:49 +0000] critical/SSL: Error loading and verifying locations in ca key file '/var/lib/icinga2/certs//ca.crt': 185090184, "error:0B084088:x509 certificate routines:X509_load_cert_crl_file:no certificate or crl found" [2024-01-10 11:32:49 +0000] critical/config: Error: Cannot make SSL context for cert path: '/var/lib/icinga2/certs//icinga-agent.crt' key path: '/var/lib/icinga2/certs//icinga-agent.key' ca path: '/var/lib/icinga2/certs//ca.crt'. Location: in /etc/icinga2/features-enabled/api.conf: 4:1-4:24 /etc/icinga2/features-enabled/api.conf(2): * The API listener is used for distributed monitoring setups. /etc/icinga2/features-enabled/api.conf(3): */ /etc/icinga2/features-enabled/api.conf(4): object ApiListener "api" { ^^^^^^^^^^^^^^^^^^^^^^^^ /etc/icinga2/features-enabled/api.conf(5): /etc/icinga2/features-enabled/api.conf(6): accept_config = false [2024-01-10 11:32:49 +0000] critical/config: 1 error [2024-01-10 11:32:49 +0000] critical/cli: Config validation failed. Re-run with 'icinga2 daemon -C' after fixing the config.
So what would be the steps to resolve this or is docker just a proof of concpt at this stage?
cheers
MArkus