cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Failed metric ingestion: java.net.ConnectException: Connection refused (Connection refused)

GayathriVRadha
Newcomer_

I am trying to send metrics from spring Boot Application deployed in the host where Dynatrace operator and dynatrace One Agent in installed already. But am getting below error.

 

Started Application ----

 
 "io.micrometer.dynatrace.v2.DynatraceExporterV2"
"Failed metric ingestion: java.net.ConnectException: Connection refused (Connection refused)"
 
I am trying deploy the application in same namespace and cluster where dynatrace operator and Agent are installed, And am not supplying url and token from my spring boot app since I am trying to deploying in the same host where agent/operator are running . Am I missing something here. Is it because My application is not able to establish a connection with Dynatrace Oneagent/Operator ?
 
Please help on this
10 REPLIES 10

ChadTurner
DynaMight Legend
DynaMight Legend

@GayathriVRadha is that the correct port? 

-Chad

And beside the port could also check that if the OneAgent metric api is enabled on those hosts since I'm assuming that currently your setup tries to send the data towards oneagent.

https://www.dynatrace.com/support/help/shortlink/local-api#enable-the-oneagent-metric-api

manisundaram
Contributor

You got this working ? We are experiencing same problem here

Mizső
DynaMight Guru
DynaMight Guru

Hi @GayathriVRadha,

We have the same probleam at a client environment however extension controller settings are enabled. Have you found the reason of the connection refuse message? 

Mizs_0-1712780672041.png

Best regards,

Mizső

Dynatrace Community RockStar 2024, Certified Dynatrace Professional

chary441
Newcomer

I am seeing the same issue on the AKS. Do you guys have a solution for above issue?

panda
Guide

the same issue happened for me when using micrometer-dyantrace to automate send metric into dynatrace, is there any solution?

krusheel
Newcomer_

Any update on this ? , For an OSGi system , We have added micrometer-dynatrace to send metrics via Oneagent installed in a host.We are getting the same error : 

*WARN* [dynatrace-metrics-publisher] io.micrometer.dynatrace.v2.DynatraceExporterV2 Failed metric ingestion: java.net.ConnectException: Connection refused

 

m_zol
Participant

The problem might be because the feature of metric-ingest on the active gate is not enabled by default:

  activeGate:
    # Specifies which capabilities will be enabled on ActiveGate instances
    # The following capabilities can be set:
    # - routing
    # - kubernetes-monitoring
    # - metrics-ingest
    # - dynatrace-api
    #
    capabilities:
      - routing
      - kubernetes-monitoring
      - dynatrace-api

Hi, same issue here, does anybody know the solution? Thanks

Peter_Youssef
Champion

Hello @GayathriVRadha 

Kindly check the below points for validation:

  1. Network Connectivity: Ensure that the server running Dynatrace has proper internet connectivity and can reach necessary endpoints.
  2. Proxy Configuration: If you're using a proxy, verify that it is configured correctly within Dynatrace.
  3. Firewall Settings: Ensure the necessary ports are open, as firewalls may block communication between Dynatrace and its back-end systems.
  4. DNS Resolution: Sometimes issues with DNS can cause connection problems. Check whether DNS resolution works correctly for Dynatrace servers.
  5. Increase Timeout: In some cases, adjusting the timeout values in the Dynatrace settings can help resolve connection issues.
  6. Check Logs: Look for additional clues in the Dynatrace server logs or Java application logs that might highlight the root cause
  7. Check if these modules are properly enabled or not on the ActiveGates  https://docs.dynatrace.com/docs/shortlink/sgw-configure#otlp_ingest_mod && https://docs.dynatrace.com/docs/shortlink/sgw-configure#api_mod 
  8. The proper token scopes ae configured to allow the metric ingestions

Feel free to review the below sources for further help:

Hoping it helps.

KR, 
Peter

Dynatrace already provides a multitude of metrics collected by OneAgent and out-of-the box integrations today. Complementing existing metrics with relevant business and custom metrics from different sources (Prometheus, Telegraf, Micrometer, system monitoring tools ...) will enable you to further

Featured Posts