Docker logstash 8.6.0 + logstash-input-cloudwatch_logs does not build

Hi Folks, I'm trying to build a Docker image that includes logstash-input-cloudwatch_logs plugin as I need to insert logs from Cloudwatch into my pipeline.
I've tried multiple combinations of commands and JAVA_OPTS, on laptops (mac, windows) and cloud instances) but none of them build. The only error I got in one of my tries was OOM. It takes around 2 hours for the error to show up.
Here is a sample Dockerfile

FROM amd64/logstash:8.5.1
RUN LS_JAVA_OPTS="-Xms2048m -Xmx6128m" JARS_DEBUG=true JARS_VERBOSE=true DEBUG=1  bin/logstash-plugin install --no-verify logstash-input-cloudwatch_logs && bin/logstash-plugin install --no-verify logstash-output-stackdriver_logging

Another Dockerfile I tested

FROM amd64/logstash:8.6.0
RUN bin/logstash-plugin install --no-verify logstash-input-cloudwatch_logs && bin/logstash-plugin install --no-verify logstash-output-stackdriver_logging

And here is the sample error I got in one of the runs

STEP 1/2: FROM docker.elastic.co/logstash/logstash-oss:8.6.0-arm64
Trying to pull docker.elastic.co/logstash/logstash-oss:8.6.0-arm64...
Getting image source signatures
Copying blob sha256:0a483bd35a550cacd6350a8d5993ae82bb7d36b7929bcbb5c04266aa84a39c79
Copying blob sha256:3f638cb460cc337d53dbd1dd3891b5067cb54b5ada591044d1e18e26de7d987a
Copying blob sha256:0922b5a06d0a0236b8b8f5bbf3a475c8d3eee1f2072d5d54efb681a9820d15f1
Copying blob sha256:d73449ea77cfd099a10ccffeaeba071ce61ee6ebd6f4810aa8fe7dcf71b5eabc
Copying blob sha256:9be99c1ba2f957434dc48e0dc766c35da2ea5b0f205675e6d681bb0a58d61f79
Copying blob sha256:50b6068318e3182bbc395f903335efd37373110a6fcdc6329b1e764dc04689a3
Copying blob sha256:d86f4b742b93c31fdcce297ffe73a0169b66fc7f2858383438c89a48d1bdc336
Copying blob sha256:2d43b41630c3e8e2363de71ea4afeac2fb0de094aa00be7c9d4b120cafdaf996
Copying blob sha256:ef017569638230d3c0a2a50076af20dfa09222a63b61a429a95923f7dede36ba
Copying blob sha256:f65b89afc4ddde9439cb70305cb855325778082547e1405f89859a95706e6d21
Copying blob sha256:d7da0b7ed65ab76a867ab8d5fd122b5d8b49149090bae9f4591b0fe82edb84fc
Copying blob sha256:d7da0b7ed65ab76a867ab8d5fd122b5d8b49149090bae9f4591b0fe82edb84fc
Copying config sha256:ec853fe9d8eb00028485b2da45747edd7e3759c585e119fa86f65434188245c8
Writing manifest to image destination
Storing signatures
STEP 2/2: RUN  bin/logstash-plugin install --no-verify logstash-input-cloudwatch_logs && bin/logstash-plugin install --no-verify logstash-output-stackdriver_logging
Using bundled JDK: /usr/share/logstash/jdk
Installing logstash-input-cloudwatch_logs
java.lang.OutOfMemoryError: Java heap space
Dumping heap to java_pid2.hprof ...
Heap dump file created [1473274190 bytes in 6.989 secs]
Error: Your application used more memory than the safety cap of 1G.
Specify -J-Xmx####M to increase it (#### = cap size in MB).
Specify -w for full java.lang.OutOfMemoryError: Java heap space stack trace
Error: building at STEP "RUN bin/logstash-plugin install --no-verify logstash-input-cloudwatch_logs && bin/logstash-plugin install --no-verify logstash-output-stackdriver_logging": while running runtime: exit status 1

any tips on what could be happening or what to do next?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.