Failed to access pidfile for Cassandra

I worked with cassandra without problems in the last hour, but now I can’t access the cassandra when I ran cqlsh, it gave me the following:

Connection error: Could not connect to localhost:9160

So, I tried this:

sudo service cassandra status 

And that gave me the following:

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

  • failed to access pidfile for Cassandra

What can I do to solve this problem?

Thanks in advance,

+4
source share
6 answers

You may forget to stop the cassandra before removing it.

cassandra purge .

java, cassandra (, cassandra 2. * java oracle 7.0)

+1

pid /var/run/cassandra.pid. , , root /. , root rwx /var/run.

, , cassandra . /var/log/cassandra/* .

+3

, .

, . , "stop", pid . pid pid. tail -f, /var/log/cassandra/*.log.

pid

ps aux | grep tail 

pid /var/run/cassandra.pid.

service cassandra restart

.

. cassandra init .

+2

, :

sudo chown -R cassandra/var/lib/cassandra

sudo chown -R cassandra/var/log/cassandra

Ubuntu 14.04 Debian Wheezy.

, .

+1

. , , , Cassandra.

The pid file has a Cassandra service process ID that was started before closing. This happens when Kassandra does not stop properly. So, I killed the zombie process by force and started the cassander again.

kill -9 `ps -ef | grep cassandra | grep -v grep | awk {'print $2'}`
service cassandra start

Hope this will be helpful!

0
source

Check if ERROR occurred in / var / log / cassandra / (system.log), it should be if you see could not access pidfile for Cassandra

-1
source

All Articles