Yeah - I'm afraid I have to do that. Just working on that. Just hoped there might be an easier solutions :)
Original Message:
Sent: Tue February 11, 2025 11:25 AM
From: Hooman Mozaffari
Subject: featureUtility: CWWKF1390E: The configured Maven Repository cannot be reached.
I believe you need to import certificates to "cacerts" of JRE which featureUtility tool is using. Same as when you setup certificates for Gradle or Maven by importing certificates to underlying Java environment.
------------------------------
Hooman Mozaffari
Original Message:
Sent: Tue February 11, 2025 11:16 AM
From: Hermann Huebler
Subject: featureUtility: CWWKF1390E: The configured Maven Repository cannot be reached.
Aftter some more testing I thing I found the root cause of the issue namely - it is the SSL Verification. The local copy of the Maven repo uses a certificate issues by the local PKI infrastructure.
So I'm wondering how I can use the featureUtility (which is called by features.sh) if we are using a custom PKI signed certificate for the Maven Repo? Do we really have to import the certs into the JDKs cacerts directory manually or is there an easier way to use the featureUtility?
------------------------------
Hermann Huebler
Cloud Architect
Alpium IT Solutions GmbH
Vienna
Austria
#IBMChampion
Original Message:
Sent: Mon February 10, 2025 01:00 PM
From: Hermann Huebler
Subject: featureUtility: CWWKF1390E: The configured Maven Repository cannot be reached.
Hey,
I'm trying to build a Liberty Image based on the kernel-slim image. To install the required features I'm trying to use `features.sh` script after I copied the server.xml file. As our build environment (running on RedHat OpenShift) is in an air gapped environment we need to setup the `/opt/ol/wlp/etc/featureUtility.properties`file to use the local Maven Repo and the file looks like:
mavenCentralMirror.url=https://bar.intern.my.dom/artifactory/my-mvn-dev/mavenCentralMirror.user=arti_usermavenCentralMirror.password={xor}<pwd>
and it seems to be picked up by the featureUtility command as the viewSettings shows the correct values:
bash-4.4$ featureUtility viewSettingsfeatureUtility Settings----------------------------------------------------------------------Properties File: /opt/ol/wlp/etc/featureUtility.propertiesDefault Assets Repository: Maven Central RepositoryUse Default Repository: FalseFeature Verify: EnforceProperties File Validation----------------------------------------------------------------------Validation Results: The properties file successfully passed the validation.Maven Local Repository----------------------------------------------------------------------Location: /.m2/repositoryConfigured Repositories----------------------------------------------------------------------Name: mavenCentralMirrorLocation: https://bar.intern.my.dom/artifactory/my-mvn-dev/User Name: arti_userPassword: ********Proxy Settings----------------------------------------------------------------------No proxy configuredConfigured Public keys----------------------------------------------------------------------No keys configured
to make sure that the Maven repo is accessible from the build pod I tested with curl by running:
curl -vvvv -u 'arti_user:<pwd>' https://bar.intern.my.dom/artifactory/my-mvn-dev/
and that works like a charm and does not show any issues.
However when I'm running the features.sh I get the following error:
--- snip ---
+ featureUtility installServerFeatures --acceptLicense defaultServer --noCache --verbose
[2/10/25, 17:28:13:536 UTC]CWWKF1390E: The configured Maven Repository cannot be reached. Verify that your computer has network access and firewalls are configured correctly, then try the action again. If the connection still fails, the repository server might be temporarily unavailable.
com.ibm.ws.install.InstallException: CWWKF1390E: The configured Maven Repository cannot be reached. Verify that your computer has network access and firewalls are configured correctly, then try the action again. If the connection still fails, the repository server might be temporarily unavailable.
at com.ibm.ws.install.internal.InstallKernelMap.getJsonsFromMavenCentral(InstallKernelMap.java:1911)
at com.ibm.ws.install.featureUtility.FeatureUtility.getJsonFiles(FeatureUtility.java:787)
at com.ibm.ws.install.featureUtility.FeatureUtility.<init>(FeatureUtility.java:184)
at com.ibm.ws.install.featureUtility.FeatureUtility.<init>(FeatureUtility.java:52)
at com.ibm.ws.install.featureUtility.FeatureUtility$FeatureUtilityBuilder.build(FeatureUtility.java:925)
at com.ibm.ws.install.featureUtility.cli.InstallServerAction.install(InstallServerAction.java:269)
at com.ibm.ws.install.featureUtility.cli.InstallServerAction.execute(InstallServerAction.java:293)
at com.ibm.ws.install.featureUtility.cli.InstallServerAction.handleTask(InstallServerAction.java:84)
at com.ibm.ws.install.featureUtility.cli.FeatureAction.handleTask(FeatureAction.java:98)
at com.ibm.ws.install.featureUtility.FeatureUtilityExecutor.main(FeatureUtilityExecutor.java:60)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:575)
at com.ibm.ws.kernel.boot.cmdline.UtilityMain.internal_main(UtilityMain.java:175)
at com.ibm.ws.kernel.boot.cmdline.UtilityMain.main(UtilityMain.java:55)
at com.ibm.ws.kernel.boot.cmdline.Main.main(Main.java:54)
--- snip ---
Also tested to work using the environment variables as per https://openliberty.io/docs/latest/reference/command/featureUtility-installFeature.html but still get the same error. The Maven mirror is accessible and cotains the io.openliberty packages.
Any idea what could still be wrong? How can I debug that issue?
Thanks a lot in advance for any advise and hint, Hermann
------------------------------
Hermann Huebler
Cloud Architect
Alpium IT Solutions GmbH
Vienna
Austria
#IBMChampion
------------------------------