Can't build image on TC after switching to jlink (#21)
Closed
wojciech.kapcia@tigase.net opened 2 years ago
17: Pulling from library/eclipse-temurin
Digest: sha256:869ac9198510e5533549f00de13c0d5aa5c04174ace4b012ee759cdf154766a9
Status: Image is up to date for eclipse-temurin:17
 ---> 0bc7a4cbe8fe
Step 2/14 : RUN $JAVA_HOME/bin/jlink -Xss228k          --add-modules java.base          --add-modules java.logging          --add-modules java.management          --add-modules java.management.rmi          --add-modules java.rmi          --add-modules java.naming          --add-modules jdk.naming.rmi          --add-modules jdk.naming.dns          --add-modules java.security.sasl          --add-modules java.sql          --add-modules jdk.management          --add-modules java.scripting          --add-modules java.net.http          --add-modules jdk.crypto.ec          --add-modules java.desktop          --add-modules jdk.httpserver          --add-modules java.compiler          --add-modules java.prefs          --add-modules java.xml          --strip-debug          --no-man-pages          --no-header-files          --compress=2          --output ./javaruntime
 ---> Running in 21cadf6f4dc0
[0.003s][warning][os,thread] Failed to start thread - pthread_create failed (EPERM) for attributes: stacksize: 1024k, guardsize: 4k, detached.
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Cannot create worker GC thread. Out of system resources.
# An error report file with more information is saved as:
# //hs_err_pid6.log
wojciech.kapcia@tigase.net commented 2 years ago

The issue was beyond bizarre - I tried many things and tried to create even basic image. I even went ahead and tried to run basic ubuntu image but it was failing on apt-get update (was using different URLs than my local one even though SHA was the same). In the end I wasn't able why it was failing but - EB was displaying error that newer platform is available and it's recommended to upgrade. Launching new instance (for test) of "Docker on Amazon Linux 2" resulted in issue being gone thus I decided to upgrade EB environment version (from 3.1.0 to 3.4.x) and afterwards build stated to work. Those are exactly the same machines spec wise but with newer docker version (2 years old vs current one) and newer kernel (which maybe affected how memory and threads are allocated). In the end, the issue is resolved and wasn't caused by jlink but rather yet for old version of linux on Agent.

wojciech.kapcia@tigase.net moved 11 months ago
Previous Value Current Value
tigase-private/Docker support
tigase/_server/tigase-xmpp-server-docker
issue 1 of 1
Type
Task
Priority
Normal
Assignee
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/tigase-xmpp-server-docker#21
Please wait...
Page is in error, reload to recover