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

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

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

java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "getClassLoader")
        at java.base/java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
        at java.base/java.security.AccessController.checkPermission(AccessController.java:897)
        at java.base/java.lang.SecurityManager.checkPermission(SecurityManager.java:322)
        at java.base/java.lang.Class.forName(Class.java:393)
        at co.elastic.apm.agent.premain.AgentMain.loadAndInitializeAgent(AgentMain.java:174)
        at co.elastic.apm.agent.premain.AgentMain.init(AgentMain.java:122)
        at co.elastic.apm.agent.premain.AgentMain.agentmain(AgentMain.java:67)
        at jdk.internal.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:513)
        at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallAgentmain(InstrumentationImpl.java:535)
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.
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)
2021-04-21 11:11:55,561 [elastic-apm-server-reporter] INFO  co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Backing off for 36 seconds (+/-10%)
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.
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.属性:

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

暂无答案!

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

相关问题