Skip to content

[BUG] OpenSearch container startup extremely slow on VMs due to low entropy #18960

@todest

Description

@todest

Describe the bug

When running OpenSearch in a containerized environment on virtual machines, we have observed extremely slow startup times — in some cases taking over 1–2 hours to complete initialization. Upon investigation, the root cause appears to be low system entropy, with /proc/sys/kernel/random/entropy_avail consistently showing values below 200, and sometimes even in the double digits.

use -Djava.security.egd=file:/dev/urandom has no effect

Related component

Other

To Reproduce

1、run cat /proc/sys/kernel/random/entropy_avail (<200, in aliyun ecs)
2、run docker run -p 9200:9200 -p 9600:9600 -e "discovery.type=single-node" -e "OPENSEARCH_INITIAL_ADMIN_PASSWORD=<password>" opensearchproject/opensearch:3
3、logs stuck in

WARNING: Using incubator modules: jdk.incubator.vector
WARNING: Unknown module: org.apache.arrow.memory.core specified to --add-opens

4、run haveged -F -d 32 -w 1024 --verbose=1
5、problem solved

Expected behavior

Is there any way to solve this problem without relying on external programs (such as haveged)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    OtherbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions