I tried to install logs and infrastructure on Amazon Linux2 with the following command, but the installation failed
[Command]
curl -Ls https://download.newrelic.com/install/newrelic-cli/scripts/install.sh | bash && sudo NEW_RELIC_API_KEY=NRAK-ZWYKY4V*********************** NEW_RELIC_ACCOUNT_ID=******** /usr/local/bin/newrelic install -n logs-integration
[Terminal display]
Starting installation.
Installing New Relic CLI v0.46.2
Installing to /usr/local/bin
_ _ ____ _ _
| \ | | _____ __ | _ \ ___| (_) ___
| \| |/ _ \ \ /\ / / | |_) / _ | | |/ __|
| |\ | __/\ V V / | _ | __| | | (__
|_| \_|\___| \_/\_/ |_| \_\___|_|_|\___|
Welcome to New Relic. Let's set up full stack observability for your environment.
✔ Connecting to New Relic Platform..
Connected
Installing New Relic Logs Integration
! Installing Infrastructure Agent..
Failed
--------------------
Installation Summary
! Infrastructure Agent (incomplete)
⊘ Logs Integration (unsupported)
Installation incomplete. Follow the instructions at the URL below to complete the installation process.
⮕ https://onenr.io/0OQMOpbMvRG
--------------------
We encountered an issue during the installation: exit status 5: Failed to restart newrelic-infra.service: Unit not found..
If this problem persists, visit the documentation and support page for additional help here at https://one.newrelic.com/-/06vjAeZLKjP.
The following logs are recorded in newrelic-cli.log
【log】
{“level”:“debug”,“msg”:“ScriptEvaluation for recipe:logs-integration completed in 0ms with status:UNSUPPORTED”,“time”:“2022-04-27T19:39:30+09:00”}
{"level":"debug","msg":"Adding bundle recipe:logs-integration status:[{UNSUPPORTED}] dependencies:[infrastructure-agent-installer]","time":"2022-04-27T19:39:30+09:00"}
{"level":"debug","msg":"Core bundle recipes:{CORE [{infrastructure-agent-installer [{DETECTED 20ms} {AVAILABLE 20ms}]} {logs-integration [{UNSUPPORTED}]}]}","time":"2022-04-27T19:39:30+09:00"}
{"error":"","guid":"","level":"debug","msg":"recipe event","recipe_name":"infrastructure-agent-installer","status":"DETECTED","statusCount":1,"tasks":null,"time":"2022-04-27T19:39:30+09:00","validationDurationMs":20}
{"error":"","guid":"","level":"debug","msg":"recipe event","recipe_name":"infrastructure-agent-installer","status":"AVAILABLE","statusCount":1,"tasks":null,"time":"2022-04-27T19:39:30+09:00","validationDurationMs":20}
{"level":"debug","msg":"no entity GUIDs available, skipping entity-scoped status updates","time":"2022-04-27T19:39:30+09:00"}
{"error":"","guid":"","level":"debug","msg":"recipe event","recipe_name":"logs-integration","status":"UNSUPPORTED","statusCount":2,"tasks":null,"time":"2022-04-27T19:39:31+09:00","validationDurationMs":0}
{"level":"debug","msg":"no entity GUIDs available, skipping entity-scoped status updates","time":"2022-04-27T19:39:31+09:00"}
{"level":"debug","msg":"installing recipe","name":"infrastructure-agent-installer","time":"2022-04-27T19:39:32+09:00"}
{"level":"debug","msg":"Found license key b8bd84f6********************************","time":"2022-04-27T19:39:32+09:00"}
{"level":"debug","msg":"preparing recipe","name":"infrastructure-agent-installer","time":"2022-04-27T19:39:32+09:00"}
{"error":"","guid":"","level":"debug","msg":"recipe event","recipe_name":"infrastructure-agent-installer","status":"INSTALLING","statusCount":2,"tasks":null,"time":"2022-04-27T19:39:32+09:00","validationDurationMs":0}
{"level":"debug","msg":"no entity GUIDs available, skipping entity-scoped status updates","time":"2022-04-27T19:39:33+09:00"}
{"level":"debug","msg":"executing recipe infrastructure-agent-installer","time":"2022-04-27T19:39:33+09:00"}
{"level":"debug","msg":"パッケージ newrelic-infra-1.24.2-1.el6.x86_64 はインストール済みか最新バージョンです","time":"2022-04-27T19:39:36+09:00"}
{"level":"debug","msg":"Failed to restart newrelic-infra.service: Unit not found.","time":"2022-04-27T19:39:36+09:00"}
{"err":"task: Failed to run task \"default\": task: Failed to run task \"restart\": exit status 5","level":"debug","msg":"Task execution returned error","time":"2022-04-27T19:39:36+09:00"}
{"error":"execution failed for infrastructure-agent-installer: exit status 5: Failed to restart newrelic-infra.service: Unit not found.","guid":"","level":"debug","msg":"recipe event","recipe_name":"infrastructure-agent-installer","status":"FAILED","statusCount":2,"tasks":["default","restart"],"time":"2022-04-27T19:39:36+09:00","validationDurationMs":0}
{"level":"debug","msg":"no entity GUIDs available, skipping entity-scoped status updates","time":"2022-04-27T19:39:36+09:00"}
{"level":"debug","msg":"install error encountered: exit status 5: Failed to restart newrelic-infra.service: Unit not found.","time":"2022-04-27T19:39:37+09:00"}
{"level":"debug","msg":"Failed while executing and validating with progress for recipe name infrastructure-agent-installer, detail:exit status 5: Failed to restart newrelic-infra.service: Unit not found.","time":"2022-04-27T19:39:37+09:00"}
{"level":"debug","msg":"error installing core bundle:exit status 5: Failed to restart newrelic-infra.service: Unit not found.","time":"2022-04-27T19:39:37+09:00"}
{"level":"debug","msg":"completed","time":"2022-04-27T19:39:37+09:00","timestamp":1651055977}
{"hasCanceledRecipes":false,"hasFailedRecipes":true,"hasInstalledRecipes":false,"hasSkippedRecipes":false,"level":"debug","msg":"final installation statuses updated","time":"2022-04-27T19:39:37+09:00"}
{"level":"debug","msg":"no entity GUIDs available, skipping entity-scoped status updates","time":"2022-04-27T19:39:38+09:00"}
{"level":"debug","msg":"\nWe encountered an issue during the installation: exit status 5: Failed to restart newrelic-infra.service: Unit not found..","time":"2022-04-27T19:39:39+09:00"}
What is causing this and why can’t I install the logs and infrastructure agent?
Thank you very much for your help.