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

doesn't work in background mode #3

Closed
khelal opened this issue Jun 19, 2013 · 11 comments
Closed

doesn't work in background mode #3

khelal opened this issue Jun 19, 2013 · 11 comments

Comments

@khelal
Copy link

khelal commented Jun 19, 2013

this works and does indeed send data to rpm

sudo newrelic_plugin_agent -fc /opt/newrelic_plugin_agent/etc/config.yml

this doesn't generate anything, even though i can see it running in ps -ef

sudo newrelic_plugin_agent -c /opt/newrelic_plugin_agent/etc/config.yml
@gmr
Copy link
Contributor

gmr commented Jun 19, 2013

What do you get in the logfile? Check for the path in your config.yml. Absent that, check for a clihelper exception file in /tmp and paste the backtrace from that.

@khelal
Copy link
Author

khelal commented Jun 20, 2013

ok it works now. turns out there was a .pid.lock file that was still there and it for some reason made the rest of the script not work. Removed it and it works now.

@gmr gmr closed this as completed Jun 20, 2013
@teewhey
Copy link

teewhey commented Jun 21, 2013

I seem to run into the same scenario. May I know which lock file are you guys refering to?

Also I don't see anything process running in the background via ps -ef

@khelal
Copy link
Author

khelal commented Jun 21, 2013

Sure. Try erasing all the files that the agent created and boot it again.

/var/run/newrelic_plugin_agent.pid
/var/run/newrelic_plugin_agent.pid.lock
/tmp/newrelic_plugin_agent.log

@teewhey
Copy link

teewhey commented Jun 21, 2013

These files does not exist even though I have run the command.
Not sure whether this has anything to do with it .... following the readme here, the plugin agent binary was installed to /usr/local/bin/newrelic_plugin_agent.

@khelal
Copy link
Author

khelal commented Jun 21, 2013

Did you run the command using sudo?

@teewhey
Copy link

teewhey commented Jun 21, 2013

I'm already running it as the root user. Do I have to use sudo even already root?

@khelal
Copy link
Author

khelal commented Jun 21, 2013

No. Well can't help you then ;(

In my case, once I had erased all three files and made sure it wasn't already running (doing a ps -ef | grep agent), then it would work normally.

@gmr
Copy link
Contributor

gmr commented Jun 21, 2013

Is there a file in /tmp named something like clihelper-exceptions? if so, can you paste the output?

@gmr
Copy link
Contributor

gmr commented Jun 21, 2013

Make sure that /var/run/newrelic exists and that it is writable

@teewhey
Copy link

teewhey commented Jun 21, 2013

Ah... now I see it is running in the background..
Thank you so much.

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

3 participants