Hawkular-Metrics has an error trying to connect to cassandra with a NullPointerException

Solution Verified - Updated -

Issue

  • Cassandra starts up fine but hawkular-metrics fails to connect to cassandra:
Error: FATAL [org.hawkular.metrics.api.jaxrs.MetricsServiceLifecycle] (metricsservice-lifecycle-thread) HAWKMETRICS200006: An error occurred trying to connect to the Cassandra cluster: java.lang.RuntimeException: java.lang.NullPointerException
    at org.hawkular.metrics.api.jaxrs.DistributedLock.lockAndThen(DistributedLock.java:111)
    at org.hawkular.metrics.api.jaxrs.DistributedLock.lockAndThen(DistributedLock.java:95)
    at org.hawkular.metrics.api.jaxrs.MetricsServiceLifecycle.initJobsService(MetricsServiceLifecycle.java:711)
  • hawkular-metrics crashes after failing to connect to cassandra but cassandra looks fine.

Environment

  • Red Hat OpenShift Container Platform
    • 3.6
    • 3.6
    • 3.9

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content