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

NewRelic daemon container resolves newrelic.com domain to 0.0.0.0

newrelic-daemon
dns

#1

I’m trying to install PHP Agent and daemon in separate containers (the recommended way). I managed to get everything installed and all containers start correctly.

The PHP agent is installed from the tar.gz file ( version 9.8.0.259). The daemon is started from docker newrelic/php-daemon:9.8.0 image.

From the agent side, everything works as expected, it can connect to the NewRelic daemon. The problem exists on the demon side.

When app is running I can see in the logs that PHP Agent connects to daemon and sends the request data, but later daemon fails with:

newrelic_1  | 2020/03/26 18:47:57.379611 (21) Warning: app 'MY_APP_NAME' connect attempt returned Post https://collector.newrelic.com/agent_listener/invoke_raw_method?license_key={LICENSE}&marshal_format=json&method=preconnect&protocol_version=16: dial tcp 0.0.0.0:443: getsockopt: connection refused

It clearly cannot access the collector.newrelic.com, somehow it resolves to 0.0.0.0. I did bit more digging and:

# ping google.com
PING google.com (216.58.215.78): 56 data bytes
64 bytes from 216.58.215.78: seq=0 ttl=56 time=20.518 ms

# ping newrelic.com
PING newrelic.com (0.0.0.0): 56 data bytes
64 bytes from 127.0.0.1: seq=0 ttl=64 time=0.086 ms

# ping collector.newrelic.com
PING collector.newrelic.com (0.0.0.0): 56 data bytes
64 bytes from 127.0.0.1: seq=0 ttl=64 time=0.090 ms

# ping discuss.newrelic.com
PING discuss.newrelic.com (162.247.242.37): 56 data bytes
64 bytes from 162.247.242.37: seq=0 ttl=237 time=201.090 ms
64 bytes from 162.247.242.37: seq=1 ttl=237 time=150.759 ms

The newrelic daemon can resolve any address, but newrelic.com and collector.newrelic.com is resolved to 0.0.0.0.

I also tried to run dig and this is the result
# dig collector.newrelic.com

; <<>> DiG 9.14.8 <<>> collector.newrelic.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62948
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;collector.newrelic.com.		IN	A

;; ANSWER SECTION:
collector.newrelic.com.	2	IN	A	0.0.0.0

;; Query time: 3 msec
;; SERVER: 127.0.0.11#53(127.0.0.11)
;; WHEN: Thu Mar 26 19:21:21 UTC 2020
;; MSG SIZE  rcvd: 67

This is the way how I start the daemon (by using docker-compose)

    newrelic:
            image: newrelic/php-daemon:9.8.0
            networks:
                - overlay
            command: /usr/bin/newrelic-daemon --address=newrelic:31339 --watchdog-foreground

This problem also existed on 9.7.0.


#2

Ok, just found the issue. It’s the pihole instance in network that blocks access to collector.newrelic.com


#3

Thanks for sharing what the issue was. I’m going to mark it as solved and leave this topic open for other Explorers to view in case they have a similar issue.