cassandra进程被os杀死

hvvq6cgz  于 2021-06-14  发布在  Cassandra
关注(0)|答案(2)|浏览(500)

我使用的是apache cassandra服务器。在随机的一段时间后,我的Cassandra服务停止了。当我尝试使用centos7使用“servicecassandra status”检查它的状态时,它会显示以下日志

[centos@ip-172-31-24-101 routes]$ 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 Mon 2018-12-31 10:26:13 UTC; 34min ago
     Docs: man:systemd-sysv-generator(8)
Main PID: 2078 (code=killed, signal=KILL)

Dec 31 05:12:46 ip-172-31-24-101.ap-south-1.compute.internal su[781]: (to cassandra) root on none

Dec 31 05:12:49 ip-172-31-24-101.ap-south-1.compute.internal cassandra[761]: Starting Cassandra: OK

Dec 31 05:12:49 ip-172-31-24-101.ap-south-1.compute.internal systemd[1]: Started LSB: distributed storage system for structured data.

Dec 31 10:25:46 ip-172-31-24-101.ap-south-1.compute.internal systemd[1]: cassandra.service: main process exited, code=killed, s...KILL

Dec 31 10:25:47 ip-172-31-24-101.ap-south-1.compute.internal su[15760]: (to cassandra) root on none

Dec 31 10:25:47 ip-172-31-24-101.ap-south-1.compute.internal cassandra[15746]: Shutdown Cassandra: bash: line 0: kill: (2078) - ...ess

Dec 31 10:26:13 ip-172-31-24-101.ap-south-1.compute.internal cassandra[15746]: ERROR: could not stop cassandra

Dec 31 10:26:13 ip-172-31-24-101.ap-south-1.compute.internal systemd[1]: cassandra.service: control process exited, code=exited...us=1

Dec 31 10:26:13 ip-172-31-24-101.ap-south-1.compute.internal systemd[1]: Unit cassandra.service entered failed state.

Dec 31 10:26:13 ip-172-31-24-101.ap-south-1.compute.internal systemd[1]: cassandra.service failed."

我怎么知道Cassandra有什么问题?为什么要撞车?

iezvtpos

iezvtpos1#

被sigkill杀死的进程通常是linux的“oom killer”的结果,它在内存耗尽时杀死进程(例如,https://unix.stackexchange.com/questions/136291/will-linux-start-killing-my-processes-without-asking-me-if-memory-gets-short/136294 更多关于杀手的细节)。
这可能表明您为cassandra提供了太多内存(对于堆和堆外),没有足够的交换空间,或者两者都没有。如果是oom杀手杀死了你r cassandra,你应该能够在通常的地方找到日志消息(dmesg,/var/log/messages,journalctl,取决于你的发行版)。类似以下内容的消息:

[   54.125380] Out of memory: Kill process 8320 (cassandra) score 324 or sacrifice child
[   54.125382] Killed process 8320 (cassandra) total-vm:1309660kB, anon-rss:1287796kB, file-rss:76kB
vulvrdjw

vulvrdjw2#

我建议您查看一下cassandra进程的system.log,因为它会指出问题所在。这取决于您是从软件包还是tarball安装了c*,这取决于它的位置。软件包安装的默认值是/var/log/cassandra,而tarball的默认值是installation\u directory/log/cassandra(这个值不是肯定的)。

相关问题