WebSphere Application Server & Liberty

 View Only
  • 1.  featureUtility: CWWKF1390E: The configured Maven Repository cannot be reached.

    Posted 16 days ago

    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_user
    mavenCentralMirror.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 viewSettings
    
    featureUtility Settings
    ----------------------------------------------------------------------
    Properties File: /opt/ol/wlp/etc/featureUtility.properties
    Default Assets Repository: Maven Central Repository
    Use Default Repository: False
    Feature Verify: Enforce
    
    Properties File Validation
    ----------------------------------------------------------------------
    Validation Results: The properties file successfully passed the validation.
    
    Maven Local Repository
    ----------------------------------------------------------------------
    Location: /.m2/repository
    
    Configured Repositories
    ----------------------------------------------------------------------
    Name: mavenCentralMirror
    Location: https://bar.intern.my.dom/artifactory/my-mvn-dev/
    User Name: arti_user
    Password: ********
    
    Proxy Settings
    ----------------------------------------------------------------------
    No proxy configured
    Configured 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
    ------------------------------


  • 2.  RE: featureUtility: CWWKF1390E: The configured Maven Repository cannot be reached.

    Posted 15 days ago

    Hi,

    Have you checked if Maven repository is behind proxy? It might be behind proxy and CURL successfully connect with HTTPS_PROXY environment variable already set. But you need extra settings in featureUtility.properties or environment variable for featureUtility to introduce proxy.



    ------------------------------
    Hooman Mozaffari
    ------------------------------



  • 3.  RE: featureUtility: CWWKF1390E: The configured Maven Repository cannot be reached.

    Posted 15 days ago
    Edited by Hermann Huebler 15 days ago

    Hello @Hooman Mozaffari, thanks for the response.

    Yes, I have checked that the Maven repo is not behind a proxy. I've double checked that.



    ------------------------------
    Hermann Huebler
    Cloud Architect
    Alpium IT Solutions GmbH
    Vienna
    Austria

    #IBMChampion
    ------------------------------



  • 4.  RE: featureUtility: CWWKF1390E: The configured Maven Repository cannot be reached.

    Posted 15 days ago

    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
    ------------------------------



  • 5.  RE: featureUtility: CWWKF1390E: The configured Maven Repository cannot be reached.

    Posted 15 days ago

    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
    ------------------------------



  • 6.  RE: featureUtility: CWWKF1390E: The configured Maven Repository cannot be reached.

    Posted 15 days ago

    Yeah - I'm afraid I have to do that. Just working on that. Just hoped there might be an easier solutions :)

    Thanks a lot and have a good day, Hermann



    ------------------------------
    Hermann Huebler
    Cloud Architect
    Alpium IT Solutions GmbH
    Vienna
    Austria

    #IBMChampion
    ------------------------------