Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not access pidfile for Cassandra

I were working with cassandra with no problem last hour ,but now I can't access to cassandra when I ran cqlsh it gave me this:

Connection error: Could not connect to localhost:9160

So I tried this:

sudo service cassandra status 

And it gave me this:

xss = -ea -javaagent:/usr/share/cassandra/lib/jamm-0.2.5.jar -XX:+UseThreadPriorities - XX:ThreadPriorityPolicy=42 -Xms1024M -Xmx1024M -Xmn200M -XX:+HeapDumpOnOutOfMemoryError -Xss256k

  • could not access pidfile for Cassandra

what can I do to resolve this problem?

Thanks in advance,

like image 837
Mostafa Jamareh Avatar asked Feb 15 '23 17:02

Mostafa Jamareh


2 Answers

The pid file is located at /var/run/cassandra.pid. Check that it exists and that the root user has read/write permissions to it. Also make sure that root has rwx permissions to /var/run.

As for your connection refused error, it is most likely caused by cassandra not running. Check the log files in /var/log/cassandra/* for any exceptions.

like image 107
psanford Avatar answered Feb 17 '23 07:02

psanford


You may forgot stop the cassandra before delete it.

You must remove the cassandra by purge command and install it again.

Also check your java version that compatible with pre-requirements of the cassandra.(like cassandra 2.* needs java oracle 7.0)

like image 30
Hosein Masbough Avatar answered Feb 17 '23 07:02

Hosein Masbough