Search code examples
dockerdocker-composeweblogicweblogic11g

Weblogic: lose changes after restart


I have a strange issue with the WebLogic server: I lose the last Item that I created while creating multiply resources (JMS queues, DB Pools, etc.).

Environment:

  • WebLogic Server Version: 12.2.1.4.0
  • System: Oracle Linux Server 7.8 (in Docker)
  • Java: java version "1.8.0_231", Java(TM) SE Runtime Environment (build 1.8.0_231-b11), Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode)
  • Weblogic configuration: Only admin server, no managed servers.

Steps what I execute:

  1. Log in to the Docker container.
  2. Start WebLogic Admin server with ./startWebLogic.sh command
  3. I create multiply WebLogic resources via WLST script. When the script finished I can see everything on the web console.
  4. Stop the server with ./stopWebLogic.sh weblogic weblogic12 t3://localhost:7001 command
  5. start the Admin server again
  6. all changes what I made before was lost completely

What I see is this:

  • If I create a dummy resource from the console (does not matter what, a pool, a persistent store, a JMS, etc.) before I stop the server, (after step 3 above) then I only lose the last dummy item and the rest I created with WLST remains.
  • If I create 2 resources from the console (does not matter what) then I lose always the last item.
  • If I create 3 something from the console after the restart 2 remains, the 3rt lost.
  • Deleting 2 entries via the WL web console after the restart I can see that only one item was deleted. The 2nd just came back.

It seems that WebLogic forgets to "commit" the last item somehow. When I check the config.xml file before the WL restart, I can see in there what I need. After the restart WL reverts this file somehow to the preview state (without my last item) and the size of the file just changed.

If I activate the production mode then everything is the same, I can not see differences.

I think that this issue is not related to Docker because I do not use any Docker volume. And a test file that I create next to the config.xml is persistent between stop and start the container.

Is this a WL bug? Have you seen the same?

UPDATE

The docker image that I use above was created from another Docker Container with docker commit command. The previous Docker layer contains some common resources and installed libraries. This issue does not exist in the previous image. So it seems that something strange things have happened across Docker created an image from the container.

 ---------------
 ¦ Oracle Linux¦
 ---------------
        ¦
------------------
¦WL with deployed¦ <- docker commit ....
¦  shared libs   ¦    this issue does not appear at this level
------------------
        ¦
------------------
¦Image what I use¦ <- lose changes between docker stop and start
------------------

So it seems that this is a Docker bug or both: Oracle and Docker.


Solution

  • The following workaround solves the issue: Delete the domain_bak directory from the Weblogic domain home before starting the server.

    Example:

    echo "starting the WebLogic server..."
    rm -Rf $ORACLE_HOME/user_projects/domains/$DOMAIN_NAME/servers/domain_bak/*
    $ORACLE_HOME/user_projects/domains/$DOMAIN_NAME/startWebLogic.sh
    

    link to the reference post