• 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

  • 相关阅读:
    About_Web
    神奇的 SQL 之性能优化 → 让 SQL 飞起来
    Java实现Kafka生产者和消费者的示例
    Android屏幕绘制一问到底(无代码)
    关于数据库事务和锁的必会知识点,你掌握了多少?
    【Azure Cloud Services】云服务频繁发生服务器崩溃的排查方案
    Choreographer全解析
    气之争,聊聊算法岗位的门户之见!
    资深首席架构师预测:2021年云计算的8个首要趋势
    【并发编程】- 内存模型(针对JSR-133内存模型)篇
  • 原文地址:https://www.cnblogs.com/picaso/p/11930783.html
Copyright © 2020-2023  润新知