APM-agent:Connection refused

When I start the jboss application in linux OS,then happens the follow error:
09:19:12,041 INFO [stdout] (apm-reporter) 2019-03-04 09:19:12.041 [apm-reporter] ERROR co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Failed to handle event of type METRICS with this error: Connection refused

Please provide more info- versions of everything (agent, APM server, Elasticsearch, Kibana), setup description, full logs etc.
You can use the forum template for that.
Thanks.