栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

elasticsearch源码启动

elasticsearch源码启动

下载源码

由于git clone 拉不下来,直接下在zip文件
https://github.com/elastic/elasticsearch/archive/refs/heads/master.zip

遇到问题
  1. 最新版本需要jdk16,下载jdk16 并支持切换环境。JAVA_HOME配置jdk16

  2. 执行./gradlew localDistro(https://github.com/elastic/elasticsearch),产物在distribution中。选择你对应系统的包,mac 系统对应的包位于 darwin-tar 下的 build/distributions 目录下。并在 elasticsech 源代码创建一个目录,这里就叫 product,将刚才打包生成的 elasticsearch-xxx.tar.gz 解压到 product 目录下

  3. 启动,主类在server下org.elasticsearch.bootstrap.Elasticsearch

  4. 启动报错解决
    idea 添加vm options

-Des.path.conf=xxx/elasticsearch-master/product/config/
-Des.path.home=xxx/study/elasticsearch-master/product/
-Dlog4j2.disable.jmx=true
-Djava.security.policy=xxx/elasticsearch-master/server/src/main/resources/org/elasticsearch/bootstrap/elasticsearch.policy

java.lang.reflect.InaccessibleObjectException:——将scala插件disable

elasticsearch codec header mismatch: actual header=1072676797 vs expected header=1071082519——删除keystore

  1. 修改密码:
    到bin目录,执行 ./elasticsearch-reset-password --username elastic.
    然后postman Authorization 中选择Basic Auth 输入用户密码
  2. 验证。浏览器输入127.0.0.1:9200,输入用户密码。然后返回:
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/583900.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号