Cassandra Windows 10 EXCEPTION_ACCESS_VIOLATION解决

文章描述了Cassandra在Windows10环境中启动时遇到EXCEPTION_ACCESS_VIOLATION的问题,该问题与JRE版本和sigar-amd64-winnt.dll文件有关。解决方案是重命名lib目录下的sigar-amd64-winnt.dll文件,从而避免启动时加载此文件,之后Cassandra能够成功启动并允许root用户登录进行CQL操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

小结

Cassandra启动报错:EXCEPTION_ACCESS_VIOLATION,进行了解决。

问题

Cassandra启动报错:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000010014ed4, pid=1224, tid=0x0000000000004084
#
# JRE version: Java(TM) SE Runtime Environment (8.0_261-b12) (build 1.8.0_261-b12)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.261-b12 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C  [sigar-amd64-winnt.dll+0x14ed4]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

环境:

  • Windows 10 Pro
  • Cassandra 3.11.9
  • JDK: java version “1.8.0_261”

解决

参考Stackoverflow:Cassandra Windows 10 Access Violation

由于启动过程中加载sigar-amd64-winnt.dll文件出错,到D:\apache-cassandra-3.11.9\lib这个目录下将这个文件改成其它名字,这样Cassandra 启动时就不会加载这个文件了。

改完后重新启动成功:

D:\apache-cassandra-3.11.9\bin>cassandra
Detected powershell execution permissions.  Running with enhanced startup scripts.

Security warning
Run only scripts that you trust. While scripts from the internet can be useful, this script can potentially harm your computer. If you trust this script, use the
Unblock-File cmdlet to allow the script to run without this warning message. Do you want to run D:\apache-cassandra-3.11.9\bin\cassandra.ps1?
[D] Do not run  [R] Run once  [S] Suspend  [?] Help (default is "D"): R
......
省略
......

用root用户登录:

D:\apache-cassandra-3.11.9\bin>cqlsh.bat -uroot -pxxxxx

WARNING: console codepage must be set to cp65001 to support utf-8 encoding on Windows platforms.
If you experience encoding problems, change your console codepage with 'chcp 65001' before starting cqlsh.

Connected to Test Cluster at 127.0.0.1:9042.
[cqlsh 5.0.1 | Cassandra 3.11.9 | CQL spec 3.4.4 | Native protocol v4]
Use HELP for help.
WARNING: pyreadline dependency missing.  Install to enable tab completion.
root@cqlsh> use system_auth;
root@cqlsh:system_auth> select * from roles;

 role      | can_login | is_superuser | member_of | salted_hash
-----------+-----------+--------------+-----------+--------------------------------------------------------------
 cassandra |      True |         True |      null | $2a$10$6NGNXcEt26dk7mzqFxcONeuoZcBw2f5gZZwvksw7T1aFTcqd7hiYS
      root |      True |         True |      null | $2a$10$dYesaoFDUCeZnEiDIije/ecy1t.23EgclNdFpW/IDo9W.xnnJE0aW

(2 rows)
root@cqlsh:system_auth> exit;
D:\apache-cassandra-3.11.9\bin>

参考

Stackoverflow:Cassandra Windows 10 Access Violation

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值