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

Php agent is not reporting


#1

Hello,
I have a Ubuntu 18.04.1 running php 7.2 version. It is not reporting to newrelic.
By the way, my website is just a simple http (port 80) text site.

Newrelic-daemon is running, as below:

service newrelic-daemon status
● newrelic-daemon.service - LSB: The New Relic Proxy Daemon
_ Loaded: loaded (/etc/init.d/newrelic-daemon; generated)_
_ Active: active (exited) since Sun 2018-11-11 00:17:53 EST; 9h ago_
_ Docs: man:systemd-sysv-generator(8)_
_ Tasks: 0 (limit: 1083)_
_ CGroup: /system.slice/newrelic-daemon.service_

I ran nrdiag for troubleshooting

Check Results

Info Base/Env/CollectEnvVars [Gathered Environment variables of current shell.]
Success Base/Config/Collect
Success Base/Config/Validate
Info Base/Env/HostInfo [ubuntu]
Success Base/Collector/Connect
We’ve found a file that may contain secure information: /var/log/syslog
Include it in the zip file? [y/n]: y
adding file /var/log/syslog
Success Base/Log/Copy
Success Base/Log/ReportingTo
Success PHP/Config/Agent
Success PHP/Daemon/Running
38 results not shown: 38 None
See nrdiag-output.json for full results.

No Issues Found

I verbose /var/log/newrelic/newrelic-daemon.log and php_agent.log
newrelic_daemon.log below:

2018/11/11 09:23:37.689033 (42024) Debug: PCF not detected: One or more PCF environment variables are unavailable
2018/11/11 09:23:37.689492 (42024) Debug: Did not detect Docker on this platform: Docker container id has unrecognized format, id=""
2018/11/11 09:23:37.715582 (42024) Info: daemon listening on /tmp/.newrelic.sock
2018/11/11 09:23:37.871459 (42024) Debug: GCP not detected: invalid character '<' looking for beginning of value
2018/11/11 09:23:38.693912 (42024) Debug: AWS not detected: Get http://169.254.169.254/2016-09-02/dynamic/instance-identity/document: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
2018/11/11 09:23:38.699051 (42024) Debug: Azure not detected: Get http://169.254.169.254/metadata/instance/compute?api-version=2017-03-01: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
2018/11/11 09:39:02.880011 (42225) Info: New Relic daemon version 8.3.0.226-56d5a21db092 [listen="/tmp/.newrelic.sock" startup=agent pid=42225 ppid=42221 uid=0 euid=0 gid=0 egid=0 runtime="go1.8.3" GOMAXPROCS=1 GOOS=linux GOARCH=amd64]
2018/11/11 09:39:02.882798 (42225) Debug: ARGV[0]: /usr/bin/newrelic-daemon
2018/11/11 09:39:02.882810 (42225) Debug: ARGV[1]: --agent

~~~~~~~~~~~~~~~~~~~~

php_agent.log below
~~~~~~~~~~~~~~~~~~
2018-11-11 09:39:02.887 -0500 (42221 42221) verbosedebug: RINIT processing started
2018-11-11 09:39:02.887 -0500 (42221 42221) verbosedebug: daemon connect(fd=4 uds=/tmp/.newrelic.sock) returned -1 errno=ENOENT
2018-11-11 09:39:02.887 -0500 (42221 42221) warning: daemon connect(fd=4 uds=/tmp/.newrelic.sock) returned -1 errno=ENOENT. Failed to connect to the newrelic-daemon. Please make sure that there is a properly configured newrelic-daemon running. For additional assistance, please see: https://newrelic.com/docs/php/newrelic-daemon-startup-modes
2018-11-11 09:39:02.887 -0500 (42221 42221) debug: unable to begin transaction: no daemon connection
2018-11-11 09:39:02.887 -0500 (42221 42221) verbosedebug: post-deactivate processing started
2018-11-11 09:39:02.887 -0500 (42221 42221) verbosedebug: post-deactivate processing done
2018-11-11 09:39:02.889 -0500 (42221 42221) debug: MSHUTDOWN processing started

Greatly appreciate any suggestion.

#2

More logs from newrelic_daemon.log
2018/11/11 10:39:02.457875 (2529) Info: New Relic daemon version 8.3.0.226-56d5a21db092 [listen=“80” startup=agent pid=2529 ppid=2519 uid=0 euid=0 gid=0 egid=0 runtime=“go1.8.3” GOMAXPROCS=1 GOOS=linux GOARCH=amd64]
2018/11/11 10:39:02.457923 (2529) Debug: ARGV[0]: /usr/bin/newrelic-daemon
2018/11/11 10:39:02.457926 (2529) Debug: ARGV[1]: --agent
2018/11/11 10:39:02.457929 (2529) Debug: ARGV[2]: --pidfile
2018/11/11 10:39:02.457931 (2529) Debug: ARGV[3]: /var/run/newrelic-daemon.pid
2018/11/11 10:39:02.457933 (2529) Debug: ARGV[4]: --logfile
2018/11/11 10:39:02.457935 (2529) Debug: ARGV[5]: /var/log/newrelic/newrelic-daemon.log
2018/11/11 10:39:02.457938 (2529) Debug: ARGV[6]: --loglevel
2018/11/11 10:39:02.457940 (2529) Debug: ARGV[7]: debug
2018/11/11 10:39:02.457942 (2529) Debug: ARGV[8]: --port
2018/11/11 10:39:02.457946 (2529) Debug: ARGV[9]: 80
2018/11/11 10:39:02.457948 (2529) Debug: ARGV[10]: --tls
2018/11/11 10:39:02.457950 (2529) Debug: ARGV[11]: --define
2018/11/11 10:39:02.457952 (2529) Debug: ARGV[12]: utilization.detect_aws=true
2018/11/11 10:39:02.457955 (2529) Debug: ARGV[13]: --define
2018/11/11 10:39:02.457957 (2529) Debug: ARGV[14]: utilization.detect_azure=true
2018/11/11 10:39:02.457959 (2529) Debug: ARGV[15]: --define
2018/11/11 10:39:02.457961 (2529) Debug: ARGV[16]: utilization.detect_gcp=true
2018/11/11 10:39:02.457963 (2529) Debug: ARGV[17]: --define
2018/11/11 10:39:02.457974 (2529) Debug: ARGV[18]: utilization.detect_pcf=true
2018/11/11 10:39:02.457977 (2529) Debug: ARGV[19]: --define
2018/11/11 10:39:02.457982 (2529) Debug: ARGV[21]: -no-pidfile
2018/11/11 10:39:02.457987 (2529) Debug: process role is worker
2018/11/11 10:39:02.457993 (2529) Info: increased file limit to 2048
2018/11/11 10:39:02.458018 (2529) Info: collector configuration is &{CAFile: CAPath: Proxy:}
2018/11/11 10:39:02.461993 (2529) Info: daemon listening on 127.0.0.1:80
2018/11/11 10:39:02.462700 (2529) Debug: PCF not detected: One or more PCF environment variables are unavailable
2018/11/11 10:39:02.463344 (2529) Debug: Did not detect Docker on this platform: Docker container id has unrecognized format, id=""
2018/11/11 10:39:02.528731 (2519) Info: watcher received signal 15 - exiting
2018/11/11 10:39:02.529539 (2529) Info: worker received signal 15 - exiting


#3

I also changed the newrelic.daemon port in the .ini file to the abstract socket, “@newrelic-daemon” . And the quotes are added with @newrelic-daemon.

Restarted the server. However, I still got the error

2018-11-11 12:09:01.695 -0500 (3680 3680) warning: daemon connect(fd=4 uds=@newrelic-daemon) returned -1 errno=ECONNREFUSED. Failed to connect to the newrelic-daemon. Please make sure that there is a properly configured newrelic-daemon running. For additional assistance, please see: https://newrelic.com/docs/php/newrelic-daemon-startup-modes

uwf is inactive. SELinux is not installed. I even removed the default AppArmor.


#4

Hi @RL_atl, i’m going to open up a support ticket for you here so one of our PHP Engineers can take a closer look. Someone will be in touch soon :smiley:


#5

What was the outcome of this ticket? I may be experiencing a similar issue, but haven’t gone through all the detailed troubleshooting. In my case nrdiag seems to be reporting all okay, but i’ve not dug further.
Thanks
Beau


#6

Hey @Beau - It looks like that ticket didn’t get a resolution :frowning_face:

I’ll get a new ticket opened for you to work with our Support Engineers on this.