Hi, I am running Solrcloud version: 6.6.1 I have been trying to use graphite to report solr metrics and seem to get the below error while doing so in the solr logs:
> java.lang.NullPointerException > at > com.codahale.metrics.graphite.PickledGraphite.pickleMetrics(PickledGraphite.java:313) > at > com.codahale.metrics.graphite.PickledGraphite.writeMetrics(PickledGraphite.java:255) > at > com.codahale.metrics.graphite.PickledGraphite.send(PickledGraphite.java:213) > at > com.codahale.metrics.graphite.GraphiteReporter.reportGauge(GraphiteReporter.java:345) > at > com.codahale.metrics.graphite.GraphiteReporter.report(GraphiteReporter.java:243) > at > com.codahale.metrics.ScheduledReporter.report(ScheduledReporter.java:251) > at > com.codahale.metrics.ScheduledReporter$1.run(ScheduledReporter.java:174) > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > 2017-11-07 15:28:47.543 WARN (metrics-graphite-reporter-3-thread-1) [ ] > c.c.m.g.GraphiteReporter Unable to report to Graphite > java.net.SocketException: Socket closed > at > java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:118) > at java.net.SocketOutputStream.write(SocketOutputStream.java:143) > at > com.codahale.metrics.graphite.PickledGraphite.writeMetrics(PickledGraphite.java:261) > at > com.codahale.metrics.graphite.PickledGraphite.send(PickledGraphite.java:213) > at > com.codahale.metrics.graphite.GraphiteReporter.sendIfEnabled(GraphiteReporter.java:328) > at > com.codahale.metrics.graphite.GraphiteReporter.reportTimer(GraphiteReporter.java:288) > at > com.codahale.metrics.graphite.GraphiteReporter.report(GraphiteReporter.java:259) > at > com.codahale.metrics.ScheduledReporter.report(ScheduledReporter.java:251) > at > com.codahale.metrics.ScheduledReporter$1.run(ScheduledReporter.java:174) > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > 2017-11-07 15:28:47.543 ERROR (metrics-graphite-reporter-1-thread-1) [ ] > c.c.m.ScheduledReporter Exception thrown from GraphiteReporter#report. > Exception was suppressed. > java.lang.NullPointerException > at java.util.LinkedList$ListItr.next(LinkedList.java:893) > at > com.codahale.metrics.graphite.PickledGraphite.pickleMetrics(PickledGraphite.java:305) > at > com.codahale.metrics.graphite.PickledGraphite.writeMetrics(PickledGraphite.java:255) > at > com.codahale.metrics.graphite.PickledGraphite.send(PickledGraphite.java:213) > at > com.codahale.metrics.graphite.GraphiteReporter.sendIfEnabled(GraphiteReporter.java:328) > at > com.codahale.metrics.graphite.GraphiteReporter.reportMetered(GraphiteReporter.java:304) > at > com.codahale.metrics.graphite.GraphiteReporter.report(GraphiteReporter.java:255) > at > com.codahale.metrics.ScheduledReporter.report(ScheduledReporter.java:251) > at > com.codahale.metrics.ScheduledReporter$1.run(ScheduledReporter.java:174) > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > (END) Kindly let me know if this needs to be reported as a bug.
<?xml version="1.0" encoding="UTF-8" ?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <!-- This is an example of a simple "solr.xml" file for configuring one or more Solr Cores, as well as allowing Cores to be added, removed, and reloaded via HTTP requests. More information about options available in this configuration file, and Solr Core administration can be found online: http://wiki.apache.org/solr/CoreAdmin --> <solr> <solrcloud> <str name="host">${host:}</str> <int name="hostPort">${jetty.port:8983}</int> <str name="hostContext">${hostContext:solr}</str> <bool name="genericCoreNodeNames">${genericCoreNodeNames:true}</bool> <int name="zkClientTimeout">${zkClientTimeout:30000}</int> <int name="distribUpdateSoTimeout">${distribUpdateSoTimeout:600000}</int> <int name="distribUpdateConnTimeout">${distribUpdateConnTimeout:60000}</int> <str name="zkCredentialsProvider">${zkCredentialsProvider:org.apache.solr.common.cloud.DefaultZkCredentialsProvider}</str> <str name="zkACLProvider">${zkACLProvider:org.apache.solr.common.cloud.DefaultZkACLProvider}</str> </solrcloud> <shardHandlerFactory name="shardHandlerFactory" class="HttpShardHandlerFactory"> <int name="socketTimeout">${socketTimeout:600000}</int> <int name="connTimeout">${connTimeout:60000}</int> </shardHandlerFactory> <metrics> <reporter name="graphite" group="jvm, node, jetty" class="org.apache.solr.metrics.reporters.SolrGraphiteReporter"> <str name="host">hostname</str> <int name="port">2004</int> <int name="period">60</int> <bool name="pickled">true</bool> <str name="prefix">hostname_8984</str> </reporter> </metrics> </solr>