Cassandra does not start cause of an AbstractMethodError with JDK to 8u161?

可紊 提交于 2019-12-09 14:03:44

问题


My Cassandra won't start on a new installed root...

/var/log/cassandra/debug.log prints:

ERROR [main] 2018-02-03 07:13:46,463 CassandraDaemon.java:706 - Exception encountered during startup java.lang.AbstractMethodError: org.apache.cassandra.utils.JMXServerUtils$Exporter.exportObject

root@srv49023:~# java -version
java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)

root@srv49023:~# systemctl status cassandra
● cassandra.service - LSB: distributed storage system for structured data
   Loaded: loaded (/etc/init.d/cassandra)
   Active: active (exited) since Sat 2018-02-03 07:13:43 EST; 1min 8s ago
  Process: 213 ExecStart=/etc/init.d/cassandra start (code=exited, status=0/SUCCESS)

Feb 03 07:13:43 srv49023 systemd[1]: Started LSB: distributed storage system for structured data.

Thanks for helping!


回答1:


This seems to relate to an upgrade to the JDK to 8u161 which was released 2 days ago.

A ticket has been opened on the Cassandra Jira

There is no published work-around that I can find. You might have to go back to an earlier version of the JDK or wait for Cassandra 3.11.2 which fixes the issue.




回答2:


If waiting until Cassandra 3.11.2 is not an option, you can use an old version of Java and of Cassandra. Example below.

  • Download the binary tarbell (-bin) of an old Cassandra version (link). I used 3.10.0
  • Extract downloaded tarbell: tar -xvf apache-cassandra-3.100bin.tar.gz -C /home/ty/src (more details on extracting)
  • Download old Java version (link). I used Java SE Development Kit 8u151 (1.8.151)
  • Remove incompatible version of Java (Java 1.8.161) (instructions).

  • For example:

    [root@localhost ty]# rpm -qa | grep java

    tzdata-java-2017b-2.fc27.noarch

    abrt-java-connector-1.1.0-14.fc27.x86_64

    java-1.8.0-openjdk-headless-1.8.0.144-7.b01.fc27.x86_64

    javapackages-tools-5.0.0-7.fc27.noarch

    [root@localhost ty]# sudo yum remove java-1.8.0-openjdk-headless-1.8.0.144-7.b01.fc27.x86_64

  • Install older version of Java: rpm -ivh jdk-8u151-linux-x64.rpm

  • Cd to your Cassandra directory and try starting Cassandra: bin/cassandra -f (more instructions)


来源:https://stackoverflow.com/questions/48597284/cassandra-does-not-start-cause-of-an-abstractmethoderror-with-jdk-to-8u161

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!