Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
public class ElasticsearchServer
implements Closeable
{
public static final String ELASTICSEARCH_7_IMAGE = "elasticsearch:7.16.2";
public static final String ELASTICSEARCH_7_IMAGE = "elasticsearch:7.17.28";
public static final String ELASTICSEARCH_8_IMAGE = "elasticsearch:8.11.3";

private final Path configurationPath;
Expand All @@ -74,6 +74,7 @@ public ElasticsearchServer(Network network, String image)
container.withNetwork(network);
container.withNetworkAliases("elasticsearch-server");
container.withStartupTimeout(Duration.ofMinutes(5));
container.withEnv("ES_JAVA_OPTS", "-Xmx256m -Xms256m -Dlog4j2.disableJmx=true -Dlog4j2.disable.jmx=true -XX:-UseContainerSupport"); // Disable CGroups
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all other are defaults that won't be set?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// Disable CGroups

ok, but why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Github has changed something on the hosted runners that broke elasticsearch and opensearch. I have no idea what the change is, but it seems that the cgroup memory subsystem is not exposed correctly to the running container


configurationPath = createTempDirectory(null);
Map<String, String> configurationFiles = ImmutableMap.<String, String>builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public OpenSearchServer(Network network, String image, boolean secured, Map<Stri
{
container = new OpenSearchContainer<>(image);
container.withNetwork(network);
container.withEnv("OPENSEARCH_JAVA_OPTS", "-XX:-UseContainerSupport"); // Disable CGroups
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you need set others like in ES?

if (secured) {
container.withSecurityEnabled();
}
Expand Down