Error adding Open Liberty feature to a container on Linux
Log in to a machine using Ubuntu 18 or 20.
Using demo-devmode project, devc branch note the server.xml does not contain mpHealth.
Edit Dockerfile to use a slim image such as openliberty/open-liberty:kernel-slim-java8-ibmjava-ubi
Edit Dockerfile to include RUN features.sh
Start dev mode with mvn liberty:devc
Edit pom.xml to add
<dependency>
<groupId>io.openliberty.features</groupId>
<artifactId>mpHealth-2.2</artifactId>
<version>20.0.0.12</version>
<type>esa</type>
</dependency>
to the dependencies section. Save the file. Wait one or two minutes. This error appears in the dev mode console:
[ERROR] An error occurred while installing features: CWWKF1289E: The following file cannot be created: /opt/ol/wlp/dev/api/stable/com.ibm.websphere.org.eclipse.microprofile.health.2.2_1.0.47.jar. Ensure that its parent directory exists and that you have the necessary permissions to create files in the directory, then run the command again. RC=21
There is a similar error using gradle:
An error occurred while installing features: CWWKF1289E: The following file cannot be created: /opt/ol/wlp/dev/api/stable/com.ibm.websphere.org.eclipse.microprofile.health.2.2_1.0.47.jar. Ensure that its parent directory exists and that you have the necessary permissions to create files in the directory, then run the command again. RC=21
Just verified this is still happening on the 3.8.2 version of the plugin. I see the following error message when trying to add mpHealth-4.0 feature to the server.xml. Note that if I stop the container and start it again with this feature in the server.xml, it successfully starts.
[ERROR] An error occurred while installing features: CWWKF1016E: Unable to create the directory structure /opt/ol/wlp/lafiles/com.ibm.websphere.appserver.eeCompatible-6.0/wlp/lafiles.