【问题标题】:Error: could not find libjava.so Error: Could not find Java SE Runtime Environment. while running elasticsearch 6.5.4 on docker错误:找不到 libjava.so 错误:找不到 Java SE 运行时环境。在 docker 上运行 elasticsearch 6.5.4 时
【发布时间】:2021-08-31 11:49:44
【问题描述】:

当我从 Apple Intel 芯片迁移到 Apple M1 芯片时,我遇到了这个问题。我正在使用最新版本的 docker desktop 3.6.0 和 macbook pro 13"(2020 型号)。

很遗憾,我无法从 6.5.4 升级 elasticsearch 版本。

人们想出了什么变通方法?

这是 docker-compose.yml 文件

elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:6.5.4
    container_name: es01
    environment:
      - node.name=es01
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    volumes:
      - esdata01:/usr/share/elasticsearch/data
    ports:
      - 9200:9200

这是我遇到的错误

Error: could not find libjava.so  
Error: Could not find Java SE Runtime Environment.

【问题讨论】:

    标签: elasticsearch docker-compose


    【解决方案1】:

    以下配置在 Apple Macbook pro 13" (2020) - M1 芯片上完美运行

    elasticsearch:
        image: docker.elastic.co/elasticsearch/elasticsearch:7.14.0-arm64
        container_name: es01
        environment:
          - node.name=es01
          - bootstrap.memory_lock=true
          - discovery.type=single-node
          - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
        ulimits:
          memlock:
            soft: -1
            hard: -1
        volumes:
          - esdata01:/usr/share/elasticsearch/data
        ports:
          - 9200:9200
    

    【讨论】:

      【解决方案2】:

      根据这篇文章Running Elasticsearch on ARM,docker中的弹性ARM版本仅从7.8.0开始可用@

      【讨论】:

      • 感谢 ExploZe,虽然它说 7.8.0 适用于 ARM 架构,但它在 Apple 硅芯片上给出错误... IndexFormatTooNewException [不支持格式版本(资源 BufferedChecksumIndexInput(SimpleFSIndexInput(path="/usr/ share/elasticsearch/data/nodes/0/_state/segments_3"))): 10 (需要在 7 和 9 之间)];
      • 您似乎尝试从与此版本不兼容的数据开始,This exception is thrown when Lucene detects an index that is newer than this Lucene version.lucene.apache.org/core/7_1_0/core/org/apache/lucene/index/…
      猜你喜欢
      • 2014-11-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-09-11
      • 1970-01-01
      • 2018-12-25
      • 1970-01-01
      相关资源
      最近更新 更多