# Not able to connect my apm-agent to my apm-server and data transfer from hosted on same server

**URL:** <https://discuss.elastic.co/t/not-able-to-connect-my-apm-agent-to-my-apm-server-and-data-transfer-from-hosted-on-same-server/330627>\
**Category:** Elastic Agent\
**Created:** [April 24, 2023, 9:56am UTC](https://discuss.elastic.co/t/not-able-to-connect-my-apm-agent-to-my-apm-server-and-data-transfer-from-hosted-on-same-server/330627 "2023-04-24T09:56:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tataelastic](https://avatars.discourse-cdn.com/v4/letter/t/e79b87/32.png) [@Tataelastic](https://discuss.elastic.co/u/Tataelastic)\
**Post date:** [April 24, 2023, 9:56am UTC](https://discuss.elastic.co/t/not-able-to-connect-my-apm-agent-to-my-apm-server-and-data-transfer-from-hosted-on-same-server/330627/1 "2023-04-24T09:56:10Z")

</div>

I have deployed elasticsearch, kibana, apm-server on same server  
ip: 10.8.30.220  
output for [http://10.8.30.220:8200](http://10.8.30.220:8200)  
{  
"build\_date": "2023-01-31T04:33:06Z",  
"build\_sha": "71a8b4c241eb5b4609862c8354d2aa2270f6c568",  
"publish\_ready": true,  
"version": "7.17.9"  
}  
I'm getting below error  
ERROR co.elastic.apm.agent.configuration.ApmServerConfigurationSource - Connection refused  
2023-04-24 13:04:20,331 [elastic-apm-server-reporter] ERROR co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Error trying to connect to APM Server at [http://10.8.30.220:8200/intake/v2/events](http://10.8.30.220:8200/intake/v2/events). Although not necessarily related to SSL, some related SSL configurations corresponding the current connection are logged at INFO level.  
2023-04-24 13:04:20,332 [elastic-apm-server-reporter] ERROR co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Failed to handle event of type JSON\_WRITER with this error: Connection refused  
2023-04-24 13:04:20,332 [elastic-apm-server-reporter] INFO co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Backing off for 36 seconds (+/-10%)  
2023-04-24 13:04:57,311 [elastic-apm-server-reporter] ERROR co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Error trying to connect to APM Server at [http://10.8.30.220:8200/intake/v2/events](http://10.8.30.220:8200/intake/v2/events). Although not necessarily related to SSL, some related SSL configurations corresponding the current connection are logged at INFO level.  
2023-04-24 13:04:57,311 [elastic-apm-server-reporter] ERROR co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Failed to handle event of type JSON\_WRITER with this error: Connection refused  
2023-04-24 13:04:57,311 [elastic-apm-server-reporter] INFO co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Backing off for 36 seconds (+/-10%)

---

<div class="post-metadata">

**Author:** ![Wave](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wave/32/117242_2.png) [@Wave](https://discuss.elastic.co/u/Wave)\
**Post date:** [April 28, 2023, 4:39pm UTC](https://discuss.elastic.co/t/not-able-to-connect-my-apm-agent-to-my-apm-server-and-data-transfer-from-hosted-on-same-server/330627/2 "2023-04-28T16:39:35Z")

</div>

Hi @Tataelastic

What ip addresses are all the server configured to listen on, 10.8.30.220, 0.0.0.0, 127.0.0.1?  
My hunch is maybe the apm-server is listening on the localhost (127.0.0.1) and therefor not listening on 10.8.30.220. Baring that it could be a firewall setting (often seen with RHEL).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 26, 2023, 4:40pm UTC](https://discuss.elastic.co/t/not-able-to-connect-my-apm-agent-to-my-apm-server-and-data-transfer-from-hosted-on-same-server/330627/3 "2023-05-26T16:40:01Z")

</div>

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