zoukankan      html  css  js  c++  java
  • Cassandra3在Centos7下启动失败解决办法

    Centos7 安装Cassandra启动过程提示失败,查看结果如下所示:

    [root@xx ~]# systemctl status cassandra
    ● cassandra.service - LSB: distributed storage system for structured data
    Loaded: loaded (/etc/rc.d/init.d/cassandra; bad; vendor preset: disabled)
    Active: failed (Result: resources) since 一 2019-11-25 21:19:48 CST; 9s ago
    Docs: man:systemd-sysv-generator(8)
    Process: 13112 ExecStart=/etc/rc.d/init.d/cassandra start (code=exited, status=0/SUCCESS)

    11月 25 21:19:48 iZuf61rbucjm1exafe5h9hZ systemd[1]: Starting LSB: distributed storage system for structured data...
    11月 25 21:19:48 iZuf61rbucjm1exafe5h9hZ su[13122]: (to cassandra) root on none
    11月 25 21:19:48 iZuf61rbucjm1exafe5h9hZ cassandra[13112]: Starting Cassandra: OK
    11月 25 21:19:48 iZuf61rbucjm1exafe5h9hZ systemd[1]: New main PID 13196 does not belong to service, and PID file is ...ing.
    11月 25 21:19:48 iZuf61rbucjm1exafe5h9hZ systemd[1]: New main PID 13196 does not belong to service, and PID file is ...ing.
    11月 25 21:19:48 iZuf61rbucjm1exafe5h9hZ systemd[1]: Failed to start LSB: distributed storage system for structured data.
    11月 25 21:19:48 iZuf61rbucjm1exafe5h9hZ systemd[1]: Unit cassandra.service entered failed state.
    11月 25 21:19:48 iZuf61rbucjm1exafe5h9hZ systemd[1]: cassandra.service failed.
    Hint: Some lines were ellipsized, use -l to show in full.

    通过网上查找资料发现Cassandra没有cassandra.service 文件,只能通过自己创建方式进行。参考:https://askubuntu.com/questions/836059/sudo-service-status-includes-bad

    以下为我的参考示例:

    [Unit]
    Description=Apache Cassandra
    After=network.target

    [Service]
    PIDFile=/var/run/cassandra/cassandra.pid
    User=cassandra
    Group=cassandra
    ExecStart=/usr/sbin/cassandra -f -p /var/run/cassandra/cassandra.pid
    Restart=always

    [Install]
    WantedBy=multi-user.target

    写入/etc/systemd/system/cassandra.service 和/usr/lib/systemd/system/cassandra.service

    稍后执行:systemctl enable cassandra 之后即可用systemctl启动

    [root@xxx ~]# systemctl start cassandra
    [root@xxx ~]# ps -ef | grep cassan
    cassand+ 1591 1 0 12:55 ? 00:01:59 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.232.b09-0.el7_7.x86_64/jre/bin/java -Xloggc:/var/log/cassandra/gc.log -ea -XX:+UseThreadPriorities -XX:ThreadPriorityPoli

  • 相关阅读:
    android 振动
    linux实用命令-查看文件夹的大小
    无显示屏的开发板抓屏
    传感器Sensor的使用-距离感应(听筒模式)
    4.4原生应用获取通话状态
    git服务器的使用
    (转)浅谈ANR及log分析ANR
    ubuntu下从软件中心安装软件时的软件缓存目录
    mysql————Innodb的可重复读的情况下如何避免幻读?
    MyISAM和Innodb的区别
  • 原文地址:https://www.cnblogs.com/picaso/p/11930783.html
Copyright © 2011-2022 走看看