Unable to install Logs and Infrastructure

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.

Hi, @saito1: If the guided install fails, you may follow the step-by-step instructions here: Install the infrastructure monitoring agent for Linux | New Relic Documentation.

@philweber

Thanks for the advice.

I installed the Infrastructure daemon step by step and was able to install the agent without any problems!

By the way, what is the cause of the error when I install the agent with auto-discovery?

Thank you in advance for any advice you can give me.

hi @saito1 :wave:

Hope you are doing well!

Looking at the logs it seems that this rpm which is auto-generated doesn’t exist.

If you look at the download directory this rpm is not in that list.

newrelic-infra-1.24.2-1.el6.x86_64

Please do not hesitate to contact me in case of any additional queries or issues. I will be happy to help you.

I hope you have a wonderful day.

jvadera,

I’m having this same/similar error. I’ve reviewed the documentation & attempted to do a manual install consistent with your advisement to @saito1 above. However I still run into the “! Infrastructure Agent (incomplete)” message, I’ve even verified the agent is installed & restarted.

i know the command is passing in my license key, and i’ve even recreated the config file with my key just to be sure. So i’m slightly baffled why I see some of these errors below & how to resolve them.
Any guidance would be appreciated on what I’m overlooking in order to get this agent installed & talking again. I did this about a year ago on another box, and it’s connected/reporting.

the key error I see below (to me at least) is:
{“level”:“debug”,“msg”:“infra-agent status endpoint not available”,“time”:“2022-05-18T11:05:12-06:00”}

but is that local or remote?

Thx for any feedback you’re willing to share.

JR

{“level”:“debug”,“msg”:“could not load string value for key licenseKey and profile , returning zero value: no value found at path licenseKey”,“time”:“2022-05-18T11:03:50-06:00”}
{“level”:“debug”,“msg”:“could not load string value for key licenseKey and profile default, returning zero value: no value found at path default.licenseKey”,“time”:“2022-05-18T11:03:50-06:00”}
{“level”:“debug”,“msg”:“using license key 0853be77********************************”,“time”:“2022-05-18T11:03:50-06:00”}
{“RecipeNamesProvided”:true,“RecipePathsProvided”:false,“level”:“debug”,“msg”:“context summary”,“time”:“2022-05-18T11:03:50-06:00”}
{“level”:“debug”,“msg”:“started”,“time”:“2022-05-18T11:03:50-06:00”,“timestamp”:1652893430}
{“level”:“debug”,“msg”:“no entity GUIDs available, skipping entity-scoped status updates”,“time”:“2022-05-18T11:03:51-06:00”}
{“level”:“debug”,“msg”:“fetch tag success”,“tag”:“v0.48.2”,“time”:“2022-05-18T11:03:58-06:00”}
{“level”:“debug”,“msg”:“Using open-install-library version 0.59.6”,“time”:“2022-05-18T11:03:58-06:00”}
{“level”:“debug”,“msg”:“discovering system information”,“time”:“2022-05-18T11:03:58-06:00”}
{“level”:“debug”,“msg”:“discovered manifest {Hostname:XXXXXXXXXX KernelArch:x86_64 KernelVersion:3.10.0-1127.19.1.el7.x86_64 OS:linux Platform:centos PlatformFamily:rhel PlatformVersion:7.8.2003 IsUnsupported:false}”,“time”:“2022-05-18T11:03:58-06:00”}
{“level”:“debug”,“msg”:“filtered manifest {Hostname:XXXXXXXXXX KernelArch:x86_64 KernelVersion:3.10.0-1127.19.1.el7.x86_64 OS:linux Platform:centos PlatformFamily:rhel PlatformVersion:7.8.2003 IsUnsupported:false}”,“time”:“2022-05-18T11:03:58-06:00”}
{“level”:“debug”,“msg”:“Done asserting valid operating system for OS:linux and PlatformVersion:7.8.2003”,“time”:“2022-05-18T11:03:58-06:00”}
{“level”:“debug”,“msg”:“no entity GUIDs available, skipping entity-scoped status updates”,“time”:“2022-05-18T11:03:58-06:00”}
{“level”:“debug”,“msg”:“Loaded 71 recipes”,“time”:“2022-05-18T11:03:58-06:00”}
{“level”:“debug”,“msg”:“Find all available out of 71 recipes for host map[KernelArch:x86_64 KernelVersion:3.10.0-1127.19.1.el7.x86_64 OS:linux Platform:centos PlatformFamily:rhel PlatformVersion:7.8.2003]”,“time”:“2022-05-18T11:03:58-06:00”}
{“level”:“debug”,“logMatches”:2,“msg”:“filtered log matches”,“time”:“2022-05-18T11:03:58-06:00”}
{“level”:“debug”,“msg”:“Found recipe name php-agent-installer”,“time”:“2022-05-18T11:03:58-06:00”}
{“level”:“debug”,“msg”:“Found recipe name infrastructure-agent-installer”,“time”:“2022-05-18T11:03:58-06:00”}
{“level”:“debug”,“msg”:“Found recipe name logs-integration”,“time”:“2022-05-18T11:03:58-06:00”}
{“level”:“debug”,“msg”:“ScriptEvaluation for recipe:infrastructure-agent-installer completed in 30ms with status:AVAILABLE”,“time”:“2022-05-18T11:03:58-06:00”}
{“level”:“debug”,“msg”:“Adding bundle recipe:infrastructure-agent-installer status:[{DETECTED 30ms} {AVAILABLE 30ms}] dependencies:[]”,“time”:“2022-05-18T11:03:58-06:00”}
{“level”:“debug”,“msg”:“Found recipe name infrastructure-agent-installer”,“time”:“2022-05-18T11:03:58-06:00”}
{“level”:“debug”,“msg”:“Adding bundle recipe:logs-integration status:[{DETECTED} {AVAILABLE}] dependencies:[infrastructure-agent-installer]”,“time”:“2022-05-18T11:03:58-06:00”}
{“level”:“debug”,“msg”:“Core bundle recipes:{CORE [{infrastructure-agent-installer [{DETECTED 30ms} {AVAILABLE 30ms}]} {logs-integration [{DETECTED} {AVAILABLE}]}]}”,“time”:“2022-05-18T11:03:58-06:00”}
{“error”:"",“guid”:"",“level”:“debug”,“msg”:“recipe event”,“recipe_name”:“infrastructure-agent-installer”,“status”:“DETECTED”,“statusCount”:1,“tasks”:null,“time”:“2022-05-18T11:03:58-06:00”,“validationDurationMs”:30}
{“error”:"",“guid”:"",“level”:“debug”,“msg”:“recipe event”,“recipe_name”:“infrastructure-agent-installer”,“status”:“AVAILABLE”,“statusCount”:1,“tasks”:null,“time”:“2022-05-18T11:03:59-06:00”,“validationDurationMs”:30}
{“level”:“debug”,“msg”:“no entity GUIDs available, skipping entity-scoped status updates”,“time”:“2022-05-18T11:03:59-06:00”}
{“error”:"",“guid”:"",“level”:“debug”,“msg”:“recipe event”,“recipe_name”:“logs-integration”,“status”:“DETECTED”,“statusCount”:2,“tasks”:null,“time”:“2022-05-18T11:03:59-06:00”,“validationDurationMs”:0}
{“error”:"",“guid”:"",“level”:“debug”,“msg”:“recipe event”,“recipe_name”:“logs-integration”,“status”:“AVAILABLE”,“statusCount”:2,“tasks”:null,“time”:“2022-05-18T11:04:00-06:00”,“validationDurationMs”:0}
{“level”:“debug”,“msg”:“no entity GUIDs available, skipping entity-scoped status updates”,“time”:“2022-05-18T11:04:00-06:00”}
{“level”:“debug”,“msg”:“installing recipe”,“name”:“infrastructure-agent-installer”,“time”:“2022-05-18T11:04:00-06:00”}
{“level”:“debug”,“msg”:“Found license key 0853be77********************************”,“time”:“2022-05-18T11:04:00-06:00”}
{“level”:“debug”,“msg”:“preparing recipe”,“name”:“infrastructure-agent-installer”,“time”:“2022-05-18T11:04:00-06:00”}
{“error”:"",“guid”:"",“level”:“debug”,“msg”:“recipe event”,“recipe_name”:“infrastructure-agent-installer”,“status”:“INSTALLING”,“statusCount”:2,“tasks”:null,“time”:“2022-05-18T11:04:00-06:00”,“validationDurationMs”:0}
{“level”:“debug”,“msg”:“no entity GUIDs available, skipping entity-scoped status updates”,“time”:“2022-05-18T11:04:01-06:00”}
{“level”:“debug”,“msg”:“executing recipe infrastructure-agent-installer”,“time”:“2022-05-18T11:04:01-06:00”}
{“level”:“debug”,“msg”:“Package newrelic-infra-1.24.3-1.el7.x86_64 already installed and latest version”,“time”:“2022-05-18T11:04:03-06:00”}
{“level”:“debug”,“msg”:“Running agent status check attempt…”,“time”:“2022-05-18T11:04:13-06:00”}
{“level”:“debug”,“msg”:“infra-agent status endpoint not available”,“time”:“2022-05-18T11:05:12-06:00”}
{“err”:“task: Failed to run task “default”: task: Failed to run task “assert_agent_status_ok”: exit status 32”,“level”:“debug”,“msg”:“Task execution returned error”,“time”:“2022-05-18T11:05:12-06:00”}
{“error”:“execution failed for infrastructure-agent-installer: exit status 32: infra-agent status endpoint not available”,“guid”:"",“level”:“debug”,“msg”:“recipe event”,“recipe_name”:“infrastructure-agent-installer”,“status”:“FAILED”,“statusCount”:2,“tasks”:[“default”,“assert_agent_status_ok”],“time”:“2022-05-18T11:05:12-06:00”,“validationDurationMs”:0}
{“level”:“debug”,“msg”:“no entity GUIDs available, skipping entity-scoped status updates”,“time”:“2022-05-18T11:05:12-06:00”}
{“level”:“debug”,“msg”:“install error encountered: exit status 32: infra-agent status endpoint not available”,“time”:“2022-05-18T11:05:13-06:00”}
{“level”:“debug”,“msg”:“Failed while executing and validating with progress for recipe name infrastructure-agent-installer, detail:exit status 32: infra-agent status endpoint not available”,“time”:“2022-05-18T11:05:13-06:00”}
{“level”:“debug”,“msg”:“error installing core bundle:exit status 32: infra-agent status endpoint not available”,“time”:“2022-05-18T11:05:13-06:00”}
{“level”:“debug”,“msg”:“completed”,“time”:“2022-05-18T11:05:13-06:00”,“timestamp”:1652893513}
{“level”:“debug”,“msg”:“marking recipe failed”,“recipe”:“logs-integration”,“time”:“2022-05-18T11:05:13-06:00”}
{“hasCanceledRecipes”:false,“hasFailedRecipes”:true,“hasInstalledRecipes”:false,“hasSkippedRecipes”:false,“level”:“debug”,“msg”:“final installation statuses updated”,“time”:“2022-05-18T11:05:13-06:00”}
{“level”:“debug”,“msg”:“no entity GUIDs available, skipping entity-scoped status updates”,“time”:“2022-05-18T11:05:13-06:00”}
{“level”:“debug”,“msg”:"\nWe encountered an issue during the installation: exit status 32: infra-agent status endpoint not available.",“time”:“2022-05-18T11:05:13-06:00”}

Hi @jrajewski1 ,

The below error looks like it is related network.
{“error”:“execution failed for infrastructure-agent-installer: exit status 32: infra-agent status endpoint not available”,“guid”:"",“level”:“debug”,“msg”:“recipe event”,“recipe_name”:“infrastructure-agent-installer”,“status”:“FAILED”,“statusCount”:2,“tasks”:[“default”,“assert_agent_status_ok”],“time”:“2022-05-18T11:05:12-06:00”,“validationDurationMs”:0}

Could you confirm if you are using a firewall in your environment? If so, please consider adding the proxy variable in newrelic-infra.yml.

Please find the sample newrelic-infra config file for reference.

Hope it helps. Please revert if you need any further assistance.

Thanks!

I can confirm we are in a firewall environment.

I am handshaking with my internal contact to debug this further as far as monitoring traffic at our firewall with respect to installing the agent.

Can you direct me towards any documentation as to how/what should be entered (to help me extrapolate what our custom setting would be) for the variable you referenced?

Thanks!!

JR

Hi @jrajewski1 :wave:

Hope you are doing well!

You can configure the proxy as shown here in the config file.

make sure you restart the newrelic-infra service after making changes to newrelic-infra.yml file.

I hope this will be helpful to you.

Please do not hesitate to contact me in case of any additional queries or issues. I will be happy to help you.

1 Like

Pramachandra,

Thanks for this information!.. I was just on a Zoom together with my firewall guy at the city & we were retrying an install with him monitoring ALL traffic.
We saw nothing getting blocked traffic wise in or outbound, but still received/recorded the same details I already shared with you in the log file.

I do have more questions however:

  1. I’m on a free account. We have already setup 1 server (a year ago) & it’s been connected & working the whole time. This 2nd server we’re attempting to connect now is an exact clone, only on a different subnet. Are there any limitations on a free account to have 1+ monitors running?
  2. can you confirm where the newrelic-infra.yml file should be (path wise) installed on my server (or where I should be able to find the default one to adjust)?
  3. Can you confirm the exact variable’s location for said “proxy variable” ? I’m assuming your referencing the one on line 509 in this “example” file https://github.com/newrelic/infrastructure-agent/blob/master/assets/examples/infrastructure/newrelic-infra-template.yml.example
  4. relative to this: proxy: https://user:password@hostname:port. is this my NewRelic username/password & your host/port? Or is this our “proxy” account on my side? If so, I’ve been advised we do not have a proxy to configure.
  5. if item #4 doesn’t exist (no proxy available here)… what other options do we have to further debug why I can’t install?

I appreciate any supplemental ideas you have to offer as well as answers to questions listed above.

Thanks!

jvadera, see below (was waiting on someone to get back to me hopefully with more answers):

Thanks for this information!.. I was just on a Zoom together with my firewall guy at the city & we were retrying an install with him monitoring ALL traffic.
We saw nothing getting blocked traffic wise in or outbound, but still received/recorded the same details I already shared with you in the log file.

I do have more questions however:

  1. I’m on a free account. We have already setup 1 server (a year ago) & it’s been connected & working the whole time. This 2nd server we’re attempting to connect now is an exact clone, only on a different subnet. Are there any limitations on a free account to have 1+ monitors running?
  2. can you confirm where the newrelic-infra.yml file should be (path wise) installed on my server (or where I should be able to find the default one to adjust)?
  3. Can you confirm the exact variable’s location for said “proxy variable” ? I’m assuming your referencing the one on line 509 in this “example” file https://github.com/newrelic/infrastructure-agent/blob/master/assets/examples/infrastructure/newrelic-infra-template.yml.example
  4. relative to this: proxy: https://user:password@hostname:port. is this my NewRelic username/password & your host/port? Or is this our “proxy” account on my side? If so, I’ve been advised we do not have a proxy to configure.
  5. if item #4 doesn’t exist (no proxy available here)… what other options do we have to further debug why I can’t install?

I appreciate any supplemental ideas you have to offer as well as answers to questions listed above.

Thanks!

Hi @jrajewski1 :wave:

Hope you are doing well.

  1. you should be able to install the Infrastructure agent on that host if you meet these requirements.
    You can try the guided method if that doesn’t work you can try the manual method(which you already did).

  2. Default location of the newrelic.yml file will be /etc/newrelic-infra.yml

  3. yes that’s correct I am referring to line 509.

  4. It’s the proxy on your side (if it’s not required you don’t need to add it in your config file).

  5. Can you check if the license key is present in the newrelic-infra.yml config file and it’s correct
    ? just to be sure add the same license key from the host that reporting the data correctly to the new relic, you can verify that from this location of that host: /etc/newrelic-infra.yml

Please do not hesitate to contact me in case of any additional queries or issues. I will be happy to help you.

I hope you have a wonderful day.