scar
scar copied to clipboard
Getting Could not find Java SE Runtime Environment
Hi, i have started using your project https://scar.readthedocs.io/en/latest/scar_container.html and was able to create a lambda function using command as scar init -f scar-aws-cli.yaml
here is content of yaml functions: aws:
- lambda: name: scar-aws-cli container: image: denvazh/gatling
the error i am getting is Request Id: a9af2285-667c-4245-8ba9-69f78053ffde Log Group Name: /aws/lambda/scar-aws-cli Log Stream Name: 2020/02/24/[$LATEST]5f9b351da24b4cc08e55af87d364d2e5 GATLING_HOME is set to /opt/gatling Error: could not find libjava.so Error: Could not find Java SE Runtime Environment.
All i need is to use your project to execute this docker image https://hub.docker.com/r/denvazh/gatling
Here is small excerpt of scar.cfg file which show i am using python3.7 as Run time (Please note i cannot use Java8 as runtime because when i use java 8 ,AWS lamda says class not found) { "scar":{ "config_version":"1.0.9"
}, "aws":{ "iam":{ "boto_profile":"default", "role":"arn:aws:iam::82036:role/service-role/SRE"
}, "lambda":{ "boto_profile":"default", "region":"us-west-2", "execution_mode":"lambda", "timeout":300, "memory":512, "description":"SRE Black Box Tester Executed Successfully", "runtime":"python3.7", "layers":[
i need something like udocker run denvazh/gatling or scar run denvazh/gatling ,how do i do this thing as i am getting Could not find Java SE Runtime Environment ,if you can help me a solution in how can i provide a Java 8 environment to a python3.7 runtime?
Just for information if you can help me fixing the issue ,the Docker file for denvazh/gatling docker project is
Gatling is a highly capable load testing tool.
Documentation: https://gatling.io/docs/3.0/
Cheat sheet: https://gatling.io/docs/3.0/cheat-sheet/
FROM openjdk:8-jdk-alpine
MAINTAINER Denis Vazhenin [email protected]
working directory for gatling
WORKDIR /opt
gating version
ENV GATLING_VERSION 3.0.3
create directory for gatling install
RUN mkdir -p gatling
install gatling
RUN apk add --update wget bash libc6-compat &&
mkdir -p /tmp/downloads &&
wget -q -O /tmp/downloads/gatling-$GATLING_VERSION.zip
https://repo1.maven.org/maven2/io/gatling/highcharts/gatling-charts-highcharts-bundle/$GATLING_VERSION/gatling-charts-highcharts-bundle-$GATLING_VERSION-bundle.zip &&
mkdir -p /tmp/archive && cd /tmp/archive &&
unzip /tmp/downloads/gatling-$GATLING_VERSION.zip &&
mv /tmp/archive/gatling-charts-highcharts-bundle-$GATLING_VERSION/* /opt/gatling/ &&
rm -rf /tmp/*
change context to gatling directory
WORKDIR /opt/gatling
set directories below to be mountable from host
VOLUME ["/opt/gatling/conf", "/opt/gatling/results", "/opt/gatling/user-files"]
set environment variables
ENV PATH /opt/gatling/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin ENV GATLING_HOME /opt/gatling
ENTRYPOINT ["gatling.sh"]
Hello @tarunkumard,
I've just deployed gatling using SCAR and got the same error. Researching about it I've found that it's a problem with the F1 execution mode of udocker (the mode used by SCAR), that fails loading some libs, so unfortunately I can't help you.
I recommend you to open an issue in the udocker repo. If they find a solution, I would be happy to integrate the updates into SCAR.
Greetings.
yeah its really sad ,i have raised a issue with them ,not sure ,if they really care about Java SE environment,lets see ,fingers crossed
@srisco Is it possible to use any mode other than F1 on Lambda?
@eldos-dl No. The only working mode of udocker in AWS Lambda is the F1 execution mode.