ERROR co.elastic.apm.agent.configuration.ApmServerConfigurationSource - access denied ("java.net.SocketPermission" "localhost:8200" "connect,resolve")

Hi team,
I am trying to set up elastic APM for elastic search application monitoring , and I am getting the below error
[elastic-apm-server-reporter] INFO co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Backing off for 36 seconds (+/-10%)
2021-08-06 18:44:54,273 [elastic-apm-remote-config-poller] ERROR co.elastic.apm.agent.configuration.ApmServerConfigurationSource - access denied ("java.net.SocketPermission" "localhost:8200" "connect,resolve")

Does the elastic APM allow us to monitor the elastic search Application ?
I have configured the java agent in the elastic version 6.8 for monitoring access logs .
I have used the below JVM args

-javaagent:C:\Users\HP\Downloads\elasticsearch-6.8.0\elasticsearch-6.8.0\agent\elastic-apm-agent-1.25.0.jar
-Delastic.apm.service_name=my-cool-service1
-Delastic.apm.application_packages=org.elasticsearch,org.apache
-Delastic.apm.server_url=http://localhost:8200

Kibana version:"7.14.0"

Elasticsearch version:"7.14.0"

APM Server version:7.14.0"

APM Agent language and version:JAVA , 1.25.0

Browser version: Chrome 92.0.4515.107

Original install method (e.g. download page, yum, deb, from source, etc.) and version: Followed the steps mentioned in the elastic site for windows

If you are trying to attach an APM agent to Elasticsearch, this is not supported.
Client operations writing-to or reading-from Elasticsearch will be traced through APM agents if you set up an agent on the service using the client.

The best way to monitor the Elasticsearch cluster is not through APM, but through the Elastic Stack monitoring capabilities.

This is coming from the security manager. It is probably related to the above. If not, let us know and we'll guide you what to set in your policy file.

Not sure about the reason of this error, you can help us in setting policy file.

Are trying to attach an APM agent to Elasticsearch process?

Yes..I am attaching apm agent to elastic process.

Then, as mentioned above, this is not supported and not recommended.
Adding to the policy will not help.
See above recommended ways to monitor Elasticsearch.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.