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

Error establishing connection with New Relic Service at collector.newrelic.com:443:


#1

hello,
We upgraded production a week ago and since we are unable to connect to New Relic Service.
It worked fine before the upgrade.
We run ruby APM agent on rails application which starts unicorn, sidekiq and websocket-rails servers.
All using same rails application with same newrelic.yml

here is our newrelic.yml:

common: &default_settings
license_key: <%= ENV[“LICENSE_KEY”] %>
labels: <%= ENV[“NR_LABELS”] %>

app_name: Flow Designer

monitor_mode: true
developer_mode: false
log_level: info

browser_monitoring:

  auto_instrument: true

audit_log:
enabled: false

capture_params: false

transaction_tracer:

enabled: true

transaction_threshold: apdex_f

record_sql: obfuscated

stack_trace_threshold: 0.500

error_collector:

enabled: true
ignore_errors: "ActionController::RoutingError,Sinatra::NotFound"

development:
<<: *default_settings

monitor_mode: false
app_name: Flow Designer (Development)

developer_mode: true

test:
<<: *default_settings

monitor_mode: false

production:
<<: *default_settings

app_name: <%= ENV[“APP_NAME”] %>

staging:
<<: *default_settings
monitor_mode: true
app_name: Flow Designer (Staging)


This is what we get in newrelic_agent.log:

[2017-10-25 10:31:22 +0000 4ca8de4d6da7 (3015)] INFO : Starting the New Relic agent in “production” environment.
[2017-10-25 10:31:22 +0000 4ca8de4d6da7 (3015)] INFO : To prevent agent startup add a NEWRELIC_AGENT_ENABLED=false environment variable or modify the “production” section of your newrelic.yml.
[2017-10-25 10:31:22 +0000 4ca8de4d6da7 (3015)] INFO : Reading configuration from config/newrelic.yml (/home/git/gitlab)
[2017-10-25 10:31:22 +0000 4ca8de4d6da7 (3015)] INFO : Environment: production
[2017-10-25 10:31:22 +0000 4ca8de4d6da7 (3015)] INFO : No known dispatcher detected.
[2017-10-25 10:31:22 +0000 4ca8de4d6da7 (3015)] INFO : Application: SCRUM4.EWR2.SCRUM4-E:SYSTEM portal
[2017-10-25 10:31:22 +0000 4ca8de4d6da7 (3015)] ERROR : Error establishing connection with New Relic Service at collector.newrelic.com:443:
[2017-10-25 10:31:22 +0000 4ca8de4d6da7 (3015)] ERROR : NewRelic::Agent::ServerConnectionException: Recoverable error talking to collector.newrelic.com:443 after 2 attempts: end of file reached
[2017-10-25 10:31:22 +0000 4ca8de4d6da7 (3015)] INFO : Will re-attempt in 60 seconds
[2017-10-25 10:31:22 +0000 4ca8de4d6da7 (3015)] INFO : Installing New Relic supported Grape instrumentation
[2017-10-25 10:31:22 +0000 4ca8de4d6da7 (3015)] INFO : Installing Redis Instrumentation
[2017-10-25 10:31:22 +0000 4ca8de4d6da7 (3015)] INFO : Installing deferred Rack instrumentation
[2017-10-25 10:31:22 +0000 4ca8de4d6da7 (3015)] INFO : Installing Rack::Builder middleware instrumentation
[2017-10-25 10:31:22 +0000 4ca8de4d6da7 (3015)] INFO : Installing Rails 3+ middleware instrumentation
[2017-10-25 10:31:22 +0000 4ca8de4d6da7 (3015)] INFO : Installing Net instrumentation
[2017-10-25 10:31:22 +0000 4ca8de4d6da7 (3015)] INFO : Installing Sidekiq instrumentation
[2017-10-25 10:31:22 +0000 4ca8de4d6da7 (3015)] INFO : Installing ActiveRecord 4 instrumentation
[2017-10-25 10:31:22 +0000 4ca8de4d6da7 (3015)] INFO : Installing Rails 4 Error instrumentation
[2017-10-25 10:31:22 +0000 4ca8de4d6da7 (3015)] INFO : Installing Rails 4 view instrumentation
[2017-10-25 10:31:22 +0000 4ca8de4d6da7 (3015)] INFO : Installing Rails 4 Controller instrumentation
[2017-10-25 10:31:22 +0000 4ca8de4d6da7 (3015)] INFO : Finished instrumentation
[2017-10-25 10:31:24 +0000 4ca8de4d6da7 (3015)] INFO : Starting Agent shutdown
[2017-10-25 10:31:29 +0000 4ca8de4d6da7 (229)] ERROR : Error establishing connection with New Relic Service at collector.newrelic.com:443:
[2017-10-25 10:31:29 +0000 4ca8de4d6da7 (229)] ERROR : NewRelic::Agent::ServerConnectionException: Recoverable error talking to collector.newrelic.com:443 after 2 attempts: end of file reached
[2017-10-25 10:31:29 +0000 4ca8de4d6da7 (229)] INFO : Will re-attempt in 180 seconds

gem versions:
Ruby 2.1.9
rails 4.1.0
newrelic_rpm 3.14.0.305

Appreciate your support
Nesia,
Software-Engineer


#2

@namit Thanks for posting to the community. Would you please send us a permalink to your app in the UI? To create a permalink to any page within the New Relic user interface, scroll to the bottom and click ‘Permalink’ all the way on the right next to ‘Kiosk Mode.’ If you have concerns about posting a link to your app in a public forum, please keep in mind only New Relic employees with the proper access can view your account.

It’s interesting you saw the connection issue after upgrading your version of the Ruby agent. Is agent version 3.14.0.305, the agent version you upgraded to? Agent version 3.14.0 is a couple years old. If you’re able, can you please upgrade to the most recent version of the Ruby agent (more info here)? I can’t say whether your agent version is the reason for the issue but it would be helpful to rule it out.

Can you also try running the following from the host where the error is happening and send us the output? Please be sure you’re running in the same user context that the Ruby agent is running in.

  1. Using curl, we can check the status of our metric collector servers with the following command:
    curl -v https://collector.newrelic.com/status/mongrel

  2. Also try ping collector.newrelic.com and traceroute collector.newrelic.com. Look for successful ping replies, and a traceroute that terminates successfully at collector.newrelic.com (rather than ending in * * * repeated over and over again, or one that has any entries prefixed with !H)


#3

Hi there, we are having the same problem here, I tried all your commands all of them worked except for the traceroute (permissions are blocked in our case), is there something else to do?
newrelic_rpm (3.14.0.305)
ruby 2.2.3p173 (2015-08-18 revision 51636)

[2018-10-04 15:47:31 +0200 p-srv-http08 (3238)] ERROR : Error establishing connection with New Relic Service at collector.newrelic.com:443:
[2018-10-04 15:47:31 +0200 p-srv-http08 (3238)] ERROR : NewRelic::Agent::ServerConnectionException: Unexpected response from server (404): Not Found
[2018-10-04 15:47:31 +0200 p-srv-http08 (3238)] INFO : Will re-attempt in 600 seconds


#4

Hi there @sescobb27,

Thanks for participating in the community!

I’ll be continuing to investigate this issue on my end. In the meantime, I’d also suggest upgrading your agent version if possible. Our current Ruby Agent version is 5.4.0. You can read details on how our agent as progressed in our release notes here.

I’m also curious if you only saw this issue after an agent upgrade or if there was anything else that had recently changed on your end?

I look forward to your response and gaining more information that will help us troubleshoot.

Cheers!


#5

Hello, I have the save problem. I tried to run the command: curl -v https://collector.newrelic.com/status/mongrel and got the Connection timed out error. Here is the output:

  • Trying 162.247.242.26…
  • TCP_NODELAY set
  • connect to 162.247.242.26 port 443 failed: Connection timed out
  • Trying 162.247.242.27…
  • TCP_NODELAY set
  • After 85233ms connect time, move on!
  • connect to 162.247.242.27 port 443 failed: Connection timed out
  • Trying 50.31.164.149…
  • TCP_NODELAY set
  • After 42616ms connect time, move on!
  • connect to 50.31.164.149 port 443 failed: Connection timed out
  • Trying 50.31.164.146…
  • TCP_NODELAY set
  • After 21308ms connect time, move on!
  • connect to 50.31.164.146 port 443 failed: Connection timed out
  • Trying 50.31.164.148…
  • TCP_NODELAY set
  • After 10654ms connect time, move on!
  • connect to 50.31.164.148 port 443 failed: Connection timed out
  • Trying 162.247.242.28…
  • TCP_NODELAY set
  • After 5326ms connect time, move on!
  • connect to 162.247.242.28 port 443 failed: Connection timed out
  • Trying 50.31.164.145…
  • TCP_NODELAY set
  • After 2663ms connect time, move on!
  • connect to 50.31.164.145 port 443 failed: Connection timed out
  • Trying 50.31.164.147…
  • TCP_NODELAY set
  • After 1331ms connect time, move on!
  • connect to 50.31.164.147 port 443 failed: Connection timed out
  • Failed to connect to collector.newrelic.com port 443: Connection timed out
  • Closing connection 0
    curl: (7) Failed to connect to collector.newrelic.com port 443: Connection timed out

#6

Hey @ntd63t - We did recently make some changes to our DNS IPs. Can you verify that you have whitelisted our new IP Address block in your firewall?


#7

Hi Ryan, follow this post https://docs.newrelic.com/docs/apm/new-relic-apm/getting-started/networks, I have whitelisted these networks: 50.31.164.0/24 , 162.247.240.0/22 , 185.221.84.0/22 in my ubuntu server firewall. But the same problem still happened. Btw, I added new relic ruby agent to my app on November 7 and it has worked fine for few days. I have tried troubleshooting but nothing changed, so I have deleted my newrelic app. Here my account https://rpm.newrelic.com/accounts/288034/
Thanks


#8

Hey @ntd63t - That’s interesting, I’ll get a ticket opened up on your behalf for our experts to work with you.

Watch out for an email for that ticket. And if you get a resolution, feel free to post back the solution you found here with the community.


#9

Thank you for the update. My email is [Redacted by Admin]. If I find a solution for it, I’ll post it back here for sure


#10

Thanks @ntd63t - I’m looking forward to hearing back here.