Last active
July 14, 2016 01:05
-
-
Save tom--/958c07bcde1baec29581e4d7079505a3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Add APT repo key | |
apt_key: | |
url: "https://download.newrelic.com/548C16BF.gpg" | |
id: "548C16BF" | |
state: "present" | |
- name: Add APT repo | |
apt_repository: | |
repo: "deb http://apt.newrelic.com/debian/ newrelic non-free" | |
update_cache: True | |
- name: Install NR sysmon and PHP agent | |
apt: | |
pkg: "{{ item }}" | |
with_items: | |
- "newrelic-php5" | |
- name: Disable newrelic daemon (PHP starts it) | |
service: | |
name: "newrelic-daemon" | |
enabled: False | |
- name: Template newrelic php config file | |
template: | |
src: "newrelic.ini.j2" | |
dest: "{{ php_etc }}/mods-available/newrelic.ini" | |
group: "root" | |
owner: "root" | |
mode: "0644" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After a number of experiments installing NR and starting services I believe I have discovered the problem.
Starting from a base VM snapshot with PHP installed but not NR, I used three variations of an Ansible role to install NR.
The first role is basically the same that I used to install the hosts with the pathology with which I started this thread. It installs and starts newrelic-sysmond before the PHP agent is used. The sysmond creates log files thus:
in which newrelic-daemon.log and php_agent.log both contain the following text
I verified the above with this simplified role .
With the sysmond and PHP agent installed using first role I run as an unprivileged user this PHP pseudo-daemon
which writes this error
and creates a zombie like so
and writes to the php_agent.log like so
With the sysmond and PHP agent installed using this role then permisisons on the log files are different:
and the permission error running the PHP pseudo-daemon goes away. The zombie, however, is still created.
Proceeding from 3., I kill the PHP pseudo-daemon, restart php5-fpm and the /tmp/.newrelic.sock is created. Now I can run the
PHP pseudo-daemon and no zombie is created.
I installed using the first role and then deleted newrelic-daemon.log and php_agent.log and then restarted php5-fpm. Now everything runs properly and there are no zombies.
I draw two conclusions from this:
newrelic-daemon which becomes a zombie.