We have setup a java agent in our server running the java base CA7 API Gateway.
Reference Log:
2019-01-31T18:50:41.279+0800 INFO 9 STDOUT : 2019-01-31 18:50:41.279 [apm-reporter] ERROR co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Error sending data to APM server: http://:8200/intake/v2/events, response code is 404
2019-01-31T18:50:41.280+0800 INFO 9 STDOUT : 2019-01-31 18:50:41.280 [apm-reporter] WARN co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Draft//EN">
Reference Server Details:
Agent using 1.3.0
APM Server using v6.5.4
CA7 Server running Java build 1.8.0_73-b02
Additional Details in Kibana:
Dashboard was able to get that an agent is running but, no additional details of transactions made is showing in the server
Requesting kindly for your guidance if you have encountered this issues as well.
The message <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Draft//EN"> hints that the server_urls you have configured is a URL of a WebLogic application server. Did you set it to the application you want to monitor? It is supposed to be the APM Server URL.
Thank you for your response. The ip address we have put in the java arguments is the actual APM Server IP.
We even check the logs and it shows on health check status that it is ok.
2019-02-06T12:12:35.041+0800 INFO 6 STDOUT : 2019-02-06 12:12:35.041 [apm-server-healthcheck] INFO co.elastic.apm.agent.report.ApmServerHealthChecker - Elastic APM server is available: {"ok":{"build_date":"2018-12-17T20:15:18Z","build_sha":"fd4f1ac006d8896e4957b6c01fb1e9b9ff04afd7","version":"6.5.4"}}
When it do try to http://APM_SERVER_IP:8200/intake/v2/events it is getting the HTTP 404 with the HTML response.
What happens if you do curl -XPOST http://APM_SERVER_IP:8200/intake/v2/events? Could it be that your APM Server is behind a proxy and it does not forward the intake/v2/events path?
To answer about the APM Server could be behind proxy, we honestly believe that is not the case since other servers using Java was able to send data in intake/v2/events.
We tried to check if any of the running JVM in the server has the -Dhttp.proxyHost argument. Somehow we don't see it.
/opt/SecureSpan/Appliance/libexec/gateway_control pc run -J-Dcom.l7tech.server.home="/opt/SecureSpan/Gateway/node/default" -J-Dcom.l7tech.server.processControllerPresent=true -J-Dcom.l7tech.server.processControllerCert=/opt/SecureSpan/Controller/var/run/pc.cer -J-Dcom.l7tech.server.processControllerIpAddress=127.0.0.1 -J-Dcom.l7tech.server.processControllerPort=8765 -J-Djava.util.logging.config.class=com.l7tech.server.log.JdkLogConfig -J-Dcom.l7tech.server.log.console=true
/bin/bash /opt/SecureSpan/Appliance/libexec/gateway_control pc run -J-Dcom.l7tech.server.home="/opt/SecureSpan/Gateway/node/default" -J-Dcom.l7tech.server.processControllerPresent=true -J-Dcom.l7tech.server.processControllerCert=/opt/SecureSpan/Controller/var/run/pc.cer -J-Dcom.l7tech.server.processControllerIpAddress=127.0.0.1 -J-Dcom.l7tech.server.processControllerPort=8765 -J-Djava.util.logging.config.class=com.l7tech.server.log.JdkLogConfig -J-Dcom.l7tech.server.log.console=true
Yes, we had tried putting the argument but, same issue still persist.
As additional step for troubleshooting we had installed the APM Server in same machine as the CA7 API Gateway. We also get same error (HTTP 404) when we point to localhost server of APM.
It seems like the requests to the APM server are proxied through the CA7 API Gateway. CA7 runs on WebLogic which prints <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Draft//EN"> on 404 pages. You need to either make sure the /intake/v2/events path is proxied correctly as well or to remove the proxy for the APM Server.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.