---
title: Firewall or traffic connectivity failures
source: https://docs.newrelic.com/docs/apm/agents/java-agent/troubleshooting/firewall-or-traffic-connectivity-failures
---

## Problem

The [log data](https://docs.newrelic.com/docs/agents/java-agent/troubleshooting/generate-debug-logs-troubleshooting-java) for your Java app shows failures to connect to New Relic. You want to verify if the `INFO` messages are due to traffic connectivity or firewall rules, or if they are due to more serious issues.

## Solution

Occasional failures to connect to the [New Relic collector](https://docs.newrelic.com/docs/accounts-partnerships/education/getting-started-new-relic/glossary#collector) should not be a cause for concern. These failures should not affect the performance metrics available in your app's New Relic user interface.

New Relic's Java agent attempts to connect about once a minute. To troubleshoot the problem:

1.  Search your log files for [`INFO` messages about connection failures](#info-messages).
2.  Check [how frequently the messages appear](#message-frequency).

For example, look for messages such as:

```
Jul 31, 2017 21:37:14 +0000 NewRelic 10
INFO: Failed to connect to collector.newrelic.com.:443 for My Application:java.net.
ConnectException: Connection refused:connect
```

or

```
Jul 31, 2017 21:37:14 +0000 NewRelic 40
INFO: The data collector is temporarily unavailable.
This can happen periodically. In the event that availability of our servers 
is not restored after a period of time, 
then please report this to New Relic.
java.net.SocketException: Connection reset
```

Depending on how frequently the message appears, do the following to troubleshoot the problem:

| **Frequency of INFO message**    | **Comments**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| A few minutes                    | New Relic's Java agent can cache a significant amount of metric data when it cannot connect. Even if the outage lasts a few minutes, in general, this will not result in any loss of information in the APM UI. You can safely ignore these messages.                                                                                                                                                                                                                                                                                 |
| Intermittently over a few days   | Intermittent connection issues can occasionally cause many of these messages in a short time. If this occurs only once every few days, and all your app data appears in the New Relic UI, you can safely ignore these messages.                                                                                                                                                                                                                                                                                                       |
| Every minute for several minutes | If failures occur every minute for more than a few minutes, then the Java agent is not able to receive data from your app, and no data can be reported. In this situation: - Verify whether New Relic is experiencing availability problems: Check New Relic's status at [status.newrelic.com](https://status.newrelic.com). - If New Relic is not reporting any issues, [gather troubleshooting information](https://docs.newrelic.com/docs/agents/java-agent/troubleshooting/gather-troubleshooting-information-java) for your app. |

## Cause

Despite the log text, this error generally is caused by a failure of connectivity or firewalled traffic rather than the New Relic collector actually being unavailable. For more information, see the lists of [IP ranges](https://docs.newrelic.com/docs/apm/new-relic-apm/getting-started/networks) used by all of New Relic's services.
