Closed haraldatbmw closed 3 years ago
./instantmobile-1.0-SNAPSHOT-runner -Djava.library.path=/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64 -Djavax.net.ssl.trustStore=/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security/cacerts
Can you post the output of:
ls -lh /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64
or even the output of:
tree /usr/lib/jvm/java-8-openjdk-amd64/jre
Output of jre/lib/amd64:
harald@xxx:/instantmobile-quarkus$ ls -lh /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64
total 4.2M
drwxr-xr-x 1 root root 4.0K Apr 16 2019 jli
lrwxrwxrwx 1 root root 33 Jan 14 2019 jvm.cfg -> /etc/java-8-openjdk/jvm-amd64.cfg
-rw-r--r-- 1 root root 278 Jan 14 2019 jvm.cfg-default
-rw-r--r-- 1 root root 15K Jan 14 2019 libattach.so
-rw-r--r-- 1 root root 685K Jan 14 2019 libawt.so
-rw-r--r-- 1 root root 31K Jan 14 2019 libawt_headless.so
-rw-r--r-- 1 root root 348K Jan 14 2019 libawt_xawt.so
-rw-r--r-- 1 root root 19K Jan 14 2019 libdt_socket.so
-rw-r--r-- 1 root root 336K Jan 14 2019 libfontmanager.so
-rw-r--r-- 1 root root 187K Jan 14 2019 libhprof.so
-rw-r--r-- 1 root root 51K Jan 14 2019 libicedtea-sound.so
-rw-r--r-- 1 root root 43K Jan 14 2019 libinstrument.so
-rw-r--r-- 1 root root 39K Jan 14 2019 libj2gss.so
-rw-r--r-- 1 root root 15K Jan 14 2019 libj2pcsc.so
-rw-r--r-- 1 root root 67K Jan 14 2019 libj2pkcs11.so
-rw-r--r-- 1 root root 6.1K Jan 14 2019 libjaas_unix.so
-rw-r--r-- 1 root root 191K Jan 14 2019 libjava.so
-rw-r--r-- 1 root root 23K Jan 14 2019 libjava_crw_demo.so
-rw-r--r-- 1 root root 47K Jan 14 2019 libjavajpeg.so
-rw-r--r-- 1 root root 19K Jan 14 2019 libjavalcms.so
-rw-r--r-- 1 root root 6.0K Jan 14 2019 libjawt.so
-rw-r--r-- 1 root root 240K Jan 14 2019 libjdwp.so
-rw-r--r-- 1 root root 11K Jan 14 2019 libjsdt.so
-rw-r--r-- 1 root root 11K Jan 14 2019 libjsig.so
-rw-r--r-- 1 root root 6.0K Jan 14 2019 libjsound.so
-rw-r--r-- 1 root root 64K Jan 14 2019 libjsoundalsa.so
-rw-r--r-- 1 root root 39K Jan 14 2019 libmanagement.so
-rw-r--r-- 1 root root 1003K Jan 14 2019 libmlib_image.so
-rw-r--r-- 1 root root 95K Jan 14 2019 libnet.so
-rw-r--r-- 1 root root 75K Jan 14 2019 libnio.so
-rw-r--r-- 1 root root 15K Jan 14 2019 libnpt.so
-rw-r--r-- 1 root root 51K Jan 14 2019 libsaproc.so
-rw-r--r-- 1 root root 23K Jan 14 2019 libsctp.so
-rw-r--r-- 1 root root 43K Jan 14 2019 libsplashscreen.so
-rw-r--r-- 1 root root 179K Jan 14 2019 libsunec.so
-rw-r--r-- 1 root root 98K Jan 14 2019 libunpack.so
-rw-r--r-- 1 root root 71K Jan 14 2019 libverify.so
-rw-r--r-- 1 root root 35K Jan 14 2019 libzip.so
drwxr-xr-x 1 root root 4.0K Apr 16 2019 server
And the tree output:
harald@xxx:/instantmobile-quarkus$ tree /usr/lib/jvm/java-8-openjdk-amd64/jre
/usr/lib/jvm/java-8-openjdk-amd64/jre
├── ASSEMBLY_EXCEPTION
├── THIRD_PARTY_README
├── bin
│ ├── java
│ ├── jjs
│ ├── keytool
│ ├── orbd
│ ├── pack200
│ ├── policytool
│ ├── rmid
│ ├── rmiregistry
│ ├── servertool
│ ├── tnameserv
│ └── unpack200
├── lib
│ ├── accessibility.properties -> /etc/java-8-openjdk/accessibility.properties
│ ├── amd64
│ │ ├── jli
│ │ │ └── libjli.so
│ │ ├── jvm.cfg -> /etc/java-8-openjdk/jvm-amd64.cfg
│ │ ├── jvm.cfg-default
│ │ ├── libattach.so
│ │ ├── libawt.so
│ │ ├── libawt_headless.so
│ │ ├── libawt_xawt.so
│ │ ├── libdt_socket.so
│ │ ├── libfontmanager.so
│ │ ├── libhprof.so
│ │ ├── libicedtea-sound.so
│ │ ├── libinstrument.so
│ │ ├── libj2gss.so
│ │ ├── libj2pcsc.so
│ │ ├── libj2pkcs11.so
│ │ ├── libjaas_unix.so
│ │ ├── libjava.so
│ │ ├── libjava_crw_demo.so
│ │ ├── libjavajpeg.so
│ │ ├── libjavalcms.so
│ │ ├── libjawt.so
│ │ ├── libjdwp.so
│ │ ├── libjsdt.so
│ │ ├── libjsig.so
│ │ ├── libjsound.so
│ │ ├── libjsoundalsa.so
│ │ ├── libmanagement.so
│ │ ├── libmlib_image.so
│ │ ├── libnet.so
│ │ ├── libnio.so
│ │ ├── libnpt.so
│ │ ├── libsaproc.so
│ │ ├── libsctp.so
│ │ ├── libsplashscreen.so
│ │ ├── libsunec.so
│ │ ├── libunpack.so
│ │ ├── libverify.so
│ │ ├── libzip.so
│ │ └── server
│ │ ├── Xusage.txt
│ │ ├── classes.jsa
│ │ ├── libjsig.so -> ../libjsig.so
│ │ └── libjvm.so
│ ├── calendars.properties -> /etc/java-8-openjdk/calendars.properties
│ ├── charsets.jar
│ ├── classlist
│ ├── cmm
│ │ ├── CIEXYZ.pf
│ │ ├── GRAY.pf
│ │ ├── LINEAR_RGB.pf
│ │ ├── PYCC.pf
│ │ └── sRGB.pf
│ ├── content-types.properties -> /etc/java-8-openjdk/content-types.properties
│ ├── currency.data
│ ├── ext
│ │ ├── cldrdata.jar
│ │ ├── dnsns.jar
│ │ ├── icedtea-sound.jar
│ │ ├── jaccess.jar
│ │ ├── java-atk-wrapper.jar -> ../../../../../../share/java/java-atk-wrapper.jar
│ │ ├── libatk-wrapper.so -> ../../../../../x86_64-linux-gnu/jni/libatk-wrapper.so
│ │ ├── localedata.jar
│ │ ├── nashorn.jar
│ │ ├── sunec.jar
│ │ ├── sunjce_provider.jar
│ │ ├── sunpkcs11.jar
│ │ └── zipfs.jar
│ ├── flavormap.properties -> /etc/java-8-openjdk/flavormap.properties
│ ├── hijrah-config-umalqura.properties
│ ├── images
│ │ └── cursors
│ │ ├── cursors.properties -> /etc/java-8-openjdk/images/cursors/cursors.properties
│ │ ├── invalid32x32.gif
│ │ ├── motif_CopyDrop32x32.gif
│ │ ├── motif_CopyNoDrop32x32.gif
│ │ ├── motif_LinkDrop32x32.gif
│ │ ├── motif_LinkNoDrop32x32.gif
│ │ ├── motif_MoveDrop32x32.gif
│ │ └── motif_MoveNoDrop32x32.gif
│ ├── jar.binfmt
│ ├── jce.jar
│ ├── jexec
│ ├── jsse.jar
│ ├── jvm.hprof.txt
│ ├── logging.properties -> /etc/java-8-openjdk/logging.properties
│ ├── management
│ │ ├── jmxremote.access -> /etc/java-8-openjdk/management/jmxremote.access
│ │ ├── jmxremote.password -> /etc/java-8-openjdk/management/jmxremote.password
│ │ ├── management.properties -> /etc/java-8-openjdk/management/management.properties
│ │ └── snmp.acl -> /etc/java-8-openjdk/management/snmp.acl
│ ├── management-agent.jar
│ ├── meta-index
│ ├── net.properties -> /etc/java-8-openjdk/net.properties
│ ├── psfont.properties.ja -> /etc/java-8-openjdk/psfont.properties.ja
│ ├── psfontj2d.properties -> /etc/java-8-openjdk/psfontj2d.properties
│ ├── resources.jar
│ ├── rt.jar
│ ├── security
│ │ ├── blacklisted.certs -> /etc/java-8-openjdk/security/blacklisted.certs
│ │ ├── cacerts -> /etc/ssl/certs/java/cacerts
│ │ ├── java.policy -> /etc/java-8-openjdk/security/java.policy
│ │ ├── java.security -> /etc/java-8-openjdk/security/java.security
│ │ ├── nss.cfg -> /etc/java-8-openjdk/security/nss.cfg
│ │ └── policy
│ │ ├── limited
│ │ │ ├── US_export_policy.jar
│ │ │ └── local_policy.jar
│ │ └── unlimited
│ │ ├── US_export_policy.jar
│ │ └── local_policy.jar
│ ├── sound.properties -> /etc/java-8-openjdk/sound.properties
│ ├── swing.properties -> /etc/java-8-openjdk/swing.properties
│ └── tzdb.dat
└── man
├── ja -> ja_JP.UTF-8
├── ja_JP.UTF-8
│ └── man1
│ ├── java.1.gz
│ ├── jjs.1.gz
│ ├── keytool.1.gz
│ ├── orbd.1.gz
│ ├── pack200.1.gz
│ ├── policytool.1.gz
│ ├── rmid.1.gz
│ ├── rmiregistry.1.gz
│ ├── servertool.1.gz
│ ├── tnameserv.1.gz
│ └── unpack200.1.gz
└── man1
├── java.1.gz
├── jjs.1.gz
├── keytool.1.gz
├── orbd.1.gz
├── pack200.1.gz
├── policytool.1.gz
├── rmid.1.gz
├── rmiregistry.1.gz
├── servertool.1.gz
├── tnameserv.1.gz
└── unpack200.1.gz
19 directories, 139 files
Thank you. While I have you here, can you also post us the output of:
echo $GRAALVM_HOME
and then
ls -lh $GRAALVM_HOME/jre/lib/amd64
and
tree $GRAALVM_HOME/jre/
Just reinstalled the latest graalvm for linux (befor my runtime was openjdk only) but resulted in the same error.
My new call of my executable:
./instantmobile-1.0-SNAPSHOT-runner -Djava.library.path=$GRAALVM_HOME/jre/lib/amd64 -Djavax.net.ssl.trustStore=$GRAALVM_HOME/jre/lib/security/cacerts
My graalvm env variable:
harald@xxx:/instantmobile-quarkus/target$ echo $GRAALVM_HOME
/home/harald/graalvm/graalvm-ce-19.2.1
The libraries:
harald@xxx:/instantmobile-quarkus/target$ ls -lh $GRAALVM_HOME/jre/lib/amd64
total 37M
drwxrwxrwx 1 harald harald 4.0K Oct 18 12:52 jli
-rw-r--r-- 1 harald harald 1.6K Oct 12 02:22 jvm.cfg
-rwxr-xr-x 1 harald harald 19K Oct 8 12:50 libattach.so
-rwxr-xr-x 1 harald harald 758K Oct 8 12:50 libawt.so
-rwxr-xr-x 1 harald harald 40K Oct 8 12:50 libawt_headless.so
-rwxr-xr-x 1 harald harald 480K Oct 8 12:50 libawt_xawt.so
-rwxr-xr-x 1 harald harald 25K Oct 8 12:50 libdt_socket.so
-rwxr-xr-x 1 harald harald 533K Oct 8 12:50 libfontmanager.so
-rwxr-xr-x 1 harald harald 208K Oct 8 12:50 libhprof.so
-rwxr-xr-x 1 harald harald 52K Oct 8 12:50 libinstrument.so
-rwxr-xr-x 1 harald harald 47K Oct 8 12:50 libj2gss.so
-rwxr-xr-x 1 harald harald 19K Oct 8 12:50 libj2pcsc.so
-rwxr-xr-x 1 harald harald 89K Oct 8 12:50 libj2pkcs11.so
-rwxr-xr-x 1 harald harald 8.2K Oct 8 12:50 libjaas_unix.so
-rwxr-xr-x 1 harald harald 207K Oct 8 12:50 libjava.so
-rwxr-xr-x 1 harald harald 26K Oct 8 12:50 libjava_crw_demo.so
-rwxr-xr-x 1 harald harald 8.2K Oct 8 12:50 libjawt.so
-rwxr-xr-x 1 harald harald 268K Oct 8 12:50 libjdwp.so
-rwxr-xr-x 1 harald harald 230K Oct 8 12:50 libjpeg.so
-rwxr-xr-x 1 harald harald 13K Oct 8 12:50 libjsdt.so
-rwxr-xr-x 1 harald harald 11K Oct 12 02:23 libjsig.so
-rwxr-xr-x 1 harald harald 8.4K Oct 8 12:50 libjsound.so
-rwxr-xr-x 1 harald harald 83K Oct 8 12:50 libjsoundalsa.so
-rwxr-xr-x 1 harald harald 31M Oct 12 17:16 libjvmcicompiler.so
-rwxr-xr-x 1 harald harald 421K Oct 8 12:50 liblcms.so
-rwxr-xr-x 1 harald harald 52K Oct 8 12:50 libmanagement.so
-rwxr-xr-x 1 harald harald 895K Oct 8 12:50 libmlib_image.so
-rwxr-xr-x 1 harald harald 116K Oct 8 12:50 libnet.so
-rwxr-xr-x 1 harald harald 94K Oct 8 12:50 libnio.so
-rwxr-xr-x 1 harald harald 18K Oct 8 12:50 libnpt.so
-rwxr-xr-x 1 harald harald 50K Oct 12 02:23 libsaproc.so
-rwxr-xr-x 1 harald harald 30K Oct 8 12:50 libsctp.so
-rwxr-xr-x 1 harald harald 443K Oct 8 12:50 libsplashscreen.so
-rwxr-xr-x 1 harald harald 254K Oct 8 12:50 libsunec.so
-rwxr-xr-x 1 harald harald 250K Oct 12 16:32 libtrufflenfi.so
-rwxr-xr-x 1 harald harald 165K Oct 8 12:50 libunpack.so
-rwxr-xr-x 1 harald harald 73K Oct 8 12:50 libverify.so
-rwxr-xr-x 1 harald harald 129K Oct 8 12:50 libzip.so
drwxrwxrwx 1 harald harald 4.0K Oct 18 12:52 server
The directory tree:
harald@xxx:~$ tree $GRAALVM_HOME/jre/lib
/home/harald/graalvm/graalvm-ce-19.2.1/jre/lib
├── amd64
│ ├── jli
│ │ └── libjli.so
│ ├── jvm.cfg
│ ├── libattach.so
│ ├── libawt.so
│ ├── libawt_headless.so
│ ├── libawt_xawt.so
│ ├── libdt_socket.so
│ ├── libfontmanager.so
│ ├── libhprof.so
│ ├── libinstrument.so
│ ├── libj2gss.so
│ ├── libj2pcsc.so
│ ├── libj2pkcs11.so
│ ├── libjaas_unix.so
│ ├── libjava.so
│ ├── libjava_crw_demo.so
│ ├── libjawt.so
│ ├── libjdwp.so
│ ├── libjpeg.so
│ ├── libjsdt.so
│ ├── libjsig.so
│ ├── libjsound.so
│ ├── libjsoundalsa.so
│ ├── libjvmcicompiler.so
│ ├── liblcms.so
│ ├── libmanagement.so
│ ├── libmlib_image.so
│ ├── libnet.so
│ ├── libnio.so
│ ├── libnpt.so
│ ├── libsaproc.so
│ ├── libsctp.so
│ ├── libsplashscreen.so
│ ├── libsunec.so
│ ├── libtrufflenfi.so
│ ├── libunpack.so
│ ├── libverify.so
│ ├── libzip.so
│ └── server
│ ├── Xusage.txt
│ ├── libjsig.so
│ ├── libjvm.so
│ └── vm.properties
├── boot
│ ├── graal-sdk.jar
│ ├── graal-sdk.src.zip
│ └── graaljs-scriptengine.jar
├── calendars.properties
├── charsets.jar
├── classlist
├── cmm
│ ├── CIEXYZ.pf
│ ├── GRAY.pf
│ ├── LINEAR_RGB.pf
│ ├── PYCC.pf
│ └── sRGB.pf
├── content-types.properties
├── currency.data
├── ext
│ ├── cldrdata.jar
│ ├── dnsns.jar
│ ├── jaccess.jar
│ ├── localedata.jar
│ ├── meta-index
│ ├── nashorn.jar
│ ├── sunec.jar
│ ├── sunjce_provider.jar
│ ├── sunpkcs11.jar
│ └── zipfs.jar
├── flavormap.properties
├── graal
│ ├── graal-compiler-match-processor.jar
│ ├── graal-nodeinfo-processor.jar
│ ├── graal-options-processor.jar
│ ├── graal-processor-common.jar
│ ├── graal-replacements-processor.jar
│ └── graal-serviceprovider-processor.jar
├── graalvm
│ ├── graal-hotspot-library.jar
│ ├── graal-truffle-compiler-libgraal.jar
│ ├── graaljs-launcher.jar
│ ├── launcher-common.jar
│ ├── launcher-common.src.zip
│ ├── sulong-launcher.jar
│ └── sulong-toolchain-launchers.jar
├── hijrah-config-umalqura.properties
├── images
│ └── cursors
│ ├── cursors.properties
│ ├── invalid32x32.gif
│ ├── motif_CopyDrop32x32.gif
│ ├── motif_CopyNoDrop32x32.gif
│ ├── motif_LinkDrop32x32.gif
│ ├── motif_LinkNoDrop32x32.gif
│ ├── motif_MoveDrop32x32.gif
│ └── motif_MoveNoDrop32x32.gif
├── jce.jar
├── jexec
├── jsse.jar
├── jvm.hprof.txt
├── jvmci
│ ├── compiler-name
│ ├── graal-management.jar
│ ├── graal.jar
│ ├── jvmci-api.jar
│ ├── jvmci-api.src.zip
│ ├── jvmci-hotspot.jar
│ ├── jvmci-hotspot.src.zip
│ └── parentClassLoader.classpath
├── jvmci-services.jar
├── jvmci-services.src.zip
├── libfdlibm.a
├── libjaas.a
├── libjava.a
├── libnet.a
├── libnio.a
├── libsunec.a
├── libzip.a
├── logging.properties
├── management
│ ├── jmxremote.access
│ ├── jmxremote.password.template
│ ├── management.properties
│ └── snmp.acl.template
├── management-agent.jar
├── meta-index
├── net.properties
├── polyglot
│ ├── graal_isolate.h
│ ├── graal_isolate_dynamic.h
│ ├── libpolyglot.h
│ ├── libpolyglot.so
│ ├── libpolyglot_dynamic.h
│ ├── polyglot-native-api.jar
│ ├── polyglot_api.h
│ ├── polyglot_api_dynamic.h
│ ├── polyglot_isolate.h
│ ├── polyglot_isolate_dynamic.h
│ └── polyglot_types.h
├── psfont.properties.ja
├── psfontj2d.properties
├── resources.jar
├── rt.jar
├── security
│ ├── blacklisted.certs
│ ├── cacerts
│ ├── java.policy
│ ├── java.security
│ └── policy
│ ├── limited
│ │ ├── US_export_policy.jar
│ │ └── local_policy.jar
│ └── unlimited
│ ├── US_export_policy.jar
│ └── local_policy.jar
├── sound.properties
├── svm
│ ├── builder
│ │ ├── clibraries
│ │ │ └── linux-amd64
│ │ │ ├── include
│ │ │ │ ├── cpufeatures.h
│ │ │ │ ├── ffi.h
│ │ │ │ ├── ffitarget.h
│ │ │ │ ├── svm_libffi.h
│ │ │ │ └── trufflenfi.h
│ │ │ ├── libffi.a
│ │ │ ├── libjvm.a
│ │ │ ├── liblibchelper.a
│ │ │ └── libstrictmath.a
│ │ ├── graal-llvm.jar
│ │ ├── javacpp.jar
│ │ ├── llvm-platform-specific.jar
│ │ ├── llvm-wrapper.jar
│ │ ├── objectfile.jar
│ │ ├── pointsto.jar
│ │ ├── svm-llvm.jar
│ │ └── svm.jar
│ ├── clibraries
│ │ └── linux-amd64
│ │ ├── include
│ │ │ ├── cpufeatures.h
│ │ │ ├── ffi.h
│ │ │ ├── ffitarget.h
│ │ │ ├── svm_libffi.h
│ │ │ └── trufflenfi.h
│ │ ├── libffi.a
│ │ ├── libjvm.a
│ │ ├── liblibchelper.a
│ │ └── libstrictmath.a
│ ├── library-support.jar
│ └── macros
│ ├── graalvm-native-clang++-launcher
│ │ └── native-image.properties
│ ├── graalvm-native-clang-launcher
│ │ └── native-image.properties
│ ├── gu-launcher
│ │ └── native-image.properties
│ ├── js-launcher
│ │ ├── native-image.properties
│ │ └── polyglot.config
│ ├── jvmcicompiler-library
│ │ └── native-image.properties
│ ├── lli-launcher
│ │ ├── native-image.properties
│ │ └── polyglot.config
│ ├── polyglot-launcher
│ │ └── native-image.properties
│ ├── polyglot-library
│ │ └── native-image.properties
│ └── truffle
│ └── native-image.properties
├── truffle
│ ├── locator.jar
│ ├── locator.src.zip
│ ├── truffle-api.jar
│ ├── truffle-api.src.zip
│ ├── truffle-dsl-processor.jar
│ ├── truffle-dsl-processor.src.zip
│ ├── truffle-tck.jar
│ └── truffle-tck.src.zip
└── tzdb.dat
36 directories, 188 files
I had a bit more closer look at your logs. So:
[INFO] [io.quarkus.creator.phase.runnerjar.RunnerJarPhase] Building jar: C:\git\Trend-Radar\instantmobile-quarkus\target\instantmobile-1.0-SNAPSHOT-runner.jar
[INFO]
So you are building the native-image on Windows OS? Of course using docker
. And then copying over that generated native-image to some other (linux?) system and running/launching it from there?
By the way, does that exception occur when you hit some rest endpoint? If so, we can sort this out very quickly if you can add the following statement as the first line in your rest endpoint method, before doing the other implementation:
System.out.println("Java library path is set to " + System.getProperty("java.library.path"));
If you can get that output log when you launch your application, then we will know what exactly is going on.
Some infos about my environment:
I did an additional successful test (without docker build):
So for me it seams to be an issue with the docker build. The error only occurs if the native image, built with the docker build, is started.
You asked me when the exception occurs - it occurs on application startup (no REST endpoint). Flyway db migration is automatically started at application startup and tries to migrate the database.
@jaikiran Are you able to reproduce the issue?
I have an other running solution, using a multistage docker build. This works without any errors.
## Stage 1 : build with maven builder image with native capabilities
FROM quay.io/quarkus/centos-quarkus-maven:19.2.1 AS build
COPY src /usr/src/app/src
COPY pom.xml /usr/src/app
COPY settings.xml /usr/src/app
USER root
RUN chown -R quarkus /usr/src/app
USER quarkus
RUN mvn -f /usr/src/app/pom.xml -s /usr/src/app/settings.xml -Pnative clean package
## Stage 2 : ssl-libs
FROM quay.io/quarkus/ubi-quarkus-native-image:19.2.1 as nativebuilder
RUN mkdir -p /tmp/ssl-libs/lib \
&& cp /opt/graalvm/jre/lib/security/cacerts /tmp/ssl-libs \
&& cp /opt/graalvm/jre/lib/amd64/libsunec.so /tmp/ssl-libs/lib/
## Stage 3 : create the docker final image
FROM registry.access.redhat.com/ubi8/ubi-minimal
WORKDIR /work/
COPY --from=build /usr/src/app/target/*-runner /work/application
COPY --from=nativebuilder /tmp/ssl-libs/ /work/
RUN chmod 775 /work
EXPOSE 8080
CMD ["./application", "-Dquarkus.http.host=0.0.0.0", "-Djava.library.path=/work/lib", "-Djavax.net.ssl.trustStore=/work/cacerts"]
So the error remaining is using the native image docker build and then building and running the docker-image or running it directly inside WSL in Windows10.
mvn package -Pnative -Dnative-image.docker-build=true
docker build -f src/main/docker/Dockerfile.native -t quarkus/instantmobile .
docker run -i --rm -p 8080:8080 --name instantmobile quarkus/instantmobile
@haraldatbmw Thank you for the detailed information. I have been able to correlate this back to the code which sets up this infrastructure. I do see that there is an issue in the way this is done. However, I don't see any other way out, other than probably adding a prominent note explain these issues in the guide. Before getting to that though, I want to make sure I've understood the code correctly, so I'm just waiting for some spare time that I can spend on this. Probably later this weekend, if no one else gets to it.
This should be fine now, there have been a lof of changes in the GraalVM SSL support since this issue was opened.
Describe the bug
I have a quarkus application which makes a flyway database migration at startup.
My database is a postgres db allowing only ssl connections.
I compile a native image successfully.
Expected behavior Successful SSL connection to my postgres database.
Actual behavior Can not start to application due to ssl handshake error.
To Reproduce Steps to reproduce the behavior:
Environment (please complete the following information):
Output of
uname -a
orver
: Linux LMUC795407 4.4.0-17134-Microsoft #706-Microsoft Mon Apr 01 18:13:00 PST 2019 x86_64 x86_64 x86_64 GNU/LinuxOutput of
java -version
: openjdk version "1.8.0_191" OpenJDK Runtime Environment (build 1.8.0_191-8u191-b12-2ubuntu0.18.04.1-b12) OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)Quarkus version or git rev: 0.25.0