WebSphere Application Server & Liberty

 View Only
  • 1.  Always need a manual RESTART of the Spring Boot -Cloud Config server upon WAS 8.5.5.15 server RESTART

    Posted Wed April 01, 2020 07:27 PM
    Hi,
      We  have cloud config server (spring-cloud.version>Edgware.RELEASE) which is built on spring-boot-starter-parent(1.5.8.RELEASE) and deployed on WebSphere Application Server 8.5.5.15 server.
     
    1.     Application is being deployed and configured with Class loader order (Classes loaded with local class loader first (parent last)) and WAR class loader policy (Single class loader for application)
    2.    Having Shared lib (PFA spring-boot-app-shared-lib.zip) reference to the application and having class loading as (Use an isolated class loader for this shared library)
    3. For reference attached application main startup and web.xml file
      1. ConfigServerApplicationInitializer .java class  (please find in ConfigServerApplicationInitializer.zip file), this is the start up class.
      2. web.xml (PFA) ; it doesn't have any application startup references;having just a place holder index.jsp page. (PFA)

    Problem
         
    Upon WAS server restart the spring boot config server is not initialized/started;but application status shows as green.
      As a verification 
             1)When we browse the application URL (ex:- http://<xxx-was-server>:9080/nysoh-config-server-web-auth2/     it shows the message on browser as   'NYSOH SPRING CLOUD CONFIG config server!!!' (content from index.jsp ) .
              2) For intended application full url ( http://<xxx-was-server>:9080/nysoh-config-server-web-auth2//properties/dit4/cipher-text)  it throws as 
    Error 404: java.io.FileNotFoundException: SRVE0190E: File not found: /properties/dit4/cipher-text


      Please note that if we manually start the config server application it is being successfully started and fully functional. 

    Please suggest, why application is not coming up automatically upon WAS server restart;




    ------------------------------
    Subbareddy Bogathi
    java/j2ee application developer
    ------------------------------

    Attachment(s)

    html
    index.html   187 B 1 version
    zip
    spring-boot-app-shared-lib.zip   17.70 MB 1 version
    xml
    web.xml   551 B 1 version


  • 2.  RE: Always need a manual RESTART of the Spring Boot -Cloud Config server upon WAS 8.5.5.15 server RESTART

    Posted Thu April 02, 2020 10:28 AM
    Two quick questions:

    1) Would you be able to share some of the exception stack?
    2) Are there other apps installed on the server? One plausible reason for this type of behavior would be an interaction with another app (i.e. it depends on something in the other app and needs to wait for the other app to be active), but obviously that's not the issue if this is your only application.

    ------------------------------
    Jarid Kvale
    ------------------------------



  • 3.  RE: Always need a manual RESTART of the Spring Boot -Cloud Config server upon WAS 8.5.5.15 server RESTART

    Posted Wed April 08, 2020 06:08 PM

    After some more analysis on our end, looks like actual issue is as mentioned below..

    Upon WAS server RESTART WebApplicationInitializer is not being detected for spring boot config server web application; whereas its been detected successfully if we RESTART the config server web app alone manually using WAS admin console.   
     
    Please refer to the attached word doc   which has the startup SpringBootServletInitializer impl class (ConfigServerWebApplicationInitializer)web 
    and related WAS sys out logs in zip file (system-out-log.zip)



    ------------------------------
    Subbareddy Bogathi
    ------------------------------

    Attachment(s)



  • 4.  RE: Always need a manual RESTART of the Spring Boot -Cloud Config server upon WAS 8.5.5.15 server RESTART

    Posted Wed April 08, 2020 06:11 PM
      |   view attached
    PFA the ConfigServerWebApplicationInitializer.java as attachment

    ------------------------------
    Subbareddy Bogathi
    ------------------------------

    Attachment(s)



  • 5.  RE: Always need a manual RESTART of the Spring Boot -Cloud Config server upon WAS 8.5.5.15 server RESTART

    Posted Thu April 09, 2020 11:14 AM
    It might be worth opening up a support case - this looks like it might require some more in-depth trace analysis (particularly in the class loader space). I'm not enough of a Spring expert to make much of an educated guess otherwise, unfortunately.

    ------------------------------
    Jarid Kvale
    ------------------------------



  • 6.  RE: Always need a manual RESTART of the Spring Boot -Cloud Config server upon WAS 8.5.5.15 server RESTART

    Posted Fri April 10, 2020 05:16 PM
    Issue is resolved after below mentioned code fix, our config server spring boot application started automatically upon WAS server restart.   But don't understand why WAS server startup process expects this declaration explicitly when SpringBootServletInitializer  is already of type  WebApplicationInitializer. 

    Fix
    1)After implementing  WebApplicationInitializer  interface directly as mentioned below.  
    @EnableConfigServer
    @SpringBootApplication
    public class ConfigServerWebApplicationInitializer extends SpringBootServletInitializer implements WebApplicationInitializer {  .....

    2)Removed web.xml 

    ------------------------------
    Subbareddy Bogathi
    ------------------------------



  • 7.  RE: Always need a manual RESTART of the Spring Boot -Cloud Config server upon WAS 8.5.5.15 server RESTART

    Posted Sat April 11, 2020 03:49 PM
    Glad to hear you got it working! I would note that this question:

    But don't understand why WAS server startup process expects this declaration explicitly when SpringBootServletInitializer  is already of type  WebApplicationInitializer. 

    is a question for Spring, not WAS - WebApplicationInitializer is a Spring class, not a WAS/JavaEE class, and it's unlikely that it's server code that's attempting to process it.

    ------------------------------
    Jarid Kvale
    ------------------------------