JanusGraph / JanusGraph/janusgraph

Graphite reporting fail to start - java.lang.NoSuchMethodError: com.codahale.metrics.ScheduledReporter.

Open
#2,058 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/bug/possible
Dominant language
Java
Stars
5.8k
Forks
1.2k
Avg merge
13h 53m
Merged PRs (30d)
6

Description

Please post all questions and issues on [janusgraph-users](https://groups.google.com/forum/#!forum/janusgraph-users)
before opening a GitHub issue. Your questions will reach a wider audience there,
and if we confirm that there is a bug, then you can open a new issue.

Please include configurations and logs if available.

For confirmed bugs, please report:
- Version: 0.5.0
- Storage Backend: Cassandra
- Mixed Index Backend: ES
- Mailing list Thread URL: https://groups.google.com/forum/#!topic/janusgraph-users/ij9fFavrnek
- Steps to Reproduce:

Setup reporting graphite
metrics.enabled = true
metrics.graphite.hostname=graphite.rdxnidemo-infra.svc.cluster.local
metrics.graphite.interval=60000

### Stack Trace (if you have one)

```
could not be instantiated and will not be available in Gremlin Server. GraphFactory message: GraphFactory could not instantiate this Graph implementation [class org.janusgraph.core.JanusGraphFactory]
java.lang.RuntimeException: GraphFactory could not instantiate this Graph implementation [class org.janusgraph.core.JanusGraphFactory]
at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:81)
at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:69)
at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:103)
at org.apache.tinkerpop.gremlin.server.util.DefaultGraphManager.lambda$new$0(DefaultGraphManager.java:57)
at java.util.LinkedHashMap$LinkedEntrySet.forEach(LinkedHashMap.java:671)
at org.apache.tinkerpop.gremlin.server.util.DefaultGraphManager.(DefaultGraphManager.java:55)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.apache.tinkerpop.gremlin.server.util.ServerGremlinExecutor.(ServerGremlinExecutor.java:80)
at org.apache.tinkerpop.gremlin.server.GremlinServer.(GremlinServer.java:122)
at org.apache.tinkerpop.gremlin.server.GremlinServer.(GremlinServer.java:86)
at org.apache.tinkerpop.gremlin.server.GremlinServer.main(GremlinServer.java:345)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:77)
... 13 more
Caused by: java.lang.NoSuchMethodError: com.codahale.metrics.ScheduledReporter.(Lcom/codahale/metrics/MetricRegistry;Ljava/lang/String;Lcom/codahale/metrics/MetricFilter;Ljava/util/concurrent/TimeUnit;Ljava/util/concurrent/TimeUnit;Ljava/util/concurrent/ScheduledExecutorService;ZLjava/util/Set;)V
at com.codahale.metrics.graphite.GraphiteReporter.(GraphiteReporter.java:223)
at com.codahale.metrics.graphite.GraphiteReporter$Builder.build(GraphiteReporter.java:179)
at com.codahale.metrics.graphite.GraphiteReporter$Builder.build(GraphiteReporter.java:168)
at org.janusgraph.util.stats.MetricManager.addGraphiteReporter(MetricManager.java:350)
at org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration.configureMetricsGraphiteReporter(GraphDatabaseConfiguration.java:1519)
at org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration.configureMetrics(GraphDatabaseConfiguration.java:1457)
at org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration.preLoadConfiguration(GraphDatabaseConfiguration.java:1438)
at org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration.(GraphDatabaseConfiguration.java:1244)
at org.janusgraph.graphdb.configuration.builder.GraphDatabaseConfigurationBuilder.build(GraphDatabaseConfigurationBuilder.java:72)
at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:161)
at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:132)
at org.janusgraph.core.JanusGraphFactory.open(JanusGraphFactory.java:112)
... 18 more
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Graphite failure in org/janusgraph/util/stats/MetricManager.java and follow its configuration from org/janusgraph/graphdb/configuration/GraphDatabaseConfiguration.java. Reproduce the reported metrics.graphite settings and inspect the dependency versions involved in the ScheduledReporter NoSuchMethodError. Done means Gremlin Server starts with Graphite reporting enabled without this exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
cassandra, elasticsearch, java
Domain
backend, observability
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.