s12v/newrelic-elasticsearch

The plugin is not reporting

Closed this issue · 4 comments

Hello Guys,

I have a little problem with the reporting of my plugin.
I'm using the last version of ES 5.2.2. Here what is in the daemon logs.

Daemon.logs

    [2017-03-29 10:24:25,163] ERROR com.newrelic.metrics.publish.binding.Request - An error occurred communicating with the New Relic service
    java.net.UnknownHostException: platform-api.newrelic.com
            at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184) ~[na:1.8.0_121]
            at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0_121]
            at java.net.Socket.connect(Socket.java:589) ~[na:1.8.0_121]
            at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:668) ~[na:1.8.0_121]
            at sun.net.NetworkClient.doConnect(NetworkClient.java:175) ~[na:1.8.0_121]
            at sun.net.www.http.HttpClient.openServer(HttpClient.java:432) ~[na:1.8.0_121]
            at sun.net.www.http.HttpClient.openServer(HttpClient.java:527) ~[na:1.8.0_121]
            at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264) ~[na:1.8.0_121]
            at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367) ~[na:1.8.0_121]
            at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:200) ~[na:1.8.0_121]
            at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1157) ~[na:1.8.0_121]
            at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1032) ~[na:1.8.0_121]
            at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177) ~[na:1.8.0_121]
            at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1316) ~[na:1.8.0_121]
            at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1291) ~[na:1.8.0_121]
            at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:250) ~[na:1.8.0_121]
            at com.newrelic.metrics.publish.binding.Request.deliver(Request.java:106) ~[plugin.jar:2.3.0-201701092118]
            at com.newrelic.metrics.publish.Runner$PollAgentsRunnable.run(Runner.java:213) [plugin.jar:2.3.0-201701092118]
            at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_121]

I use a proxy and I have configure it in the NPI configuration and Plugin configuration
/newrelic-npi/config/newrelic.json

 {   
  "license_key": "My licence key",
  "log_level": "info",
  "java_args": "-Xmx128m",
  "user": "elk",
  "distro": "debian",
  "proxy_host": "http://mylogin:mypassword@myproxyadress",
  "proxy_port": 80
}

/newrelic-npi/plugins/me.snov.newrelic-elasticsearch/newrelic-elasticsearch-plugin-2.3.0/config/newrelic.json

{
  "license_key": "mylicencekey",
  "log_level": "info",
  "proxy_host": "http://mylogin:mypassword@myproxyadress",
  "proxy_port": "80"
}

I curl this link on my server.
curl https://platform-api.newrelic.com/platform/v1/metrics
I have this result
{"error": "Invalid request format"}

Any idea about what is problem ?

Thank you for your help !

Michael

s12v commented

Can you try to connect without proxy?

Hi,

I try it but it's not working. I have the same message.

Regards,
Michael

s12v commented

@MichaeltranAdservio, maybe also check DNS configuration. Looks like it's not able to resolve the domain.

Hi,
It was a network issue. Thank you for your help !

Regards,
Michael