[Node] Issue with New Relic installation

  1. I have install APM application, but still looking application in gap ?
  2. Trying to Install Node Agent which not installing, following the steps which are given for installation.
    Could you please help us for both how to resolve these two.

Trying to Install Node Agent which not installing, following the steps which are given for installation

Hi, @sandeep.s: Are you following the steps below? If so, what problem are you having?

  1. Use the command npm install newrelic --save for each application you want to monitor.
  2. From node_modules/newrelic, copy newrelic.js into the root directory of your app.
  3. Configure agent via the newrelic.js file or via environment variable:
  4. Add require('newrelic'); as the first line of your app’s main module.
1 Like

Thanks, Let me try again the given steps.

Why showing gap for those application which are configured ?
could you please help us to resolved it. attaching for your reference.

Hello Sandeep,

Did you try following the steps mentioned by Phil earlier?

@adahale , Thanks for your respond.
yes I followed the same, but still no luck to resolve it.
I have version details at my instance.
**Node version : 12.13.1
**NPM: 8.3.0
error:
[centos@ip-172-31-91-129 pegasusrms]$ sudo node server.js
New Relic for Node.js was unable to bootstrap itself due to an error:
Error: New Relic for Node.js requires a version of Node equal to or
greater than 12.0.0. Not starting!
at initialize (/var/www/pegasusrms/node_modules/newrelic/index.js:54:13)
at Object. (/var/www/pegasusrms/node_modules/newrelic/index.js:36:3)
at Module._compile (module.js:653:30)
at Object.Module._extensions…js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object. (/var/www/pegasusrms/server.js:8:5)
at Module._compile (module.js:653:30)
at Object.Module._extensions…js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Function.Module.runMain (module.js:694:10)
at startup (bootstrap_node.js:204:16)
at bootstrap_node.js:625:3
Project started on QA Server port: 8000
Executing (default): SELECT 1+1 AS result
Connection has been established successfully.
2022-01-19T10:53:47 +00:00
2022-01-19T15:53:47.418Z

UsingNew Relic agent version: 8.7.0

Hi @sandeep.s -

Welcome to the community! Let’s see what version of node you’re using - can you run the following command:
node -v
Or
node --version

I know you’ve mentioned using version 12, but it seems like your system is still using an older version, or you may be using multiple versions of node on your system.

@sbedi I a facing this this issue while restarting new relic infra.

[centos@ip-172-31-91-129 ~]$ sudo systemctl status newrelic-infra
● newrelic-infra.service - New Relic Infrastructure Agent
Loaded: loaded (/etc/systemd/system/newrelic-infra.service; enabled; vendor preset: disabled)
Active: activating (auto-restart) (Result: exit-code) since Thu 2022-05-19 15:40:23 EDT; 13s ago
Process: 26656 ExecStart=/usr/bin/newrelic-infra-service (code=exited, status=1/FAILURE)
Main PID: 26656 (code=exited, status=1/FAILURE)

May 19 15:40:23 ip-172-31-91-129.ec2.internal systemd[1]: Unit newrelic-infra.service entered failed state.
May 19 15:40:23 ip-172-31-91-129.ec2.internal systemd[1]: newrelic-infra.service failed.
[centos@ip-172-31-91-129 ~]$
[centos@ip-172-31-91-129 ~]$ echo “license_key: YOUR_LICENSE_KEY” | sudo tee -a /etc/newrelic-infra.yml
“license_key: YOUR_LICENSE_KEY”
[centos@ip-172-31-91-129 ~]$ sudo rpm -i your-rpm-file
error: open of your-rpm-file failed: No such file or directory
[centos@ip-172-31-91-129 ~]$

Hey @sandeep.s,

Sorry that you are still experiencing issues. I see previously you were having trouble with our Node agent. It looks like now you are experiencing trouble with restarting your Infrastructure agent, is this correct? If so I think this documentation can help you further: Start, stop, and restart the infrastructure agent | New Relic Documentation.

Please let me know if this was helpful or not and we will be more than happy to help you further!