Hi jan,
We figured out the issues were likely caused by running out of memory on EC2 cluster and after increasing it single executable is working fine. Thanks for the support you provided.
Hi jan,
We figured out the issues were likely caused by running out of memory on EC2 cluster and after increasing it single executable is working fine. Thanks for the support you provided.
WORKDIR /unmanaged/bin/jsreport
RUN apt-get update && apt install -y npm && npm install -g jsreport-cli
RUN npm install && jsreport init
COPY jsreport/jsreport.config.json /unmanaged/bin/jsreport
As we need to have our own config file, we are copying that in the end. But its still not working in dev environment but local docker which generated with dev image is working. its even not generating an error log nor launching jsreport cmd process? we are launching a cmd process for every call from a restapi closing once the creation happend. and also collecting console log from the process and writing into our log. even that also having an empty output. will you tell us any ways to debug jsreport and get logs
This is the docker file we are using and the java code is shared by sneka. the error is
Output of the command: (node:897) UnhandledPromiseRejectionWarning: Error: EFAULT: bad address in system call argument, read
(node:897) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:897) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Can we use process.unhandledRejections = 'warn' Or 'none' to supress this error in Java Code? Or any other solution can you provide???
#!/bin/bash -e
pushd "$(dirname "$0")"
version=$(cat version)
fversion=v${version}
base_version=$(cat base_version)
cat <<EOF > Dockerfile
FROM xxxxxxxxxx.dkr.ecr.us-west-2.amazonaws.com/${base_version}
# https://dev.to/setevoy/docker-configure-tzdata-and-timezone-during-build-20bk
RUN ln -snf /usr/share/zoneinfo/Europe/London /etc/localtime && echo Europe/London > /etc/timezone
# https://jsreport.net/learn/dotnet-local#docker
RUN apt-get update && apt-get install -y --no-install-recommends libgconf-2-4 gnupg git curl wget ca-certificates && \
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && \
apt-get update && \
apt-get install -y lsb-release google-chrome-stable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst libxtst6 libxss1 --no-install-recommends && \
apt-get install -y gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 \
libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 \
libxrender1 ca-certificates fonts-liberation libappindicator1 libnss3 xdg-utils
ENV chrome_launchOptions_executablePath google-chrome-stable
ENV chrome_launchOptions_args --no-sandbox,--disable-dev-shm-usage,--single-process,--no-zygote
RUN mkdir -p /unmanaged/bin/jsreport && curl -fsSL https://github.com/jsreport/jsreport/releases/download/2.11.0/jsreport-linux.tar.gz | tar zxC /unmanaged/bin/jsreport
ENV JSREPORT_EXEC="/unmanaged/bin/jsreport/jsreport"
ADD jsreport /unmanaged/bin/jsreport
ADD in/ /unmanaged/bin/tomcat/webapps/ROOT/
EOF
tar -czh . | docker build -t esko/services/xxxxx:"${fversion}" --rm=true -
popd