-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
--- | ||
title: Network issues | ||
type: troubleshooting | ||
tags: | ||
- Infrastructure | ||
- Infrastructure monitoring troubleshooting | ||
- Troubleshoot logs | ||
- Network troubleshooting | ||
metaDescription: Troubleshooting suggestions if the New Relic infrastructure agent is not able to connect to the New Relic endpoints | ||
--- | ||
|
||
## Problem | ||
|
||
The infrastructure agent is experiencing network issues connecting to New Relic endpoints. | ||
Connectivity errors such as "Collector endpoint not reachable" or "Timeout exceeded while awaiting headers" appear on the agent logs. | ||
|
||
## Solution | ||
|
||
Verify that the New Relic infrastructure agent endpoints are reachable from the host where it is installed. | ||
Check failure on line 19 in src/content/docs/infrastructure/new-relic-infrastructure/troubleshooting/network-connection-issues.mdx GitHub Actions / vale-linter
Check warning on line 19 in src/content/docs/infrastructure/new-relic-infrastructure/troubleshooting/network-connection-issues.mdx GitHub Actions / vale-linter
|
||
Follow the instructions below to confirm there are no issues with your environment's network settings: | ||
|
||
<CollapserGroup> | ||
|
||
<Collapser id="windows" title="Windows"> | ||
|
||
Run the following command on the terminal: | ||
``` | ||
$ Invoke-WebRequest -Uri "https://infra-api.newrelic.com/cdn-cgi/trace" | ||
``` | ||
|
||
The expected output should include a `200 (OK)` as shown below: | ||
``` | ||
StatusCode : 200 | ||
StatusDescription : OK | ||
Content : fl=367f145 | ||
h=infra-api.newrelic.com | ||
ip=XX.YY.ZZ.ZZ | ||
ts=1696347189.607 | ||
visit_scheme=https | ||
uag=Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.22621.963 | ||
colo=MAD | ||
sliver=none | ||
htt... | ||
RawContent : HTTP/1.1 200 OK | ||
Transfer-Encoding: chunked | ||
Connection: keep-alive | ||
Access-Control-Allow-Origin: * | ||
CF-RAY: 81063def0905384e-MAD | ||
X-Frame-Options: DENY | ||
X-Content-Type-Options: nosniff | ||
Cache-Control... | ||
Forms : {} | ||
Headers : {[Transfer-Encoding, chunked], [Connection, keep-alive], [Access-Control-Allow-Origin, *], [CF-RAY, 81063def0905384e-MAD]...} | ||
Images : {} | ||
InputFields : {} | ||
Links : {} | ||
ParsedHtml : System.__ComObject | ||
RawContentLength : 284 | ||
``` | ||
|
||
</Collapser> | ||
|
||
<Collapser id="linux" title="Linux"> | ||
|
||
1. **Resolve the domain:** Use nslookup or dig to validate that the Linux system can resolve the domain to an IP address: | ||
Check warning on line 65 in src/content/docs/infrastructure/new-relic-infrastructure/troubleshooting/network-connection-issues.mdx GitHub Actions / vale-linter
|
||
|
||
``` | ||
$ nslookup infra-api.newrelic.com | ||
``` | ||
|
||
The output should contain a name and IP address. | ||
Check warning on line 71 in src/content/docs/infrastructure/new-relic-infrastructure/troubleshooting/network-connection-issues.mdx GitHub Actions / vale-linter
|
||
|
||
2. **Ping the server:** Try pinging the IP address obtained above to ensure you can reach the server. | ||
Check warning on line 73 in src/content/docs/infrastructure/new-relic-infrastructure/troubleshooting/network-connection-issues.mdx GitHub Actions / vale-linter
|
||
|
||
``` | ||
$ ping 162.247.241.2 | ||
``` | ||
|
||
The server should be reachable. | ||
|
||
3. **Traceroute:** Use traceroute to check the network path between your system and the server: | ||
|
||
``` | ||
$ traceroute -I infra-api.newrelic.com | ||
``` | ||
|
||
Analyze the output to identify potential network issues, such as high latency or packet loss. | ||
|
||
4. **Curl:** Use curl to check if the endpoint is reachable: | ||
|
||
```bash | ||
$ curl -v https://infra-api.newrelic.com/cdn-cgi/trace | ||
|
||
fl=366f101 | ||
h=infra-api.newrelic.com | ||
ip=XX.YY.ZZ.ZZ | ||
ts=1696347098.76 | ||
visit_scheme=https | ||
uag=curl/7.88.1 | ||
colo=MAD | ||
sliver=none | ||
http=http/1.1 | ||
loc=ES | ||
tls=TLSv1.3 | ||
sni=plaintext | ||
warp=off | ||
gateway=off | ||
rbi=off | ||
kex=X25519 | ||
* Connection #0 to host infra-api.newrelic.com left intact | ||
``` | ||
|
||
</Collapser> | ||
|
||
</CollapserGroup> | ||
|
||
## Troubleshoot with NRDiag | ||
|
||
[Code Implementation](https://github.com/newrelic/newrelic-diagnostics-cli/blob/main/tasks/infra/agent/connect.go#L48) | ||
|
||
```bash | ||
./nrdiag -t Infra/Agent/Connect | ||
``` | ||
|
||
**Expected output:** | ||
|
||
``` | ||
Check Results | ||
------------------------------------------------- | ||
Info Base/Env/CollectEnvVars [Gathered Environment variables of current shell.] | ||
Success Base/Config/Collect | ||
Success Base/Config/Validate | ||
Success Base/Config/LicenseKey | ||
Success Base/Config/ValidateLicenseKey | ||
Success Infra/Config/Agent | ||
Success Infra/Agent/Connect | ||
3 results not shown: 3 None | ||
See nrdiag-output.json for full results. | ||
``` | ||
|
||
**Output when endpoints are not reachable:** | ||
Check failure on line 141 in src/content/docs/infrastructure/new-relic-infrastructure/troubleshooting/network-connection-issues.mdx GitHub Actions / vale-linter
|
||
|
||
``` | ||
Failure - Infra/Agent/Connect | ||
There was an error connecting to https://log-api.newrelic.com | ||
Please check network and proxy settings and try again or see -help for more options. | ||
Error = Get "https://log-api.newrelic.com": dial tcp: lookup log-api.newrelic.com on [::1]:53: read udp [::1]:0->[::1]:53: i/o timeout | ||
See https://docs.newrelic.com/docs/new-relic-solutions/get-started/networks/#infrastructure for more information. | ||
``` | ||
|
||
Note that the nrdiag Connect task result is shown in stdout, it should be collected with the `nrdiag_output.zip` file. | ||
Check warning on line 152 in src/content/docs/infrastructure/new-relic-infrastructure/troubleshooting/network-connection-issues.mdx GitHub Actions / vale-linter
Check warning on line 152 in src/content/docs/infrastructure/new-relic-infrastructure/troubleshooting/network-connection-issues.mdx GitHub Actions / vale-linter
|
||
|
||
Refer to the technical documentation in the [Github repo](https://github.com/newrelic/infrastructure-agent/blob/master/docs/network_troubleshooting.md) for additional details. | ||
Check warning on line 154 in src/content/docs/infrastructure/new-relic-infrastructure/troubleshooting/network-connection-issues.mdx GitHub Actions / vale-linter
|