Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

newrelic_plugin_agent wont start #47

Closed
ncamara666 opened this issue Jun 23, 2013 · 14 comments
Closed

newrelic_plugin_agent wont start #47

ncamara666 opened this issue Jun 23, 2013 · 14 comments

Comments

@ncamara666
Copy link

hi

Could any one help me on this issue regarding installation. Please see error below.

/usr/bin/newrelic_plugin_agent: not running

@amnesic
Copy link

amnesic commented Jun 25, 2013

Same problem here, working well with the --foreground option, but not in background.

@segedunum
Copy link

Same here. Foreground starts OK and produces output as expected but backgrounding seems to die without any explanation.

@danmux
Copy link

danmux commented Jun 29, 2013

Exactly the same issue starting as root but newrelic as the user in the config in /etc/newrelic. Ctrl-Z and bg - ing the task and it runs fine.

my config is entirely default with just the nginx lines uncommented.

(I'm about to try it with sysmond)

@msaffitz
Copy link

👍 same issue issue here. works great in the foreground as the newrelic user, but no dice when started via the init.d scripts. There's no log or any other output I can see. If I add -f to the OPTS param in the init script, I can see it start just fine-- there's something specifically about background execution that's not running here.

@gmr
Copy link
Contributor

gmr commented Jun 29, 2013

Please check for an exception file in /tmp/clihelper-exceptions.log. Permission errors are the most common cause of this. Secondarily, check for a stale pid file in /var/run/newrelic/.

On Saturday, June 29, 2013 at 11:55 AM, Michael Saffitz wrote:

same issue issue here. works great in the foreground as the newrelic user, but no dice when started via the init.d scripts. There's no log or any other output I can see.


Reply to this email directly or view it on GitHub (#47 (comment)).

@msaffitz
Copy link

Here's the exception:

Looks like it's trying to create the lock file directly in /var/run as newrelic, but that directory is owned by root

LockFailed: failed to create /var/run/redis.apptentive.com.MainThread-2599
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/clihelper/__init__.py", line 735, in run
    with daemon.DaemonContext(**kwargs):
  File "/usr/lib/python2.6/site-packages/daemon/daemon.py", line 352, in __enter__
    self.open()
  File "/usr/lib/python2.6/site-packages/daemon/daemon.py", line 344, in open
    self.pidfile.__enter__()
  File "/usr/lib/python2.6/site-packages/lockfile.py", line 223, in __enter__
    self.acquire()
  File "/usr/lib/python2.6/site-packages/lockfile.py", line 239, in acquire
    raise LockFailed("failed to create %s" % self.unique_name)

@gmr
Copy link
Contributor

gmr commented Jun 29, 2013

Make sure it's owned by the user specified in the configuration file.

@msaffitz
Copy link

I can't make /var/run owned by newrelic. It's a shared directory used by all sorts of daemons. I think the right behavior there is to create that file in /var/run/newrelic

@gmr
Copy link
Contributor

gmr commented Jun 29, 2013

It should be trying to put the pidfile in /var/run/newrelic -- you can change where the pidfile is placed in the config file. See:

https://github.com/MeetMe/newrelic-plugin-agent/blob/master/etc/newrelic/newrelic_plugin_agent.cfg#L80

On Saturday, June 29, 2013 at 12:28 PM, Michael Saffitz wrote:

I can't make /var/run owned by newrelic. It's a shared directory used by all sorts of daemons. I think the right behavior there is to create that file in /var/run/newrelic


Reply to this email directly or view it on GitHub (#47 (comment)).

@msaffitz
Copy link

Ah, ok, thanks. That fixed it. It looks like I had an older version of the config file that was pointing at /var/run.

@webranking
Copy link

hi,

i have the same problem.

in foreground it works well, but when i launch it in background i get the following error in /tmp/clihelper.log

Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/clihelper/__init__.py", line 735, in run
    with daemon.DaemonContext(**kwargs):
  File "/usr/lib/python2.6/site-packages/daemon/daemon.py", line 354, in __enter__
    self.open()
  File "/usr/lib/python2.6/site-packages/daemon/daemon.py", line 346, in open
    self.pidfile.__enter__()
  File "/usr/lib/python2.6/site-packages/lockfile/__init__.py", line 226, in __enter__
    self.acquire()
  File "/usr/lib/python2.6/site-packages/lockfile/linklockfile.py", line 45, in acquire
    time.sleep(timeout is not None and timeout/10 or 0.1)
  File "/usr/lib/python2.6/site-packages/clihelper/__init__.py", line 1017, in _on_sigterm
    CONTROLLER.on_sigterm()
AttributeError: 'NoneType' object has no attribute 'on_sigterm'

How can i solve that?

@gmr
Copy link
Contributor

gmr commented Jul 18, 2013

@webranking moving your comment to a ticket.

@gmr gmr closed this as completed Jul 18, 2013
@ddonia
Copy link

ddonia commented Jul 2, 2014

Same problem here. 3 machines with agent installed (v1.3.0). 2 machines working fine, but I cannot start in daemon mode in one of them. Everything runs fine in foreground.

user is newrelic and pid directory /var/run/newrelic/. Nothing in /tmp.

I also tried the following without success:

  • create a fake .pid file with a nonexistent process id. File was correctly removed by the agent, but message "already running" is still there
  • set user as root

Any ideas?

@fredleger
Copy link

fredleger commented May 12, 2016

Same as @ddonia here with RHEL6
I know it's quite old but this is still the actual version right ?
Any ideas ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants