MeetMe / newrelic-plugin-agent

Multi-Plugin python-based Agent for NewRelic's Platform
BSD 3-Clause "New" or "Revised" License
426 stars 269 forks source link

Post of data fails on SuSe Linux due to certificate errors #340

Open hhue13 opened 9 years ago

hhue13 commented 9 years ago

Managed to install the newrelic-plugin-agent in SuSe Linux using the trust store from another distribution using the --cert parameter at installation but now the agent itself can't post data due to certificate validation errors like the following: --- snip --- INFO 2014-09-11 16:34:41,860 19263 MainProcess MainThread newrelic_plugin_agent.agent send_components L220 : Sending 20 metrics to NewRelic ERROR 2014-09-11 16:34:42,104 19263 MainProcess MainThread newrelic_plugin_agent.agent send_components L235 : Error reporting stats: [Errno 1] _ssl.c:494: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed INFO 2014-09-11 16:34:42,105 19263 MainProcess MainThread newrelic_plugin_agent.agent process L133 : --- snip ---

So I'm wondering which certificate trust store the agent is using when sending the requests. wget / curl works fine with https posts (that's what I'm using in a custom plugin). Is there an option to configure the trust store? Thanks ...

hhue13 commented 9 years ago

Well found a solution to get it working namely

  1. Downloaded cacerts.pem from http://curl.haxx.se/docs/caextract.html
  2. copied cacerts.pem to /usr/local/lib64/python2.6/site-packages/requests/cacert.pem

Not sure if there is a better solution ...