Elixir monitoring problem

Agents question template

I’m trying to add monitoring to a legacy Elixir application but at our production environment I’m seeing this error:

new_relic_agent - preconnect: (failed_request) {:failed_connect, [{:to_address, {'collector.newrelic.com', 443}}, {:inet, [:inet], :econnrefused}]}

Due to this error, nothing is sent to New Relic. I’m not an Elixir expert and I don’t have any idea of how to solve this problem.


Erlang/OTP 21 [erts-] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]

Elixir 1.8.2 (compiled with Erlang/OTP 21)


 erl --version
Erlang/OTP 21 [erts-] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]

I’m using this official New Relic Elixir agent at the version 1.19.4.

Additional Resources


Check Results

Info     Base/Env/CollectEnvVars [Gathered Environment variables of current shell.]
Failure  Base/Config/Collect
Warning  Java/AppServer/WebSphere
Failure  Base/Log/Copy
Info     Base/Env/HostInfo [Collected host information]
Error    Base/Env/InitSystem
Warning  Base/Config/LicenseKey
Success  Base/Env/DetectAWS
Success  Base/Collector/ConnectEU
Success  Base/Collector/ConnectUS
72 results not shown: 72 None
See nrdiag-output.json for full results.

Issues Found
Failure - Base/Config/Collect
New Relic configuration files not found where NR Diagnostics was executed. Please ensure the NR Diagnostics executable is within your application's directory alongside your New Relic agent configuration file(s). If you cannot set New Relic configuration files in your application's directory, move NR Diagnostics to that directory or use the -c <file_path> to specify the New Relic configuration file location.

Warning - Java/AppServer/WebSphere
We suspect this is a WebSphere environment but we're unable to determine the version. Supported status is unknown.
See https://docs.newrelic.com/docs/agents/java-agent/additional-installation/ibm-websphere-application-server for more information.

Failure - Base/Log/Copy
New Relic log file(s) not found where NR Diagnostics was executed, or in default agent log file paths. If you can see New Relic logs being generated, you will need to manually provide these logs if you are working with New Relic Support. Review the following document to send the proper level of logging for Support troubleshooting.
See https://docs.newrelic.com/docs/agents/manage-apm-agents/troubleshooting/generate-new-relic-agent-logs-troubleshooting for more information.

Error - Base/Env/InitSystem
Unable to read symbolic link for /sbin/init: lstat /sbin/init: no such file or directory

Warning - Base/Config/LicenseKey
No New Relic licenses keys were found. Please ensure a license key is set in your New Relic agent configuration or environment.
See https://docs.newrelic.com/docs/using-new-relic/cross-product-functions/install-configure/configure-agent for more information.

To diagnose a specific product or issue, see task suites options: './nrdiag/linux/nrdiag_x64 -h suites'

Hi @diego.bernardes1 - Welcome to the community.

I suspect that there is no connectivity to the New Relic collectors based on the first error. Ensure that you have a proxy configuration if needed and that the firewall is opened to New Relic. There is a list of Network information for New Relic.



Let us know if you still have this issue having reviewed your network allow lists with the info Stefan shared :slight_smile:


Sorry for the delay guys. Looks like the problem is related to the fact that we’re using a service mesh and the application is starting before the sidecar is ready.

I’m not an Elixir expert but I’m trying to enable the supervisor at the New Relic agent so it would just fail and restart until it eventually succeeds.

Cool! Thanks for confirming what the issue was.

Do let us know how you get on with getting the agent to restart till successful connection :slight_smile:

Confirmed. Waiting for the sidecar to be ready solved the problem. I used https://github.com/redboxllc/scuttle for this.

But still, I think we have a problem with the current Elixir agent, it should retry until it succeed.


Glad to hear you got that sorted by waiting for the sidecar :slight_smile: Thank you for coming back to confirm that.

I know that most agents are set to auto-retry when connection fails. But I’m not 100% certain on the Elixir agent. I’ll get this filed over as a request to the team that built that agent though. :slight_smile: