操作系统补丁后无法启动Cassandra

时间:2021-03-23 04:49:19

When I try to start Cassandra after patching my OS, I get this error:

当我在修补我的操作系统后尝试启动Cassandra时,我收到此错误:

Exception (java.lang.AbstractMethodError) encountered during startup: org.apache.cassandra.utils.JMXServerUtils$Exporter.exportObject(Ljava/rmi/Remote;ILjava/rmi/server/RMIClientSocketFactory;Ljava/rmi/server/RMIServerSocketFactory;Lsun/misc/ObjectInputFilter;)Ljava/rmi/Remote;

java.lang.AbstractMethodError: org.apache.cassandra.utils.JMXServerUtils$Exporter.exportObject(Ljava/rmi/Remote;ILjava/rmi/server/RMIClientSocketFactory;Ljava/rmi/server/RMIServerSocketFactory;Lsun/misc/ObjectInputFilter;)Ljava/rmi/Remote;
        at javax.management.remote.rmi.RMIJRMPServerImpl.export(RMIJRMPServerImpl.java:150)
        at javax.management.remote.rmi.RMIJRMPServerImpl.export(RMIJRMPServerImpl.java:135)
        at javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:405)
        at org.apache.cassandra.utils.JMXServerUtils.createJMXServer(JMXServerUtils.java:104)
        at org.apache.cassandra.service.CassandraDaemon.maybeInitJmx(CassandraDaemon.java:143)
        at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:188)
        at com.datastax.bdp.server.DseDaemon.setup(DseDaemon.java:476)
        at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:59
        at com.datastax.bdp.DseModule.main(DseModule.java:93)
ERROR [main] 2018-01-17 13:18:03,330  CassandraDaemon.java:705 - Exception encountered during startup
java.lang.AbstractMethodError: org.apache.cassandra.utils.JMXServerUtils$Exporter.exportObject(Ljava/rmi/Remote;ILjava/rmi/server/RMIClientSocketFactory;Ljava/rmi/server/RMIServerSocketFactory;Lsun/misc/ObjectInputFilter;)Ljava/rmi/Remote;

Does anyone know why, with no other changes, I'm running into this error now?

有没有人知道为什么,没有其他变化,我现在遇到这个错误?

4 个解决方案

#1


30  

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

这似乎与2天前发布的JDK升级到8u161有关。

A ticket has been opened on the Cassandra Jira

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.

我找不到已发表的解决方法。您可能必须返回到JDK的早期版本或等待修复该问题的Cassandra 3.11.2。

Edit: Its worth pointing out that this has now been resolved in 3.11.2 which has been released, so you can simply upgrade to this version to resolve the problem.

编辑:值得指出的是,这已经在已发布的3.11.2中得到解决,因此您只需升级到此版本即可解决问题。

#2


4  

To get Cassandra running I had to install JDK 8u152. Using brew cask install java8 it wasn't possible. I tried using an old version of the cassandra.rb formula but that just got:

为了让Cassandra运行,我必须安装JDK 8u152。使用brew cask安装java8是不可能的。我尝试使用旧版本的cassandra.rb公式,但刚刚得到:

Error: Download failed on Cask 'java8' with message: Download failed: http://download.oracle.com/otn-pub/java/jdk/8u152-b16/aa0333dd3019491ca4f6ddbe78cdb6d0/jdk-8u152-macosx-x64.dmg

I had to go here and log in to be able to download the DMG: http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html

我必须去这里登录才能下载DMG:http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html

Protip: To still be able to install java8 using homebrew I downloaded the dmg myself, and started a server in the downloads directory:

Protip:仍然能够使用自制软件安装java8我自己下载了dmg,并在downloads目录中启动了一个服务器:

cd ~/Downloads
php -S 0.0.0.0:3333

And changed the download URL (line 6) in the formula to:

并将公式中的下载URL(第6行)更改为:

url "http://0.0.0.0:3333/jdk-8u152-macosx-x64.dmg",

Then was able to run:

然后能够运行:

brew cask install java8

Now Cassandra is running again.

现在Cassandra又跑了。

#3


3  

You may download the source and add the changed method, compile and add the modified class to the apache-cassandra.jar. You can do the following:

您可以下载源并添加更改的方法,编译并将修改后的类添加到apache-cassandra.jar。您可以执行以下操作:

  1. Download org.tar containing the only class to be replaced.
  2. 下载包含唯一要替换的类的org.tar。
  3. Untar the file using tar -xvf org.tar and you should get org directory
  4. 使用tar -xvf org.tar解压缩文件,你应该获得org目录
  5. Copy the apache-cassandra jar file. e.g. cp /usr/share/cassandra/apache-cassandra-3.11.1.jar .
  6. 复制apache-cassandra jar文件。例如cp /usr/share/cassandra/apache-cassandra-3.11.1.jar。
  7. Make a backup of the jar before you update. cp apache-cassandra-3.11.1.jar apache-cassandra-3.11.1.jar_backup.
  8. 在更新之前备份jar。 cp apache-cassandra-3.11.1.jar apache-cassandra-3.11.1.jar_backup。
  9. Expecting the current directory contains the following files: apache-cassandra-3.11.1.jar apache-cassandra-3.11.1.jar_backup org org.tar
  10. 期望当前目录包含以下文件:apache-cassandra-3.11.1.jar apache-cassandra-3.11.1.jar_backup org org.tar
  11. Execute the following command to update the jar:

    执行以下命令更新jar:

    jar uf apache-cassandra-3.11.1.jar org

    jar uf apache-cassandra-3.11.1.jar org

  12. Replace the file to installation location:

    将文件替换为安装位置:

    mv apache-cassandra-3.11.1.jar /usr/share/cassandra

    mv apache-cassandra-3.11.1.jar / usr / share / cassandra

  13. Restart cassandra service

    重启cassandra服务

#4


0  

Revert Cask formula to 2017 version.

将Cask公式恢复为2017版。

wget https://github.com/caskroom/homebrew-versions/blob/a98da98a7e4d87e9b614b3aa25af9c6c21a753c6/Casks/java8.rb -O /usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask/Casks/java8.rb

wget的https://github.com/caskroom/homebrew-versions/blob/a98da98a7e4d87e9b614b3aa25af9c6c21a753c6/Casks/java8.rb -O /usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask/Casks/java8.rb

change line 6 URL as suggested url "http://127.0.0.1:3333/jdk-8u152-macosx-x64.dmg",

按建议的URL更改第6行URL“http://127.0.0.1:3333/jdk-8u152-macosx-x64.dmg”,

brew cask reinstall java8

brew cask重新安装java8

should work.

应该管用。

#1


30  

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

这似乎与2天前发布的JDK升级到8u161有关。

A ticket has been opened on the Cassandra Jira

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.

我找不到已发表的解决方法。您可能必须返回到JDK的早期版本或等待修复该问题的Cassandra 3.11.2。

Edit: Its worth pointing out that this has now been resolved in 3.11.2 which has been released, so you can simply upgrade to this version to resolve the problem.

编辑:值得指出的是,这已经在已发布的3.11.2中得到解决,因此您只需升级到此版本即可解决问题。

#2


4  

To get Cassandra running I had to install JDK 8u152. Using brew cask install java8 it wasn't possible. I tried using an old version of the cassandra.rb formula but that just got:

为了让Cassandra运行,我必须安装JDK 8u152。使用brew cask安装java8是不可能的。我尝试使用旧版本的cassandra.rb公式,但刚刚得到:

Error: Download failed on Cask 'java8' with message: Download failed: http://download.oracle.com/otn-pub/java/jdk/8u152-b16/aa0333dd3019491ca4f6ddbe78cdb6d0/jdk-8u152-macosx-x64.dmg

I had to go here and log in to be able to download the DMG: http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html

我必须去这里登录才能下载DMG:http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html

Protip: To still be able to install java8 using homebrew I downloaded the dmg myself, and started a server in the downloads directory:

Protip:仍然能够使用自制软件安装java8我自己下载了dmg,并在downloads目录中启动了一个服务器:

cd ~/Downloads
php -S 0.0.0.0:3333

And changed the download URL (line 6) in the formula to:

并将公式中的下载URL(第6行)更改为:

url "http://0.0.0.0:3333/jdk-8u152-macosx-x64.dmg",

Then was able to run:

然后能够运行:

brew cask install java8

Now Cassandra is running again.

现在Cassandra又跑了。

#3


3  

You may download the source and add the changed method, compile and add the modified class to the apache-cassandra.jar. You can do the following:

您可以下载源并添加更改的方法,编译并将修改后的类添加到apache-cassandra.jar。您可以执行以下操作:

  1. Download org.tar containing the only class to be replaced.
  2. 下载包含唯一要替换的类的org.tar。
  3. Untar the file using tar -xvf org.tar and you should get org directory
  4. 使用tar -xvf org.tar解压缩文件,你应该获得org目录
  5. Copy the apache-cassandra jar file. e.g. cp /usr/share/cassandra/apache-cassandra-3.11.1.jar .
  6. 复制apache-cassandra jar文件。例如cp /usr/share/cassandra/apache-cassandra-3.11.1.jar。
  7. Make a backup of the jar before you update. cp apache-cassandra-3.11.1.jar apache-cassandra-3.11.1.jar_backup.
  8. 在更新之前备份jar。 cp apache-cassandra-3.11.1.jar apache-cassandra-3.11.1.jar_backup。
  9. Expecting the current directory contains the following files: apache-cassandra-3.11.1.jar apache-cassandra-3.11.1.jar_backup org org.tar
  10. 期望当前目录包含以下文件:apache-cassandra-3.11.1.jar apache-cassandra-3.11.1.jar_backup org org.tar
  11. Execute the following command to update the jar:

    执行以下命令更新jar:

    jar uf apache-cassandra-3.11.1.jar org

    jar uf apache-cassandra-3.11.1.jar org

  12. Replace the file to installation location:

    将文件替换为安装位置:

    mv apache-cassandra-3.11.1.jar /usr/share/cassandra

    mv apache-cassandra-3.11.1.jar / usr / share / cassandra

  13. Restart cassandra service

    重启cassandra服务

#4


0  

Revert Cask formula to 2017 version.

将Cask公式恢复为2017版。

wget https://github.com/caskroom/homebrew-versions/blob/a98da98a7e4d87e9b614b3aa25af9c6c21a753c6/Casks/java8.rb -O /usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask/Casks/java8.rb

wget的https://github.com/caskroom/homebrew-versions/blob/a98da98a7e4d87e9b614b3aa25af9c6c21a753c6/Casks/java8.rb -O /usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask/Casks/java8.rb

change line 6 URL as suggested url "http://127.0.0.1:3333/jdk-8u152-macosx-x64.dmg",

按建议的URL更改第6行URL“http://127.0.0.1:3333/jdk-8u152-macosx-x64.dmg”,

brew cask reinstall java8

brew cask重新安装java8

should work.

应该管用。