Giter Site home page Giter Site logo

Comments (14)

amnesic avatar amnesic commented on July 27, 2024

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

from newrelic-plugin-agent.

segedunum avatar segedunum commented on July 27, 2024

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

from newrelic-plugin-agent.

danmux avatar danmux commented on July 27, 2024

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)

from newrelic-plugin-agent.

msaffitz avatar msaffitz commented on July 27, 2024

👍 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.

from newrelic-plugin-agent.

gmr avatar gmr commented on July 27, 2024

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)).

from newrelic-plugin-agent.

msaffitz avatar msaffitz commented on July 27, 2024

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)

from newrelic-plugin-agent.

gmr avatar gmr commented on July 27, 2024

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

from newrelic-plugin-agent.

msaffitz avatar msaffitz commented on July 27, 2024

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

from newrelic-plugin-agent.

gmr avatar gmr commented on July 27, 2024

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)).

from newrelic-plugin-agent.

msaffitz avatar msaffitz commented on July 27, 2024

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

from newrelic-plugin-agent.

webranking avatar webranking commented on July 27, 2024

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?

from newrelic-plugin-agent.

gmr avatar gmr commented on July 27, 2024

@webranking moving your comment to a ticket.

from newrelic-plugin-agent.

ddonia avatar ddonia commented on July 27, 2024

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?

from newrelic-plugin-agent.

fredleger avatar fredleger commented on July 27, 2024

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

from newrelic-plugin-agent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.