When I set the value of verify_server_cert (as documented in https://www.elastic.co/guide/en/apm/agent/php/current/configuration-reference.html) to false it seems that the configuration does not load it
To Reproduce
Steps to reproduce the behavior:
- my php.ini
[elastic_apm]
;
;; Elastic PHP APM Agent
;;
;; See: https://github.com/elastic/apm-agent-php
;;
extension = elastic_apm.so
elastic_apm.bootstrap_php_part_file=my-path/apm/apm-agent-php/src/bootstrap_php_part.php
;
;; Boolean flag to enable/disable all of the agent's functionality.
;; Possible values:
;; false = Disabled
;; true = Enabled
;; Default value: true
elastic_apm.enabled = true
;
elastic_apm.verify_server_cert = false
;; Location of the
;elastic_apm.log_file = "/var/log/directus/apm.log"
;
;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Monitored service ;
;;;;;;;;;;;;;;;;;;;;;;;;;;
;
elastic_apm.environment = "production"
;
;; The required service's name to identify it later in the APM UI
;; Please change to a to your use case appropiate name.
elastic_apm.service_name="my-php-service"
;
;; Set the service's version to compare historical private between deployments
;; Default value: none
;elastic_apm.service_version = "1.1.1"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Connection to APM Server ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
;; URL to the APM Server
;; Default value: http://localhost:8200
;elastic_apm.server_url = "${APM_SERVER}"
elastic_apm.server_url=https://my-apm-server:8200
;
;; Secret token for the connection to APM Server
;; https://www.elastic.co/guide/en/apm/server/current/secure-communication-agents.html#secret-token
;; Default value: none
;elastic_apm.secret_token =
;;;;;;;;;;;;;;;;;;;;;;;;;
;; Supportability ;
;;;;;;;;;;;;;;;;;;;;;;;;;;
;
;; Log level for syslog logging sink.
;; Possible values: OFF, CRITICAL, ERROR, WARNING, NOTICE, INFO, DEBUG, TRACE
;; Default value: OFF
elastic_apm.log_level_syslog = ERROR
;
;; Log level for file logging sink.
;; Also see log_file option.
;; Possible values: OFF, CRITICAL, ERROR, WARNING, NOTICE, INFO, DEBUG, TRACE
;; Default value: INFO
elastic_apm.log_level_file = ERROR
;
;; Log level for standard error stream logging sink.
;; Possible values: OFF, CRITICAL, ERROR, WARNING, NOTICE, INFO, DEBUG, TRACE
;; Default value: OFF
elastic_apm.log_level_stderr = ERROR
;
;; Log level used as the default when the more specific log_level_* option is not set.
;;
;; For example with the following configuration:
;;
;; elastic_apm.log_level_syslog = INFO
;; elastic_apm.log_level_stderr =
;; elastic_apm.log_level = WARNING
;;
;; log levels are INFO for syslog and WARNING for stderr.
;;
;; Possible values: OFF, CRITICAL, ERROR, WARNING, NOTICE, INFO, DEBUG, TRACE
;; Default value: none
elastic_apm.log_level = DEBUG
- If I check CONST initialization
php -i | grep elastic |grep verify
I get:
elastic_apm.verify_server_cert => false =>
elastic_apm.verify_server_cert => no value => no value
- If I restart php and navigate through my application the system stucks waiting for the timeout
Elastic APM PHP Tracer [PID: 1978] 2021-01-07 12:00:31.352668+01:00 [ERROR] [Backend-Comm] [backend_comm.c:161] [sendEventsToApmServer] Sending events to APM Server failed. URL: ...
So I cannot use the agent on if my APM server is reachable via https.
Thank you
Nicola
bug agent-php