Wednesday 15 June 2016

Newrelic nginx-nr-agent not running

Newrelic nginx-nr-agent not running


If you are using Newrelic nginx plugin and encounter the following error on starting/restarting it.

2016-04-12 07:51:07,021 nginx-nr-agent [ERROR]: EXCEPTION: Traceback (most recent call last):
File "/usr/bin/nginx-nr-agent.py", line 431, in newrelic_push
u = urlopen(r, data=json.dumps(payload))
File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 401, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 419, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 379, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1219, in https_open
return self.do_open(httplib.HTTPSConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1184, in do_open
r = h.getresponse(buffering=True)
File "/usr/lib/python2.7/httplib.py", line 1034, in getresponse
response.begin()
File "/usr/lib/python2.7/httplib.py", line 407, in begin
version, status, reason = self._read_status()
File "/usr/lib/python2.7/httplib.py", line 365, in _read_status
line = self.fp.readline()
File "/usr/lib/python2.7/socket.py", line 447, in readline
data = self._sock.recv(self._rbufsize)
File "/usr/lib/python2.7/ssl.py", line 241, in recv
return self.read(buflen)
File "/usr/lib/python2.7/ssl.py", line 160, in read
return self._sslobj.read(len)
File "/usr/lib/pymodules/python2.7/daemon/daemon.py", line 399, in terminate
raise exception
SystemExit: Terminating on signal 15

The log file also doesn't give any error or statement while doing a sudo service nginx-nr-agent start or sudo service nginx-nr-agent restart. After trying many things like uninstalling it and than installing it again, but still the same problem persist.
Two solutions are there, one is to remove the pid file /var/run/nginx-nr-agent/nginx-nr-agent.pid and than start/restart it. Second solution is to restart the server.

If you want to know "How to setup nginx newrelic plugin", follow this post.

0 comments:

Post a Comment

 

Copyright @ 2013 Appychip.

Designed by Appychip & YouTube Channel