# Issue in sending data to APM server through agent

**URL:** <https://discuss.elastic.co/t/issue-in-sending-data-to-apm-server-through-agent/344048>\
**Category:** APM\
**Tags:** dotnet, server\
**Created:** [September 28, 2023, 9:06am UTC](https://discuss.elastic.co/t/issue-in-sending-data-to-apm-server-through-agent/344048 "2023-09-28T09:06:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Samiullah\_Shah](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samiullah_shah/32/116077_2.png) [@Samiullah\_Shah](https://discuss.elastic.co/u/Samiullah_Shah)\
**Post date:** [September 28, 2023, 9:06am UTC](https://discuss.elastic.co/t/issue-in-sending-data-to-apm-server-through-agent/344048/1 "2023-09-28T09:06:09Z")

</div>

Em unable to send any data via apm agent. i tried to create new agent and connect it with apm server but it got worse now my apm server which running but it says not publish ready. bcz of which i removed the current agent and fleet from kibana and try to install a new one now its not even doint that and i try to install fleet it say can't enroll. need your assistance em new on elk.  
**Kibana version** : 8.10.1.

**Elasticsearch version** : 8.10.1

**APM Server version** : 8.10.1

**APM Agent language and version** :

**Browser version** : 117.0.1

**Original install method (e.g. download page, yum, deb, from source, etc.) and version**:

**Fresh install or upgraded from other version?** fresh installation with little work has been done on it

**Is there anything special in your setup?** For example, are you using the Logstash or Kafka outputs? Are you using a load balancer in front of the APM Servers? Have you changed index pattern, generated custom templates, changed agent configuration etc.: No

**Description of the problem including expected versus actual behavior. Please include screenshots (if relevant)**:  
 ![Screenshot from 2023-09-28 11-55-49](https://us1.discourse-cdn.com/elastic/original/3X/e/7/e70c33ad9e50858f5bfc709cf3b70671abadb9c0.png)

**Steps to reproduce** :  
1.  
2.  
3.

**Errors in browser console (if relevant)**:

**Provide logs and/or server output (if relevant)**:  
Sep 13 13:31:25 sami-Alienware-Area-51m apm-server[38983]: Error: listen tcp 127.0.0.1:8200: bind: address already in use  
Sep 13 13:31:25 sami-Alienware-Area-51m apm-server[38983]: Usage:  
Sep 13 13:31:25 sami-Alienware-Area-51m apm-server[38983]: apm-server [flags]  
Sep 13 13:31:25 sami-Alienware-Area-51m apm-server[38983]: apm-server [command]  
Sep 13 13:31:25 sami-Alienware-Area-51m apm-server[38983]: Available Commands:  
Sep 13 13:31:25 sami-Alienware-Area-51m apm-server[38983]: apikey Manage API Keys for communication between APM agents and server (deprecated)  
Sep 13 13:31:25 sami-Alienware-Area-51m apm-server[38983]: export Export current config  
Sep 13 13:31:25 sami-Alienware-Area-51m apm-server[38983]: help Help about any command  
Sep 13 13:31:25 sami-Alienware-Area-51m apm-server[38983]: keystore Manage secrets keystore  
Sep 13 13:31:25 sami-Alienware-Area-51m apm-server[38983]: run Run APM Server  
Sep 13 13:31:25 sami-Alienware-Area-51m apm-server[38983]: test Test config  
Sep 13 13:31:25 sami-Alienware-Area-51m apm-server[38983]: version Show current version info  
Sep 13 13:31:25 sami-Alienware-Area-51m apm-server[38983]: Flags:  
Sep 13 13:31:25 sami-Alienware-Area-51m apm-server[38983]: -E, --E setting=value Configuration overwrite  
Sep 13 13:31:25 sami-Alienware-Area-51m apm-server[38983]: -N, --N Disable actual publishing for testing  
Sep 13 13:31:25 sami-Alienware-Area-51m apm-server[38983]: -c, --c string Configuration file, relative to path.config (default "apm-server.yml")  
Sep 13 13:31:25 sami-Alienware-Area-51m apm-server[38983]: --cpuprofile string Write cpu profile to file  
Sep 13 13:31:25 sami-Alienware-Area-51m apm-server[38983]: -d, --d stringArray Enable certain debug selectors  
Sep 13 13:31:25 sami-Alienware-Area-51m apm-server[38983]: -e, --e Log to stderr and disable syslog/file output  
Sep 13 13:31:25 sami-Alienware-Area-51m apm-server[38983]: --environment string Set the environment in which the process is running (default "default")  
Sep 13 13:31:25 sami-Alienware-Area-51m apm-server[38983]: -h, --help help for apm-server  
Sep 13 13:31:25 sami-Alienware-Area-51m apm-server[38983]: --httpprof string Start pprof http server  
Sep 13 13:31:25 sami-Alienware-Area-51m apm-server[38983]: --memprofile string Write memory profile to this file  
Sep 13 13:31:25 sami-Alienware-Area-51m apm-server[38983]: --path.config string Configuration path (default "")  
Sep 13 13:31:25 sami-Alienware-Area-51m apm-server[38983]: --path.data string Data path (default "")  
Sep 13 13:31:25 sami-Alienware-Area-51m apm-server[38983]: --path.home string Home path (default "")  
Sep 13 13:31:25 sami-Alienware-Area-51m apm-server[38983]: --path.logs string Logs path (default "")  
Sep 13 13:31:25 sami-Alienware-Area-51m apm-server[38983]: --strict.perms Strict permission checking on config files (default true)  
Sep 13 13:31:25 sami-Alienware-Area-51m apm-server[38983]: -v, --v Log at INFO level  
Sep 13 13:31:25 sami-Alienware-Area-51m apm-server[38983]: Use "apm-server [command] --help" for more information about a command.  
Sep 13 13:31:25 sami-Alienware-Area-51m systemd[1]: apm-server.service: Main process exited, code=exited, status=1/FAILURE  
Sep 13 13:31:25 sami-Alienware-Area-51m systemd[1]: apm-server.service: Failed with result 'exit-code'.  
Sep 13 13:31:25 sami-Alienware-Area-51m systemd[1]: apm-server.service: Scheduled restart job, restart counter is at 1.  
Sep 13 13:31:25 sami-Alienware-Area-51m systemd[1]: Stopped Elastic APM Server.  
Sep 13 13:31:25 sami-Alienware-Area-51m systemd[1]: Started Elastic APM Server.  
Sep 13 13:31:25 sami-Alienware-Area-51m apm-server[38993]: {"log.level":"info","@timestamp":"2023-09-13T13:31:25.726+0300","log.origin":{"file.name":"beatcmd/beat.go","file.line":139},"message":"Home pat\>  
Sep 13 13:31:25 sami-Alienware-Area-51m apm-server[38993]: {"log.level":"info","@timestamp":"2023-09-13T13:31:25.726+0300","log.origin":{"file.name":"beatcmd/beat.go","file.line":146},"message":"Beat ID:\>  
Sep 13 13:31:25 sami-Alienware-Area-51m apm-server[38993]: {"log.level":"info","@timestamp":"2023-09-13T13:31:25.726+0300","log.logger":"beat","log.origin":{"file.name":"beatcmd/beat.go","file.line":576}\>  
Sep 13 13:31:25 sami-Alienware-Area-51m apm-server[38993]: {"log.level":"info","@timestamp":"2023-09-13T13:31:25.726+0300","log.logger":"beat","log.origin":{"file.name":"beatcmd/beat.go","file.line":584}\>  
Sep 13 13:31:25 sami-Alienware-Area-51m apm-server[38993]: {"log.level":"info","@timestamp":"2023-09-13T13:31:25.726+0300","log.logger":"beat","log.origin":{"file.name":"beatcmd/beat.go","file.line":587}\>  
Sep 13 13:31:25 sami-Alienware-Area-51m apm-server[38993]: {"log.level":"info","@timestamp":"2023-09-13T13:31:25.726+0300","log.origin":{"file.name":"beatcmd/maxprocs.go","file.line":68},"message":"maxpr\>  
Sep 13 13:31:25 sami-Alienware-Area-51m apm-server[38993]: {"log.level":"info","@timestamp":"2023-09-13T13:31:25.727+0300","log.logger":"beat","log.origin":{"file.name":"beatcmd/beat.go","file.line":591}\>  
Sep 13 13:31:25 sami-Alienware-Area-51m apm-server[38993]: {"log.level":"info","@timestamp":"2023-09-13T13:31:25.727+0300","log.logger":"beat","log.origin":{"file.name":"beatcmd/beat.go","file.line":620}\>  
...skipping...

---

<div class="post-metadata">

**Author:** ![Carson\_Ip](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carson_ip/32/115912_2.png) [@Carson\_Ip](https://discuss.elastic.co/u/Carson_Ip)\
**Post date:** [September 28, 2023, 4:54pm UTC](https://discuss.elastic.co/t/issue-in-sending-data-to-apm-server-through-agent/344048/2 "2023-09-28T16:54:21Z")

</div>

Hi,

I'm afraid there's not much useful info in the logs you attached here.

In the first part, there is a `Error: listen tcp 127.0.0.1:8200: bind: address already in use` error, meaning that port 8200 is in use on your computer by another process. A quick way to address that is to find out the process that is using the port and kill that if possible.

In the 2nd part of the logs after restarting APM server, there is nothing interesting before `...skipping...`. Therefore I cannot see the specific log line about apm-server not being publish ready.

Please attach the relevant logs to help us understand the issue you are facing.

---

<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:** [October 26, 2023, 4:54pm UTC](https://discuss.elastic.co/t/issue-in-sending-data-to-apm-server-through-agent/344048/3 "2023-10-26T16:54:39Z")

</div>

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