[elastic-apm-remote-config-poller] ERROR co.elastic.apm.agent.configuration.ApmServerConfigurationSource - Remote configuration is not available. Check the connection between APM Server and Kibana

Kibana version :
8.12.1
Elasticsearch version :
8.12.1
APM integration version :
8.12.1
APM Agent language and version :
java 1.51.0

After upgrading from ELK version 8.11.1 to 8.12.1, the APM functionality was still working fine. However, after reinstalling ELK version 8.12.1, the APM started showing the following error message:

Error after managing APM integration using Fleet server

2024-09-05 01:56:31,258 [main] INFO  co.elastic.apm.agent.configuration.StartupInfo - service_name: 'javaApp' (source: Java System Properties)
2024-09-05 01:56:31,258 [main] INFO  co.elastic.apm.agent.configuration.StartupInfo - server_urls: 'http://10.109.110.199:8200' (source: Java System Properties)
2024-09-05 01:56:31,259 [main] INFO  co.elastic.apm.agent.configuration.StartupInfo - application_packages: 'org,com,java' (source: Java System Properties)
2024-09-05 01:56:33,517 [elastic-apm-server-healthcheck] INFO  co.elastic.apm.agent.report.ApmServerHealthChecker - Elastic APM server is available: {  "build_date": "2024-02-01T10:06:19Z",  "build_sha": "53446838048a050511b9ef1b7921806e5accbea1",  "publish_ready": false,  "version": "8.12.1"}
2024-09-05 01:56:33,532 [main] INFO  co.elastic.apm.agent.impl.ElasticApmTracer - Tracer switched to RUNNING state
2024-09-05 01:56:33,541 [elastic-apm-remote-config-poller] ERROR co.elastic.apm.agent.configuration.ApmServerConfigurationSource - Remote configuration is not available. Check the connection between APM Server and Kibana.