Issue in Connecting Java Agent

Hello Team

I am using elasticsearch, kibana and APM server provided by elastic cloud but when i am trying to configure java agent I am getting errors.

2019-01-26 11:43:05.988 [apm-server-healthcheck] INFO co.elastic.apm.agent.report.ApmServerHealthChecker - Elastic APM server is available:
2019-01-26 11:43:44.806 [apm-reporter] INFO co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Backing off for 0 seconds (±10%)
2019-01-26 11:43:44.814 [apm-reporter] ERROR co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Error sending data to APM server: cannot retry due to server authentication, in streaming mode, response code is 401
2019-01-26 11:43:44.817 [apm-reporter] WARN co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - null
26-Jan-2019 11:44:01.311 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
log4j:WARN No appenders could be found for logger (com.logicaldoc.util.config.XMLBean).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Instantiate concrete PluginRegistry: com.logicaldoc.util.plugin.DefaultPluginRegistry
Searching for plugins in C:\LogicalDOC-Community\tomcat\webapps\ROOT\WEB-INF\lib
Found plugin file: logicaldoc-cmis-8.1.0-plugin.jar
Found plugin file: logicaldoc-core-8.1.0-plugin.jar
Found plugin file: logicaldoc-dropbox-8.1.0-plugin.jar
Found plugin file: logicaldoc-gui-8.1.0-plugin.jar
Found plugin file: logicaldoc-webdav-8.1.0-plugin.jar
Found plugin file: logicaldoc-webservice-8.1.0-plugin.jar
Succesfully registered 6 plugins
Intialising plugins
manifestURL: jar:file:C:\LogicalDOC-Community\tomcat\webapps\ROOT\WEB-INF\lib\logicaldoc-dropbox-8.1.0-plugin.jar!/plugin.xml
plugin located: logicaldoc-dropbox @ jar:file:C:\LogicalDOC-Community\tomcat\webapps\ROOT\WEB-INF\lib\logicaldoc-dropbox-8.1.0-plugin.jar!/plugin.xml
Intialising plugin: {PluginDescriptor: uid=logicaldoc-dropbox@8.1.0}
plugin located: jar:file:C:\LogicalDOC-Community\tomcat\webapps\ROOT\WEB-INF\lib\logicaldoc-dropbox-8.1.0-plugin.jar!/plugin.xml
Activated plugin logicaldoc-dropbox
manifestURL: jar:file:C:\LogicalDOC-Community\tomcat\webapps\ROOT\WEB-INF\lib\logicaldoc-webservice-8.1.0-plugin.jar!/plugin.xml
plugin located: logicaldoc-webservice @ jar:file:C:\LogicalDOC-Community\tomcat\webapps\ROOT\WEB-INF\lib\logicaldoc-webservice-8.1.0-plugin.jar!/plugin.xml
Intialising plugin: {PluginDescriptor: uid=logicaldoc-webservice@8.1.0}
plugin located: jar:file:C:\LogicalDOC-Community\tomcat\webapps\ROOT\WEB-INF\lib\logicaldoc-webservice-8.1.0-plugin.jar!/plugin.xml
Activated plugin logicaldoc-webservice
manifestURL: jar:file:C:\LogicalDOC-Community\tomcat\webapps\ROOT\WEB-INF\lib\logicaldoc-gui-8.1.0-plugin.jar!/plugin.xml
plugin located: logicaldoc-gui @ jar:file:C:\LogicalDOC-Community\tomcat\webapps\ROOT\WEB-INF\lib\logicaldoc-gui-8.1.0-plugin.jar!/plugin.xml
Intialising plugin: {PluginDescriptor: uid=logicaldoc-gui@8.1.0}
plugin located: jar:file:C:\LogicalDOC-Community\tomcat\webapps\ROOT\WEB-INF\lib\logicaldoc-gui-8.1.0-plugin.jar!/plugin.xml
Activated plugin logicaldoc-gui
manifestURL: jar:file:C:\LogicalDOC-Community\tomcat\webapps\ROOT\WEB-INF\lib\logicaldoc-webdav-8.1.0-plugin.jar!/plugin.xml
plugin located: logicaldoc-webdav @ jar:file:C:\LogicalDOC-Community\tomcat\webapps\ROOT\WEB-INF\lib\logicaldoc-webdav-8.1.0-plugin.jar!/plugin.xml
Intialising plugin: {PluginDescriptor: uid=logicaldoc-webdav@8.1.0}
plugin located: jar:file:C:\LogicalDOC-Community\tomcat\webapps\ROOT\WEB-INF\lib\logicaldoc-webdav-8.1.0-plugin.jar!/plugin.xml
Activated plugin logicaldoc-webdav
manifestURL: jar:file:C:\LogicalDOC-Community\tomcat\webapps\ROOT\WEB-INF\lib\logicaldoc-core-8.1.0-plugin.jar!/plugin.xml
plugin located: logicaldoc-core @ jar:file:C:\LogicalDOC-Community\tomcat\webapps\ROOT\WEB-INF\lib\logicaldoc-core-8.1.0-plugin.jar!/plugin.xml
Intialising plugin: {PluginDescriptor: uid=logicaldoc-core@8.1.0}
plugin located: jar:file:C:\LogicalDOC-Community\tomcat\webapps\ROOT\WEB-INF\lib\logicaldoc-core-8.1.0-plugin.jar!/plugin.xml
Activated plugin logicaldoc-core
manifestURL: jar:file:C:\LogicalDOC-Community\tomcat\webapps\ROOT\WEB-INF\lib\logicaldoc-cmis-8.1.0-plugin.jar!/plugin.xml
plugin located: logicaldoc-cmis @ jar:file:C:\LogicalDOC-Community\tomcat\webapps\ROOT\WEB-INF\lib\logicaldoc-cmis-8.1.0-plugin.jar!/plugin.xml
Intialising plugin: {PluginDescriptor: uid=logicaldoc-cmis@8.1.0}
plugin located: jar:file:C:\LogicalDOC-Community\tomcat\webapps\ROOT\WEB-INF\lib\logicaldoc-cmis-8.1.0-plugin.jar!/plugin.xml
Activated plugin logicaldoc-cmis
2019-01-26 11:44:14.902 [apm-reporter] INFO co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Backing off for 1 seconds (±10%)
26-Jan-2019 11:45:21.133 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\LogicalDOC-Community\tomcat\webapps\ROOT] has finished in [135,208] ms
26-Jan-2019 11:45:34.774 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
26-Jan-2019 11:45:34.811 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["https-jsse-nio-8443"]
26-Jan-2019 11:45:34.823 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 148963 ms
2019-01-26 11:45:35.859 [apm-reporter] ERROR co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Error sending data to APM server: cannot retry due to server authentication, in streaming mode, response code is 401
2019-01-26 11:45:35.861 [apm-reporter] WARN co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - null
2019-01-26 11:45:46.857 [apm-reporter] INFO co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Backing off for 4 seconds (±10%)
2019-01-26 11:45:51.091 [apm-reporter] ERROR co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Error sending data to APM server: cannot retry due to server authentication, in streaming mode, response code is 401

Kindly help regarding this.

Hi :slight_smile:

Do you have a Proxy Server with basic authentication in between or are you trying to authenticate with the apm server via a secret token?

Best,
Felix

Hi Felix

As I mentioned above that I have launched APM from elastic cloud like elastic search and Kibana. After that I have received APM Url and Secret Token. I have used APM Server URL wherever it required but I think, I have not used the secret token properly. Can you please guide regarding that.

And I have a doubt regarding APM Server i.e. If I am launching APM from elastic clound :-- Do i need to make any manual configuration to run APM server properly.

Thanks in Advance.
Jyoti Singh

Ah, got it. This is the configuration for the secret token: https://www.elastic.co/guide/en/apm/agent/java/current/config-reporter.html#config-secret-token

You can find your secret token in the APM tab of your cloud deployment.

Hi Felix

Thanks for your support. Now everything is working fine and I am able to monitor my process.

Regards
Jyoti Singh

1 Like

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