You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TASK [newrelic.newrelic_install : Report complete installs] ********************
ok: [localhost] => {
"msg": {
"node": "nodename",
"status": "COMPLETE",
"summary": [
" Installation Summary",
"",
" ✔ PHP Agent (installed) ",
"",
" View your data at the link below:",
" ⮕ https://onenr.io/xxxxxxxxxxx",
"",
" --------------------"
]
}
}
Relevant Logs / Console output
TASK [newrelic.newrelic_install : Report incomplete installs] ****************************
ok: [localhost] => {
"msg": {
"node": "nodename",
"status": "INCOMPLETE",
"summary": [
" Installation Summary",
"",
" ⊘ PHP Agent (unsupported) ",
"",
" Installation was successful overall, however, one or more installations could not be completed.",
" Follow the instructions at the URL below to complete the installation process. ",
"",
" ⮕ https://onenr.io/xxxxxxxx",
"",
" --------------------",
"",
"",
"We encountered an issue during the installation: one or more selected recipes could not be installed.",
"If this problem persists, visit the documentation and support page for additional help here at https://docs.newrelic.com/docs/infrastructure/install-infrastructure-agent/get-started/requirements-infrastructure-agent/"
]
}
}
also, from .newrelic/newrelic-cli.log:
...
Finished matching recipe php-agent-installer to running processes, found 8 matches.
This installation recipe for the New Relic PHP agent must be run under sudo.
recipe php-agent-installer failed script evaluation exit status 3: This installation recipe for the New Relic PHP agent must be run under sudo.
ScriptEvaluation for recipe:php-agent-installer completed in 7ms with status:
...
Your Environment
Operating System and version: ubuntu 22.04
user: root
cloud-init on aws (user: root)
Additional context
This is caused by a specific test for SUDO_USER env variable instead of checking for root permissions:
Description
When installing apm/php with root, the logs show something like
Steps to Reproduce
Run ansible-playbook as root, with the playbook documented here:
https://github.com/newrelic/ansible-install?tab=readme-ov-file#getting-started
Expected Behavior
Relevant Logs / Console output
also, from
.newrelic/newrelic-cli.log
:Your Environment
Additional context
This is caused by a specific test for
SUDO_USER
env variable instead of checking for root permissions:open-install-library/recipes/newrelic/apm/php/debian.yml
Line 35 in a0f99cd
Possible solution for this bug:
if running with root, inject
SUDO_USER=root
Workaround for this on ansible is documented here: newrelic/ansible-install#82 (comment)
Other reports for this bug:
The text was updated successfully, but these errors were encountered: