oracle/weblogic-deploy-tooling

discoverDomain version 4.3.3 failed to create domain yaml fail when it is used with target option "wko"

maggiehe00 opened this issue · 2 comments

After version 4.3.3 discoverDomain(version 4.3.3) has been failing

discoverDomain.log

to create domain yaml when it is used with target option "wko"

How to reproduce
On wko main branch, run ItLiftAndShiftFromOnPremDomain test by “mvn -Dit.test=ItLiftAndShiftFromOnPremDomain -pl integration-tests -P integration-tests clean verify”

The test create a MiiDomain from an on-prem WLS domain by firstly using WDT discoverDomain tool on an on-prem domain. This tool when used with target option wko will create the necessary wdt model file, properties file, an archive file and a domain yaml file. The test then use the resulting model file to create an MiiDomain.
But now discoverDomain failed to create domain yaml file.

####<Mar 3, 2025 5:36:51 AM> <discover_security_configuration>
####<Mar 3, 2025 5:36:51 AM>

Issue Log for discoverDomain version 4.3.3 running WebLogic version 12.2.1.4.0 in offline mode:

SEVERE Messages:

    1. WLSDPLY-20035: discoverDomain encountered an unexpected runtime exception.  Please file an issue on GitHub and attach the log file and stdout. Exception: weblogic.security.internal.FileUtilsException

Total: SEVERE : 1 WARNING : 0

discoverDomain.sh failed (exit code = 2)
@@ Info: WDT discoverDomain.sh output is in /u01/wdt/discoverDomain.sh.out and /u01/wdt/weblogic-deploy/logs
@@ Error: WDT discoverDomain.sh failed.>

————————————————————————————————
In the /u01/wdt/weblogic-deploy/logs

weblogic.security.internal.FileUtilsException: [Security:090192]Could not create temporary file for SerializedSystemIni.dat, .new, /u01/onpremdomain/security.
at weblogic.security.internal.FileUtils.error(FileUtils.java:24)
at weblogic.security.internal.FileUtils.replace(FileUtils.java:91)
at weblogic.security.internal.SerializedSystemIni.write(SerializedSystemIni.java:118)
at weblogic.security.internal.SerializedSystemIni.(SerializedSystemIni.java:131)
at weblogic.security.internal.SerializedSystemIni.getEncryptionService(SerializedSystemIni.java:366)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.python.core.PyReflectedFunction.call(Unknown Source)
at org.python.core.PyReflectedFunction.call(Unknown Source)
at org.python.core.PyObject.call(Unknown Source)
at org.python.core.PyObject.invoke(Unknown Source)
at wlsdeploy.util.weblogic_helper$py._WebLogicHelper__get_encryption_service$36(/u01/wdt/weblogic-deploy/lib/python/wlsdeploy/util/weblogic_helper.py:397)
at wlsdeploy.util.weblogic_helper$py.call_function(/u01/wdt/weblogic-deploy/lib/python/wlsdeploy/util/weblogic_helper.py)

discoverDomain.sh out file

JDK version is 1.8.0_361-b09
JAVA_HOME = /u01/jdk
WLST_EXT_CLASSPATH = /u01/wdt/weblogic-deploy/lib/weblogic-deploy-core.jar
CLASSPATH = /u01/wdt/weblogic-deploy/lib/weblogic-deploy-core.jar
WLST_PROPERTIES = -Dcom.oracle.cie.script.throwException=true -Djava.util.logging.config.class=oracle.weblogic.deploy.logging.WLSDeployLoggingConfig -Dslf4j.provider=org.slf4j.jul.JULServiceProvider -Dslf4j.internal.verbosity=ERROR
/u01/oracle/oracle_common/common/bin/wlst.sh /u01/wdt/weblogic-deploy/lib/python/discover.py -oracle_home /u01/oracle -target wko -domain_home /u01/onpremdomain -model_file onpremdomain.yaml -variable_file onpremdomain.properties -archive_file .zip -output_dir /u01/wkomodelfilesdir

Initializing WebLogic Scripting Tool (WLST) ...

Jython scans all the jar files it can find at first startup. Depending on the system, this process may take a few minutes to complete, and WLST may not return a prompt right away.

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

####<Mar 4, 2025 7:30:06 PM> <The WebLogic Deploy Tooling discoverDomain version is 4.3.3:.8076c58:Feb 12, 2025 19:05 UTC>
####<Mar 4, 2025 7:30:06 PM> <The discoverDomain program will write its log to directory /u01/wdt/weblogic-deploy/logs>
####<Mar 4, 2025 7:30:06 PM>

</u01/wdt/weblogic-deploy/lib/python/discover.py running with Java version 1.8.0_361 on operating system Linux 4.14.35-1902.4.8.el7uek.x86_64 (amd64)>
####<Mar 4, 2025 7:30:06 PM> </u01/wdt/weblogic-deploy/lib/python/discover.py is running on a Java version that supports the encryption algorithms used by WDT encryption>
####<Mar 4, 2025 7:30:06 PM> <init>
####<Mar 4, 2025 7:30:06 PM> <call>
####<Mar 4, 2025 7:30:06 PM> <__copy_from_args> <Local WebLogic version is 12.2.1.4.0>
####<Mar 4, 2025 7:30:06 PM> <__finish_initialization> <Domain type WLS type definition file /u01/wdt/weblogic-deploy/lib/typedefs/WLS.json version WLS_12CR2 does not contain a postCreateRcuSchemasScript section>
####<Mar 4, 2025 7:30:06 PM> <__finish_initialization> <Domain type WLS type definition file /u01/wdt/weblogic-deploy/lib/typedefs/WLS.json version WLS_12CR2 does not contain a postCreateDomainScript section>
####<Mar 4, 2025 7:30:06 PM> <__finish_initialization> <Domain type WLS type definition file /u01/wdt/weblogic-deploy/lib/typedefs/WLS.json version WLS_12CR2 does not contains any discoverExcludedLocationsBinariesToArchive entries>
####<Mar 4, 2025 7:30:06 PM> <init> <Aliases loaded using WebLogic version 12.2.1.4.0 and WLST OFFLINE mode>
####<Mar 4, 2025 7:30:06 PM>
####<Mar 4, 2025 7:30:09 PM> <_get_domain_name>
####<Mar 4, 2025 7:30:10 PM> <call> <Starting discovery of the WebLogic Remote Console domain extension in domain home /u01/onpremdomain>
####<Mar 4, 2025 7:30:10 PM>
####<Mar 4, 2025 7:30:10 PM> <discover_domain_mbean>
####<Mar 4, 2025 7:30:10 PM> <discover_domain_mbean>
####<Mar 4, 2025 7:30:10 PM> <discover_domain_mbean>
####<Mar 4, 2025 7:30:10 PM> <_get_nm_properties>
####<Mar 4, 2025 7:30:10 PM> <discover_domain_mbean>
####<Mar 4, 2025 7:30:10 PM> <get_clusters> <Discovering 1 clusters>
####<Mar 4, 2025 7:30:10 PM> <get_clusters>
####<Mar 4, 2025 7:30:10 PM> <get_servers> <Discovering 1 servers>
####<Mar 4, 2025 7:30:10 PM> <get_servers>
####<Mar 4, 2025 7:30:13 PM> <get_server_templates> <Discovering 1 server templates>
####<Mar 4, 2025 7:30:13 PM> <get_server_templates>
####<Mar 4, 2025 7:30:16 PM> <get_machines> <Discovering 1 machines>
####<Mar 4, 2025 7:30:16 PM> <get_machines>
####<Mar 4, 2025 7:30:16 PM> <discover_security_configuration>
####<Mar 4, 2025 7:30:16 PM>

Issue Log for discoverDomain version 4.3.3 running WebLogic version 12.2.1.4.0 in offline mode:

SEVERE Messages:

    1. WLSDPLY-20035: discoverDomain encountered an unexpected runtime exception.  Please file an issue on GitHub and attach the log file and stdout. Exception: weblogic.security.internal.FileUtilsException

Total: SEVERE : 1 WARNING : 0

discoverDomain.sh failed (exit code = 2)

Fixed with internal merge request 1784.
Confirmed fixed on 3/6/2025 with WDT nightly build from main.