Skip to content

New feature in devc handled out of order #1491

Open
@turkeylurkey

Description

@turkeylurkey

After adding a new Java file the endpoint is not visible. Tested on Linux.

First start with a kernel image: kernel-slim-java8-openj9-ubi.

Using the demo-devmode project add a command to Dockerfile to copy generate-fearures.xml to the image:
COPY --chown=1001:0 target/liberty/wlp/usr/servers/defaultServer/configDropins/overrides/generated-features.xml /config/configDropins/overrides/

With dev mode running add the file SystemLivenessCheck.java to the project.
As seen in the output below source compilation is successful.

[INFO] Source compilation was successful.
[INFO] Running liberty:generate-features
[INFO] [AUDIT   ] CWWKT0017I: Web application removed (default_host): http://34038634b045:9080/
[INFO] [AUDIT   ] CWWKZ0009I: The application demo-devmode-maven has stopped successfully.
[INFO] Generated the following features: [cdi-2.0, mpHealth-3.1, mpMetrics-3.0, jaxrs-2.1]
[INFO] Copied file: /home/ibmadmin/demo-devmode/src/main/liberty/config/configDropins/overrides/generated-features.xml to: /tmp/tempConfig12837632527231767519/configDropins/overrides/generated-features.xml
[INFO] Copied file: /home/ibmadmin/demo-devmode/src/main/liberty/config/configDropins/overrides/generated-features.xml to: /tmp/tempConfig12837632527231767519/configDropins/overrides/generated-features.xml
[INFO] Configuration features have been added: [mphealth-3.1]
[INFO] Running liberty:install-feature
[INFO] CWWKM2102I: Using artifact based assembly archive : io.openliberty:openliberty-kernel:null:22.0.0.4:zip.
[INFO] CWWKM2102I: Using installDirectory : /home/ibmadmin/demo-devmode/target/liberty/wlp.
[INFO] CWWKM2102I: Using serverName : defaultServer.
[INFO] CWWKM2102I: Using serverDirectory : /home/ibmadmin/demo-devmode/target/liberty/wlp/usr/servers/defaultServer.
[INFO] Parsing the server file for features and includes: tempConfig12837632527231767519/configDropins/defaults/install_apps_configuration_1491924271.xml
[INFO] Parsing the server file for features and includes: tempConfig12837632527231767519/server.xml
[INFO] Parsing the server file for features and includes: tempConfig12837632527231767519/configDropins/overrides/generated-features.xml
[INFO] Parsing the server file for features and includes: tempConfig12837632527231767519/configDropins/overrides/liberty-plugin-variable-config.xml

A new feature is generated and added to the container.

[INFO] Installing features [mphealth-3.1, mpmetrics-3.0, cdi-2.0, jaxrs-2.1] on container liberty-dev
[INFO] [AUDIT   ] CWWKT0016I: Web application available (default_host): http://34038634b045:9080/
[INFO] [AUDIT   ] CWWKZ0003I: The application demo-devmode-maven updated in 1.798 seconds.
[INFO] Copied file: /home/ibmadmin/demo-devmode/src/main/liberty/config/configDropins/overrides/generated-features.xml to: /home/ibmadmin/demo-devmode/target/liberty/wlp/usr/servers/defaultServer/configDropins/overrides/generated-features.xml
[INFO] [WARNING ] SRVE0190E: File not found: /health

The web application is started before generated-features.xml is copied to target.
The new endpoint is not found.
If you restart the container the events happen in order and the endpoint is found.
After container restart:

[INFO] [AUDIT   ] CWWKT0016I: Web application available (default_host): http://4fb16a83aada:9080/metrics/
[INFO] [AUDIT   ] CWWKT0016I: Web application available (default_host): http://4fb16a83aada:9080/ibm/api/
[INFO] [AUDIT   ] CWWKT0016I: Web application available (default_host): http://4fb16a83aada:9080/health/
[INFO] [AUDIT   ] CWWKT0016I: Web application available (default_host): http://4fb16a83aada:9080/
[INFO] [AUDIT   ] CWWKZ0001I: Application demo-devmode-maven started in 5.069 seconds.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    New Issues

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions