-1

everytime that I shutdown and start the raspberry Pi 3 after a fresh and working Thingsboard instalation it won't start due to an error on cqlsh.

the Log file shows this error:

2017-02-03 23:27:07,556 [localhost-startStop-1] WARN o.t.s.dao.cassandra.CassandraCluster - Failed to initialize cassandra cluster due to All host(s) tried for query failed (tried: /127.0.0.1:9042 (com.datastax.driver.core.exceptions.TransportException: [/127.0.0.1] Cannot connect)). Will retry in 3000 ms

and running the command cqlsh I got:

pi@raspberrypi:~ $ cqlsh Connection error: ('Unable to connect to any servers', {'127.0.0.1': error(111, "Tried connecting to [('127.0.0.1', 9042)]. Last error: Connection refused")})

How can I fix this error?

2 Answers2

0

We have fixed issues with Cassandra and Thingsboard running on machines with low amount of RAM (1-2 Gb). Please update your installation using latest installation guide.

Andrew
  • 722
  • 5
  • 13
0

problem solved!

while searching for the solution on Internet, I found someone saying to execute the command: pi@raspberrypi:~ $ nodetool status

please set or unset MAX_HEAP_SIZE and HEAP_NEWSIZE in pairs when using CMS GC (see cassandra-env.sh)

That lead me to the problem!!! I was making a mistake while editing the "cassandra-env.sh".

I would suggest thingsboard to change your instructions to :

Find, UNCOMMENT and set memory options in /etc/cassandra/cassandra-env.sh

MAX_HEAP_SIZE="150M"

HEAP_NEWSIZE="50M"

  • Yes, this is present in [official documentation](https://thingsboard.io/docs/user-guide/install/rpi/#cassandra) now. There are other parameters listed there that you may tune to avoid timeouts. – Andrew Feb 09 '17 at 11:34