427.【数据库】starrocks 安装踩坑

2022-09-14  本文已影响0人  七镜

starrocks官网的部署文档还是蛮详细的,可还是有坑要踩的。

一、jdk 版本问题(请使用 JDK1.8)

1. 问题详情:

2022-09-13 07:34:00,444 ERROR (leaderCheckpointer|65) [Checkpoint.runAfterCatalogReady():106] Exception when generate new image file
java.lang.reflect.InaccessibleObjectException: Unable to make field private final java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock java.util.concurrent.locks.ReentrantReadWriteLock.readerLock accessible: module java.base does not "opens java.util.concurrent.locks" to unnamed module @3bf44630
        at java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354) ~[?:?]
        at java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297) ~[?:?]
        at java.lang.reflect.Field.checkCanSetAccessible(Field.java:178) ~[?:?]
        at java.lang.reflect.Field.setAccessible(Field.java:172) ~[?:?]
        at com.google.gson.internal.reflect.UnsafeReflectionAccessor.makeAccessible(UnsafeReflectionAccessor.java:44) ~[spark-dpp-1.0.0.jar:?]
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:159) ~[spark-dpp-1.0.0.jar:?]
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:102) ~[spark-dpp-1.0.0.jar:?]
        at com.google.gson.Gson.getDelegateAdapter(Gson.java:541) ~[spark-dpp-1.0.0.jar:?]
        at com.starrocks.persist.gson.GsonUtils$PostProcessTypeAdapterFactory.create(GsonUtils.java:428) ~[starrocks-fe.jar:?]
        at com.google.gson.Gson.getAdapter(Gson.java:458) ~[spark-dpp-1.0.0.jar:?]
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:117) ~[spark-dpp-1.0.0.jar:?]
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:166) ~[spark-dpp-1.0.0.jar:?]
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:102) ~[spark-dpp-1.0.0.jar:?]
        at com.google.gson.Gson.getDelegateAdapter(Gson.java:541) ~[spark-dpp-1.0.0.jar:?]
        at com.starrocks.persist.gson.GsonUtils$PostProcessTypeAdapterFactory.create(GsonUtils.java:428) ~[starrocks-fe.jar:?]
        at com.google.gson.Gson.getAdapter(Gson.java:458) ~[spark-dpp-1.0.0.jar:?]
        at com.google.gson.Gson.toJson(Gson.java:696) ~[spark-dpp-1.0.0.jar:?]
        at com.google.gson.Gson.toJson(Gson.java:683) ~[spark-dpp-1.0.0.jar:?]
        at com.google.gson.Gson.toJson(Gson.java:638) ~[spark-dpp-1.0.0.jar:?]
        at com.google.gson.Gson.toJson(Gson.java:618) ~[spark-dpp-1.0.0.jar:?]
        at com.starrocks.catalog.ResourceMgr.write(ResourceMgr.java:238) ~[starrocks-fe.jar:?]
        at com.starrocks.catalog.ResourceMgr.saveResources(ResourceMgr.java:269) ~[starrocks-fe.jar:?]
        at com.starrocks.server.GlobalStateMgr.saveImage(GlobalStateMgr.java:1367) ~[starrocks-fe.jar:?]
        at com.starrocks.server.GlobalStateMgr.saveImage(GlobalStateMgr.java:1335) ~[starrocks-fe.jar:?]
        at com.starrocks.master.Checkpoint.runAfterCatalogReady(Checkpoint.java:97) [starrocks-fe.jar:?]
        at com.starrocks.common.util.MasterDaemon.runOneCycle(MasterDaemon.java:61) [starrocks-fe.jar:?]
        at com.starrocks.common.util.Daemon.run(Daemon.java:115) [starrocks-fe.jar:?]

2. 解决

二、缺少依赖库的问题(请配置LD_LIBRARY_PATH环境变量)

1. 问题详情:

[root@ss-2 lib]# ./starrocks_be 
./starrocks_be: error while loading shared libraries: libjvm.so: cannot open shared object file: No such file or directory

starrocks_be.sh脚本也还是挺坑的:脚本执行完,服务没起来,日志里不报错。
研究脚本发现,实际上这个脚本调用的是一个 starrocks_be可执行文件,路径在 /path_your_starrocks_home/be/lib

2. 解决:

查找一下本地的 libjvm.so 在什么地方:

[root@ss-2 lib]# find / -name libjvm.so
/root/StarRocks-2.3.2/be/lib/jvm/amd64/server/libjvm.so
/usr/local/java/jre/jre/lib/amd64/server/libjvm.so
/home/centos/jre/lib/server/libjvm.so

找到之后在 ~/.bashrc文件中,添加如下信息(具体路径请根据上面的一条命令的结果调整):

export LD_LIBRARY_PATH=${JAVA_HOME}/jre/lib/amd64/server
source ~/.bashrc

三、avx2 不支持的问题

1. 问题详情

[root@ss-2 lib]# ./starrocks_be 
Illegal instruction

这个表示服务器环境不支持avx2指令集。可通过 cat /proc/cpuinfo|grep avx2 命令验证,如果没有输出,表示不支持avx2指令集。

解决:

找一台支持 avx2 指令集的服务器安装。

上一篇下一篇

猜你喜欢

热点阅读