Kairosdb - Cassandra - localhost:9160 - connection refused | MyThinkPond

kairosdb_cassandra

If you install the latest KariosDB and Cassandra, when you try starting KariosDB pointing to the Cassandra storage, you will see the following exception:



03-14|14:24:42.331 [main] ERROR [HConnectionManager.java:71] - Could not start connection pool for host localhost(127.0.0.1):9160
03-14|14:24:42.331 [main] INFO  [CassandraHostRetryService.java:68] - Host detected as down was added to retry queue: localhost(127.0.0.1):9160
03-14|14:24:42.332 [Hector.me.prettyprint.cassandra.connection.CassandraHostRetryService-1] DEBUG [HThriftClient.java:152] - Creating a new thrift connection to localhost(127.0.0.1):9160
03-14|14:24:42.334 [Hector.me.prettyprint.cassandra.connection.CassandraHostRetryService-1] DEBUG [HThriftClient.java:183] - Unable to open transport to localhost(127.0.0.1):9160
03-14|14:24:42.334 [Hector.me.prettyprint.cassandra.connection.CassandraHostRetryService-1] WARN  [CassandraHostRetryService.java:217] - Downed localhost(127.0.0.1):9160 host still appears to be down: Unable to open transport to localhost(127.0.0.1):9160 , java.net.ConnectException: Connection refused
03-14|14:24:42.348 [main] ERROR [Main.java:315] - Failed starting up services
com.google.inject.ProvisionException: Guice provision errors:

1) Error injecting constructor, org.kairosdb.core.exception.DatastoreException: me.prettyprint.hector.api.exceptions.HectorException: All host pools marked down. Retry burden pushed out to client.
at org.kairosdb.datastore.cassandra.CassandraDatastore.(CassandraDatastore.java:114)
at org.kairosdb.datastore.cassandra.CassandraModule.configure(CassandraModule.java:66)
while locating org.kairosdb.datastore.cassandra.CassandraDatastore
at org.kairosdb.datastore.cassandra.CassandraModule.configure(CassandraModule.java:65)
while locating org.kairosdb.core.datastore.Datastore
for parameter 0 at org.kairosdb.core.datastore.KairosDatastore.(KairosDatastore.java:69)
at org.kairosdb.core.CoreModule.configure(CoreModule.java:74)
while locating org.kairosdb.core.datastore.KairosDatastore
for parameter 1 at org.kairosdb.core.jobs.CacheFileCleaner.(CacheFileCleaner.java:41)
at org.kairosdb.core.CoreModule.configure(CoreModule.java:79)
while locating org.kairosdb.core.jobs.CacheFileCleaner

1 error
at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:987) ~[guice-3.0.jar:na]
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1013) ~[guice-3.0.jar:na]
at org.kairosdb.core.scheduler.KairosDBScheduler.start(KairosDBScheduler.java:68) ~[kairosdb-1.1.1-1.jar:1.1.1-1.20151207194217]
at org.kairosdb.core.Main.startServices(Main.java:451) ~[kairosdb-1.1.1-1.jar:1.1.1-1.20151207194217]
at org.kairosdb.core.Main.main(Main.java:304) ~[kairosdb-1.1.1-1.jar:1.1.1-1.20151207194217]
Caused by: org.kairosdb.core.exception.DatastoreException: me.prettyprint.hector.api.exceptions.HectorException: All host pools marked down. Retry burden pushed out to client.
at org.kairosdb.datastore.cassandra.CassandraDatastore.(CassandraDatastore.java:225) ~[kairosdb-1.1.1-1.jar:1.1.1-1.20151207194217]
at org.kairosdb.datastore.cassandra.CassandraDatastore$$FastClassByGuice$$ccf4844f.newInstance() ~[guice-3.0.jar:1.1.1-1.20151207194217]

This happens with Cassandra 3.3.0 and above. The reason for this error is that by default Cassandra turns off the RPC service. To fix this edit “/etc/cassandra/default.conf/cassandra.yaml” and toggle the “start_rpc” flag from “false” to “true”:



start_rpc: true

Restart Cassandra (service cassandra restart #For CentOS 6.7 or below) or (systemctl restart cassandra #For CentOS 7.0 or above)

Venkatt Guhesan avatar
About Venkatt Guhesan
Enterprise Software Architect currently working at DataDirect Networks developing a highly scalable monitoring solution called DDN Insight. My passions include all things Open Source including Linux (CentOS, Red Hat, Gentoo, Open Stack, Docker & Ubuntu), embedded ARM processors and microcontrollers (Arduino, UDOO, Cubieboard, BeagleBoard, OnionIO, TI's Zigbee). Coming from an Electrical and Computer Engineering background, working in developing and designing enterprise - distributed, highly scalable software requires a unique set of software skills with a good understanding of the hardware. This makes his work challenging and interesting. In his free time, he spends his time with his family and two children. He also enjoys researching on topics including - world ancient history and yoga. Visit the 'About' section for more details.
comments powered by Disqus