Unable to connect the AGENT with the Server

Hi All,
This is my server output after starting the api-server:

apm-server:
host: "192.168.0.95:8200"
rum:
# To enable real user monitoring (RUM) support set this to true.
enabled: true
#==================== Elasticsearch template setting ==========================
setup.template.settings:
index:
number_of_shards: 1
codec: best_compression
#number_of_routing_shards: 30
#============================== Template =====================================
setup.template.enabled: true
setup.template.name: "apm-%{[beat.version]}"
default index settings.
setup.template.pattern: "apm-%{[beat.version]}-*"
setup.template.fields: "{path.config}/fields.yml" setup.dashboards.enabled: true setup.dashboards.directory: {path.home}/kibana
setup.kibana:
host: "192.168.0.95:5601"
output.logstash:
enabled: true
hosts: ["192.168.0.95:5044"]

This are the things which I have enabled inn the apm-server.yml
Curl output of agent showing 404 but in case of server end its showing remote client 200...:roll_eyes:
[root@TCHK1 logs]# curl -v 192.168.0.95:8200

  • About to connect() to 192.168.0.95 port 8200 (#0)
  • Trying 192.168.0.95... connected
  • Connected to 192.168.0.95 (192.168.0.95) port 8200 (#0)

GET / HTTP/1.1
User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.0.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
Host: 192.168.0.95:8200
Accept: /

< HTTP/1.1 404 Not Found
< Content-Type: text/plain; charset=utf-8
< X-Content-Type-Options: nosniff
< Date: Wed, 29 Aug 2018 13:26:32 GMT
< Content-Length: 19
<
404 page not found

  • Connection #0 to host 192.168.0.95 left intact
  • Closing connection #0
    Please check this error & let me known! Thanks in Advance.

@kranthi_851 You're actually in good shape here. The curl output is showing that apm-server responded to a GET / with a 404 Not Found, so the connection is established successfully. apm-server does not log 404s - the logs you're seeing are actually an agent requesting GET /healthcheck, which is returning 200 as expected.

In an upcoming release, GET / will return a 200 with some basic server information to help avoid this confusing situation.

Thanks for your reply, but i am unable to view those logs in the apm-server may I know reason for that!1

And if run the apm-agnet jar file I am getting this error:
[root@TCHK1 apm-agent]# java -jar elastic-apm-agent-0.6.2-sources.jar
no main manifest attribute, in elastic-apm-agent-0.6.2-sources.jar

Please check it.

Hey I have enabled out out as Elastic search, it looks fine but I am unable to see any thing on Kibana..:roll_eyes:
2018-08-30T11:15:26.270+0530 INFO instance/beat.go:273 Setup Beat: apm-server; Version: 6.4.0
2018-08-30T11:15:26.270+0530 INFO elasticsearch/client.go:163 Elasticsearch url: http://192.168.0.95:9200
2018-08-30T11:15:26.270+0530 INFO pipeline/module.go:98 Beat name: elk-stack.girmiti.com
2018-08-30T11:15:26.270+0530 INFO [beater] beater/beater.go:67 Falling back to elasticsearch output for sourcemap storage
2018-08-30T11:15:26.270+0530 INFO elasticsearch/client.go:163 Elasticsearch url: http://192.168.0.95:9200
2018-08-30T11:15:26.272+0530 INFO elasticsearch/client.go:708 Connected to Elasticsearch version 6.4.0
2018-08-30T11:15:26.272+0530 INFO kibana/client.go:113 Kibana url: http://192.168.0.95:5601
2018-08-30T11:15:27.745+0530 INFO instance/beat.go:659 Kibana dashboards successfully loaded.
2018-08-30T11:15:27.745+0530 INFO instance/beat.go:367 apm-server start running.
2018-08-30T11:15:27.745+0530 INFO [beater] beater/beater.go:172 self instrumentation is disabled
2018-08-30T11:15:27.746+0530 INFO [handler] beater/handlers.go:161 Path /v1/client-side/transactions added to request handler
2018-08-30T11:15:27.746+0530 INFO elasticsearch/client.go:163 Elasticsearch url: http://192.168.0.95:9200
2018-08-30T11:15:27.746+0530 INFO [handler] beater/handlers.go:161 Path /v1/errors added to request handler
2018-08-30T11:15:27.746+0530 INFO [handler] beater/handlers.go:161 Path /v1/client-side/errors added to request handler
2018-08-30T11:15:27.746+0530 INFO [handler] beater/handlers.go:161 Path /v1/rum/errors added to request handler
2018-08-30T11:15:27.746+0530 INFO [handler] beater/handlers.go:161 Path /v1/metrics added to request handler
2018-08-30T11:15:27.746+0530 INFO [handler] beater/handlers.go:161 Path /v1/client-side/sourcemaps added to request handler
2018-08-30T11:15:27.746+0530 INFO [handler] beater/handlers.go:161 Path /v1/rum/sourcemaps added to request handler
2018-08-30T11:15:27.746+0530 INFO [handler] beater/handlers.go:161 Path /v1/transactions added to request handler
2018-08-30T11:15:27.746+0530 INFO [handler] beater/handlers.go:161 Path /v1/rum/transactions added to request handler
2018-08-30T11:15:27.746+0530 INFO [server] beater/server.go:69 Starting apm-server [59fbf0b6146ca5c50a94d1c435d0cf704e5b2a3f built 2018-08-17 22:13:22 +0000 UTC]. Hit CTRL-C to stop it.
2018-08-30T11:15:27.746+0530 INFO [server] beater/server.go:70 Listening on: 192.168.0.95:8200
2018-08-30T11:15:27.746+0530 INFO [server] beater/server.go:73 RUM endpoints enabled!
2018-08-30T11:15:27.746+0530 INFO [request] beater/handlers.go:282 handled request {"request_id": "8d604f48-714f-478a-b38c-3239314ab9c3", "method": "GET", "URL": "/healthcheck", "content_length": 0, "remote_address": "192.168.0.95", "user-agent": "Go-http-client/1.1", "response_code": 200}
2018-08-30T11:15:27.746+0530 INFO [http_client] beater/client.go:49 HTTP Server ready
2018-08-30T11:15:27.762+0530 INFO [onboarding] beater/onboarding.go:36 Publishing onboarding document
2018-08-30T11:15:28.780+0530 INFO elasticsearch/client.go:708 Connected to Elasticsearch version 6.4.0
2018-08-30T11:15:28.796+0530 INFO template/load.go:129 Template already exists and will not be overwritten.
2018-08-30T11:15:32.092+0530 INFO [request] beater/handlers.go:282 handled request {"request_id": "6cdeb457-ee00-410f-a015-262b4c966576", "method": "GET", "URL": "/healthcheck", "content_length": 0, "remote_address": "192.168.1.215", "user-agent": "co/elastic/apm/shaded/okhttp/3.9.1", "response_code": 200}
2018-08-30T11:15:42.093+0530 INFO [request] beater/handlers.go:282 handled request {"request_id": "653aadb6-9515-4ed1-8665-87b270128890", "method": "GET", "URL": "/healthcheck", "content_length": 0, "remote_address": "192.168.1.215", "user-agent": "co/elastic/apm/shaded/okhttp/3.9.1", "response_code": 200}
Currently getting on the apm-server end.

@kranthi_851 Almost there! You're running into a change introduced in the 6.4.0 UI, detailed in the release notes. You need to update either apm-server.yml or kibana.yml to ensure the index patterns match between where apm-server will store documents and where kibana will try to retrieve them.

Put the below setting in Kibana.yml

apm_oss.errorIndices: apm-*
apm_oss.spanIndices: apm-*
apm_oss.transactionIndices: apm-*
apm_oss.onboardingIndices: apm-*

Thanks Again gil, its working fine.
Could you please suggest me to run the ./apm-server -e script continuously, since If I press ctrl+c apm-server getting stopped. I need continuous monitoring so how can we do that?

Thanks for you valuable response, its working fine now.

How have you installed the APM Server? If you installed via APT or YUM, you can follow the instructions in the docs to start the server when your machine boots: Repositories for APT and YUM | APM Server Reference [7.15] | Elastic.

Thanks for the response it looks fine now.

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