Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

I can not be APM monitored app running on added container of kubernetes

rails
container
kubernetes

#1

Hi,

On kubernetes, when I created a ‘deployment’, I set the number of pods to be started first to 5.
About the 5 pods, I was able to confirm 5 applications were running on APM web UI.
But, even if I increase the number of pods to 6, I can only see 5 apps on APM web UI.
And, When I set the number of pods to 5 -> 0 -> 5(It is refresh pods), I could confirm that no one application is running on APM web UI.
In other words, the error has occurred when launching container other than initial setting.

Is something wrong with kubernetes and APM Agent collaboration, or I lost settings?

  • Gem and other Details
    Ruby 2.5.1
    Rails 5.2.1
    newrelic_rpm 5.5.0.348
    kubernetes v1.9.5

  • newrelic_agent.log

INFO : Doing deferred dependency-detection before Rack startup
ERROR : Error establishing connection with New Relic Service at collector.newrelic.com:0:
ERROR : NewRelic::Agent::ServerConnectionException: Recoverable error talking to collector.newrelic.com:0 after 2 attempts: execution expired
INFO : Will re-attempt in 60 seconds
ERROR : Error establishing connection with New Relic Service at collector.newrelic.com:0:
ERROR : NewRelic::Agent::ServerConnectionException: Recoverable error talking to collector.newrelic.com:0 after 2 attempts: execution expired
INFO : Will re-attempt in 120 seconds
ERROR : Error establishing connection with New Relic Service at collector.newrelic.com:0:
ERROR : NewRelic::Agent::ServerConnectionException: Recoverable error talking to collector.newrelic.com:0 after 2 attempts: execution expired

Thank you for your attention.


#2

Hey @takahashi-hiroya, I see you have a ticket in about this issue as well, it would be great if you post any solution you are able to find back here for other users :smiley:


#3

The issue was solved by inquiries to support.

Agent couldn’t establishing connection for collector.newrelic.com because agent used port 0.

The cause that agent used port 0 is unknown, but when I set environment var NEW_RELIC_PORT = 443 on Kubernetes, agent can establishing connection.
I hope I can be of any help to other users.

Thank you.


#4

Hey Hiroya, thank you for sharing the solution with the community! :smiley: