DDAgentApi keep throwing SocketException: Connection reset?
Hi,
I keep getting this error.
[dd.trace 2021-04-15 04:27:00:159 +0000] [dd-trace-writer] WARN datadog.trace.agent.common.writer.ddagent.DDAgentApi - Error while sending 1 of 1 (size=1015B) traces to the DD agent. Total: 2043, Received: 2043, Sent: 0, Failed: 2043. java.net.SocketException: Connection reset (Will not log errors for 5 minutes)
But the metrics and logs still work in Datadog.
Is there any way to fix this Error?
Thanks
@kevinlilendi,
It looks like datadog-agent was running and then it was properly shut down(restarted?) and closed the connection. But jvm application (with -javaagent:dd-java-agent.jar) keeps sending remaining traces to already closed connection.
Could you please provide more logs before that and more information about your environment? What are the versions of datadog-agent and java tracer are you using ?
I am getting a similar error
WARN datadog.trace.agent.common.writer.ddagent.DDAgentApi - Error while sending 1 (size=591B) traces to the DD agent. Total: 130, Received: 130, Sent: 0, Failed: 130. java.net.ConnectException: Failed to connect to localhost/127.0.0.1:8126
my dd agent is running and I am still getting this error? can you help?
Any updates or workarounds for this issue? Seeing the same error with DD agent up and running.
Hey, we are also experiencing this warning, (even though the agent seems to work):
[dd.trace 2022-02-10 21:58:40:961 +0000] [dd-trace-processor] WARN datadog.trace.agent.common.writer.ddagent.DDAgentApi - Error while sending 27 (size=21KB) traces to the DD agent. Total: 6288, Received: 6288, Sent: 0, Failed: 6288. java.net.ConnectException: Failed to connect to localhost/127.0.0.1:8126 (Will not log errors for 5 minutes)
Should we ignore that warning or is there a fix?
any updates/ fixes here?
getting spammed by
dd-trace-writer] WARN datadog.trace.agent.common.writer.ddagent.DDAgentApi - Error while sending 1 of 1 traces to the DD agent. java.net.SocketException: Connection reset (going silent for 5 minutes)
^^ log entry from today, spam started on March 5th
DD_APM_NON_LOCAL_TRAFFIC is set to true
Any ideas why it's happening [dd-trace-processor] WARN datadog.trace.agent.common.writer.ddagent.DDAgentApi - Error while sending 32 (size=126KB) traces to the DD agent. Total: 66536, Received: 66536, Sent: 0, Failed: 66536. java.net.SocketTimeoutException: Connect timed out (Will not log errors for 5 minutes) ?
@SVynnytska - I have faced similar issue, turned out it was "network policy" who was blocking http:localhost:8126 communication. upon opening up network policy APM trace started reporting trace in DD UI.