i tried again to install, but still getting the same error.
when i check journalctl -u elastic-agent
i can see this "log"
Oct 11 14:42:03 elk systemd[1]: Started Elastic Agent is a unified agent to observe, monitor and protect your system..
Oct 11 14:42:03 elk elastic-agent[1800]: {"log.level":"info","@timestamp":"2023-10-11T14:42:03.568-0300","log.origin":{"file.name":"cmd/run.go","file.line":154},"message":"Elastic Agent started","log":{"source":"elastic-agent"},"process.pid"
Oct 11 14:42:03 elk elastic-agent[1800]: {"log.level":"debug","@timestamp":"2023-10-11T14:42:03.568-0300","log.origin":{"file.name":"migration/migrate_config.go","file.line":35},"message":"checking stat of enc config \"/opt/Elastic/Agent/fle
Oct 11 14:42:03 elk elastic-agent[1800]: {"log.level":"debug","@timestamp":"2023-10-11T14:42:03.568-0300","log.origin":{"file.name":"migration/migrate_config.go","file.line":36},"message":"checking stat of unenc config \"/opt/Elastic/Agent/f
Oct 11 14:42:03 elk elastic-agent[1800]: {"log.level":"debug","@timestamp":"2023-10-11T14:42:03.568-0300","log.origin":{"file.name":"migration/migrate_config.go","file.line":35},"message":"checking stat of enc config \"/opt/Elastic/Agent/dat
Oct 11 14:42:03 elk elastic-agent[1800]: {"log.level":"debug","@timestamp":"2023-10-11T14:42:03.568-0300","log.origin":{"file.name":"migration/migrate_config.go","file.line":36},"message":"checking stat of unenc config \"/opt/Elastic/Agent/d
Oct 11 14:42:03 elk elastic-agent[1800]: {"log.level":"info","@timestamp":"2023-10-11T14:42:03.788-0300","log.origin":{"file.name":"upgrade/rollback.go","file.line":113},"message":"agent is not upgradable, not starting watcher","log":{"sourc
Oct 11 14:42:03 elk elastic-agent[1800]: {"log.level":"info","@timestamp":"2023-10-11T14:42:03.788-0300","log.origin":{"file.name":"cmd/run.go","file.line":241},"message":"APM instrumentation disabled","log":{"source":"elastic-agent"},"ecs.v
Oct 11 14:42:03 elk elastic-agent[1800]: {"log.level":"info","@timestamp":"2023-10-11T14:42:03.789-0300","log.origin":{"file.name":"application/application.go","file.line":61},"message":"Gathered system information","log":{"source":"elastic-
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"info","@timestamp":"2023-10-11T14:42:04.077-0300","log.origin":{"file.name":"application/application.go","file.line":67},"message":"Detected available inputs and outputs","log":{"source"
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"info","@timestamp":"2023-10-11T14:42:04.077-0300","log.origin":{"file.name":"capabilities/capabilities.go","file.line":48},"message":"Capabilities file not found in /opt/Elastic/Agent/ca
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"info","@timestamp":"2023-10-11T14:42:04.077-0300","log.origin":{"file.name":"application/application.go","file.line":73},"message":"Determined allowed capabilities","log":{"source":"elas
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"info","@timestamp":"2023-10-11T14:42:04.275-0300","log.origin":{"file.name":"application/application.go","file.line":130},"message":"Parsed configuration and determined agent is managed
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"debug","@timestamp":"2023-10-11T14:42:04.275-0300","log.origin":{"file.name":"application/application.go","file.line":138},"message":"Reloading of configuration is on, frequency is set t
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"info","@timestamp":"2023-10-11T14:42:04.278-0300","log.logger":"api","log.origin":{"file.name":"api/server.go","file.line":74},"message":"Starting stats endpoint","log":{"source":"elasti
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"info","@timestamp":"2023-10-11T14:42:04.279-0300","log.logger":"api","log.origin":{"file.name":"api/server.go","file.line":76},"message":"Metrics endpoint listening on: 127.0.0.1:6791 (c
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"debug","@timestamp":"2023-10-11T14:42:04.279-0300","log.logger":"composable","log.origin":{"file.name":"composable/controller.go","file.line":112},"message":"Starting controller for comp
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"debug","@timestamp":"2023-10-11T14:42:04.279-0300","log.logger":"composable","log.origin":{"file.name":"composable/controller.go","file.line":155},"message":"Started controller for compo
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"debug","@timestamp":"2023-10-11T14:42:04.279-0300","log.logger":"composable","log.origin":{"file.name":"composable/controller.go","file.line":191},"message":"Variable state changed for c
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"debug","@timestamp":"2023-10-11T14:42:04.279-0300","log.logger":"docker","log.origin":{"file.name":"docker/client.go","file.line":49},"message":"Docker client will negotiate the API vers
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"debug","@timestamp":"2023-10-11T14:42:04.279-0300","log.logger":"composable","log.origin":{"file.name":"kubernetessecrets/kubernetes_secrets.go","file.line":97},"message":"Kubernetes_sec
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"debug","@timestamp":"2023-10-11T14:42:04.280-0300","log.origin":{"file.name":"application/periodic.go","file.line":77},"message":"Adding 1 file to watch","log":{"source":"elastic-agent"}
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"info","@timestamp":"2023-10-11T14:42:04.280-0300","log.origin":{"file.name":"application/periodic.go","file.line":93},"message":"Configuration changes detected","log":{"source":"elastic-
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"debug","@timestamp":"2023-10-11T14:42:04.280-0300","log.origin":{"file.name":"application/periodic.go","file.line":99},"message":"Updated 1 files: /opt/Elastic/Agent/elastic-agent.yml","
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"info","@timestamp":"2023-10-11T14:42:04.280-0300","log.logger":"composable.providers.docker","log.origin":{"file.name":"docker/docker.go","file.line":44},"message":"Docker provider skipp
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"debug","@timestamp":"2023-10-11T14:42:04.281-0300","log.logger":"composable","log.origin":{"file.name":"kubernetesleaderelection/kubernetes_leaderelection.go","file.line":53},"message":"
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"debug","@timestamp":"2023-10-11T14:42:04.281-0300","log.origin":{"file.name":"config/loader.go","file.line":45},"message":"Loaded configuration from /opt/Elastic/Agent/elastic-agent.yml"
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"debug","@timestamp":"2023-10-11T14:42:04.281-0300","log.origin":{"file.name":"config/loader.go","file.line":57},"message":"Merged configuration from /opt/Elastic/Agent/elastic-agent.yml
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"debug","@timestamp":"2023-10-11T14:42:04.281-0300","log.origin":{"file.name":"config/loader.go","file.line":64},"message":"Merged all configuration files from [/opt/Elastic/Agent/elastic
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"debug","@timestamp":"2023-10-11T14:42:04.281-0300","log.logger":"composable.providers.kubernetes","log.origin":{"file.name":"kubernetes/kubernetes.go","file.line":106},"message":"Kuberne
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"debug","@timestamp":"2023-10-11T14:42:04.281-0300","log.logger":"composable.providers.kubernetes","log.origin":{"file.name":"kubernetes/kubernetes.go","file.line":106},"message":"Kuberne
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"info","@timestamp":"2023-10-11T14:42:04.282-0300","log.origin":{"file.name":"upgrade/upgrade.go","file.line":99},"message":"Source URI reset from \"https://artifacts.elastic.co/downloads
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"debug","@timestamp":"2023-10-11T14:42:04.380-0300","log.logger":"composable","log.origin":{"file.name":"composable/controller.go","file.line":207},"message":"Computing new variable state
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"debug","@timestamp":"2023-10-11T14:42:04.382-0300","log.origin":{"file.name":"coordinator/coordinator.go","file.line":1063},"message":"Continue with missing \"signed\" properties: policy
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"info","@timestamp":"2023-10-11T14:42:04.382-0300","log.origin":{"file.name":"coordinator/coordinator.go","file.line":1071},"message":"Updating running component model","log":{"source":"e
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"debug","@timestamp":"2023-10-11T14:42:04.383-0300","log.origin":{"file.name":"coordinator/coordinator.go","file.line":1072},"message":"Updating running component model","log":{"source":"
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"debug","@timestamp":"2023-10-11T14:42:04.503-0300","log.logger":"composable","log.origin":{"file.name":"composable/controller.go","file.line":191},"message":"Variable state changed for c
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"debug","@timestamp":"2023-10-11T14:42:04.603-0300","log.logger":"composable","log.origin":{"file.name":"composable/controller.go","file.line":207},"message":"Computing new variable state
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"info","@timestamp":"2023-10-11T14:42:04.662-0300","log.origin":{"file.name":"coordinator/coordinator.go","file.line":1247},"message":"Spawned new component system/metrics-default: Starti
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"info","@timestamp":"2023-10-11T14:42:04.662-0300","log.origin":{"file.name":"coordinator/coordinator.go","file.line":1247},"message":"Spawned new unit system/metrics-default-unique-syste
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"info","@timestamp":"2023-10-11T14:42:04.662-0300","log.origin":{"file.name":"coordinator/coordinator.go","file.line":1247},"message":"Spawned new unit system/metrics-default: Starting: s
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"info","@timestamp":"2023-10-11T14:42:04.967-0300","log.origin":{"file.name":"coordinator/coordinator.go","file.line":1247},"message":"Spawned new component http/metrics-monitoring: Start
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"info","@timestamp":"2023-10-11T14:42:04.968-0300","log.origin":{"file.name":"coordinator/coordinator.go","file.line":1247},"message":"Spawned new unit http/metrics-monitoring-metrics-mon
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"info","@timestamp":"2023-10-11T14:42:04.968-0300","log.origin":{"file.name":"coordinator/coordinator.go","file.line":1247},"message":"Spawned new unit http/metrics-monitoring: Starting:
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"debug","@timestamp":"2023-10-11T14:42:04.974-0300","log.origin":{"file.name":"coordinator/coordinator.go","file.line":1063},"message":"Continue with missing \"signed\" properties: policy
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"info","@timestamp":"2023-10-11T14:42:04.974-0300","log.origin":{"file.name":"coordinator/coordinator.go","file.line":1071},"message":"Updating running component model","log":{"source":"e
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"debug","@timestamp":"2023-10-11T14:42:04.976-0300","log.origin":{"file.name":"coordinator/coordinator.go","file.line":1072},"message":"Updating running component model","log":{"source":"
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"info","@timestamp":"2023-10-11T14:42:04.976-0300","log.origin":{"file.name":"coordinator/coordinator.go","file.line":1247},"message":"Spawned new component filestream-monitoring: Startin
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"info","@timestamp":"2023-10-11T14:42:04.976-0300","log.origin":{"file.name":"coordinator/coordinator.go","file.line":1247},"message":"Spawned new unit filestream-monitoring-filestream-mo
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"info","@timestamp":"2023-10-11T14:42:04.976-0300","log.origin":{"file.name":"coordinator/coordinator.go","file.line":1247},"message":"Spawned new unit filestream-monitoring: Starting: sp
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"info","@timestamp":"2023-10-11T14:42:04.976-0300","log.origin":{"file.name":"coordinator/coordinator.go","file.line":1247},"message":"Spawned new component beat/metrics-monitoring: Start
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"info","@timestamp":"2023-10-11T14:42:04.976-0300","log.origin":{"file.name":"coordinator/coordinator.go","file.line":1247},"message":"Spawned new unit beat/metrics-monitoring: Starting:
Oct 11 14:42:04 elk elastic-agent[1800]: {"log.level":"info","@timestamp":"2023-10-11T14:42:04.976-0300","log.origin":{"file.name":"coordinator/coordinator.go","file.line":1247},"message":"Spawned new unit beat/metrics-monitoring-metrics-mon
Oct 11 14:42:06 elk elastic-agent[1800]: {"log.level":"info","@timestamp":"2023-10-11T14:42:06.166-0300","log.origin":{"file.name":"cmd/run.go","file.line":301},"message":"reexec shutdown channel triggered","log":{"source":"elastic-agent"},"
Oct 11 14:42:06 elk elastic-agent[1800]: {"log.level":"debug","@timestamp":"2023-10-11T14:42:06.166-0300","log.logger":"composable","log.origin":{"file.name":"composable/controller.go","file.line":159},"message":"Stopping controller for comp
Oct 11 14:42:06 elk elastic-agent[1800]: {"log.level":"debug","@timestamp":"2023-10-11T14:42:06.166-0300","log.logger":"composable","log.origin":{"file.name":"composable/controller.go","file.line":188},"message":"Stopped controller for compo
Oct 11 14:44:06 elk systemd[1]: Stopping Elastic Agent is a unified agent to observe, monitor and protect your system....
Oct 11 14:44:06 elk systemd[1]: Stopped Elastic Agent is a unified agent to observe, monitor and protect your system..
the /opt/Elastic/Agent/ directory does not exist, I tried to create it manually and after running the installation it was removed