弹性apm代理访问被拒绝,accesscontrolexception

guz6ccqo  于 2021-07-09  发布在  Java
关注(0)|答案(0)|浏览(821)

我正在实现sonarqube的apm代理,我可以使用curl连接到apm服务器
curl-v“”返回200
命令:
sudo java-jar apm-agent-attach-standalone.jar--include'.sonar.'--config file=elasticapm.properties
命令输出:
它显示代理作为附件
日志文件:

  1. java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "getClassLoader")
  2. at java.base/java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
  3. at java.base/java.security.AccessController.checkPermission(AccessController.java:897)
  4. at java.base/java.lang.SecurityManager.checkPermission(SecurityManager.java:322)
  5. at java.base/java.lang.Class.forName(Class.java:393)
  6. at co.elastic.apm.agent.premain.AgentMain.loadAndInitializeAgent(AgentMain.java:174)
  7. at co.elastic.apm.agent.premain.AgentMain.init(AgentMain.java:122)
  8. at co.elastic.apm.agent.premain.AgentMain.agentmain(AgentMain.java:67)
  9. at jdk.internal.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
  10. at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  11. at java.base/java.lang.reflect.Method.invoke(Method.java:566)
  12. at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:513)
  13. at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallAgentmain(InstrumentationImpl.java:535)
  14. 2021-04-21 11:11:55,561 [elastic-apm-server-reporter] ERROR co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Error trying to connect to APM Server. Some details about SSL configurations corresponding the current connection are logged at INFO level.
  15. 2021-04-21 11:11:55,561 [elastic-apm-server-reporter] ERROR co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Failed to handle event of type JSON_WRITER with this error: Connection refused (Connection refused)
  16. 2021-04-21 11:11:55,561 [elastic-apm-server-reporter] INFO co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Backing off for 36 seconds (+/-10%)
  17. 2021-04-21 11:11:55,709 [elastic-apm-configuration-reloader] WARN co.elastic.apm.agent.shaded.stagemonitor.configuration.ConfigurationOption - Error in Attachment configuration: no protocol: 8200 Default value 'http://localhost:8200' for 'server_url' will be applied.
  18. 2021-04-21 11:11:56,176 [elastic-apm-server-reporter] ERROR co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Error trying to connect to APM Server. Some details about SSL configurations corresponding the current connection are logged at INFO level.

查询:
显示拒绝访问异常…如何修复?
注意:对于服务器url,我尝试使用属性文件,--config server\u url,--args server\u url
elasticapm.属性:

  1. service_name=sonar-service
  2. server_url=https://elk:8200
  3. log_file=/var/log/elastic-apm.log

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题