Gangadhara M.B avatar image
Gangadhara M.B asked Erick Ramirez commented

Cassandra service exited

I have installed Apache cassandra 3.11.9 on AMAZON EC2 Instance when i try to start Apache cassandra as service (service cassandra start) it comes up , there are no errors seen in the system.log but immediately fails with below error when checking for status (service cassandra status)

[root@ip-172-31-18-199 init.d]# uname -a

Linux 4.14.209-160.339.amzn2.x86_64 #1 SMP Wed Dec 16 22:44:04 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

[root@ip-172-31-18-199 init.d]# uname -r


[root@ip-172-31-18-199 init.d]# free -g

total used free shared buff/cache available

Mem: 0 0 0 0 0 0

Swap: 0 0 0

[root@ip-172-31-18-199 init.d]# cat /proc/cpuinfo |grep processor |wc -l


[root@ip-172-31-18-199 init.d]# java -version

openjdk version "1.8.0_265"

OpenJDK Runtime Environment (build 1.8.0_265-b01)

OpenJDK 64-Bit Server VM (build 25.265-b01, mixed mode)

[root@ip-172-31-18-199 init.d]# python --version

Python 2.7.18

[root@ip-172-31-18-199 init.d]#

[root@ip-172-31-18-199 init.d]# cassandra -v



[root@ip-172-31-18-199 init.d]# service cassandra start

Starting cassandra (via systemctl): [ OK ]

[root@ip-172-31-18-199 init.d]#

[root@ip-172-31-18-199 ~]# service cassandra status

● cassandra.service - LSB: distributed storage system for structured data

Loaded: loaded (/etc/rc.d/init.d/cassandra; bad; vendor preset: disabled)

Active: failed (Result: exit-code) since Fri 2021-01-08 10:26:52 UTC; 6min ago

Docs: man:systemd-sysv-generator(8)

Process: 3409 ExecStop=/etc/rc.d/init.d/cassandra stop (code=exited, status=1/FAILURE)

Main PID: 3270 (code=killed, signal=KILL)

Jan 08 10:26:05 systemd[1]: Starting LSB: distributed storage system for structured data...

Jan 08 10:26:05 runuser[3186]: pam_unix(runuser:session): session opened for user cassandra by (uid=0)

Jan 08 10:26:07 cassandra[3175]: Starting Cassandra: OK

Jan 08 10:26:07 systemd[1]: Started LSB: distributed storage system for structured data.

Jan 08 10:26:27 systemd[1]: cassandra.service: main process exited, code=killed, status=9/KILL

Jan 08 10:26:27 cassandra[3409]: Shutdown Cassandra: kill: sending signal to 3270 failed: No such process

Jan 08 10:26:52 cassandra[3409]: ERROR: could not stop cassandra

Jan 08 10:26:52 systemd[1]: cassandra.service: control process exited, code=exited status=1

Jan 08 10:26:52 systemd[1]: Unit cassandra.service entered failed state.

Jan 08 10:26:52 systemd[1]: cassandra.service failed.

10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Attached is cassandra file which is under /etc/rc.d/init.d

0 Likes 0 ·
cassandra.txt (3.9 KiB)

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered Erick Ramirez commented

Checking the status of the service on the OS won't tell you the status of the Cassandra process.

You need to review the Cassandra logs for clues as to why it failed to start and then address that issue. Cheers!

2 comments Share
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

cat system.log


0 Likes 0 ·

Just to clarify, I wasn't asking for the logs. I was merely giving you pointers on how to troubleshoot the problem. Cheers!

0 Likes 0 ·