oracle / weblogic-deploy-tooling

WebLogic Deploy Tooling
https://oracle.github.io/weblogic-deploy-tooling/
Universal Permissive License v1.0
151 stars 90 forks source link

<WLSDPLY-20035> discoverDomain encountered an unexpected runtime exception. #1170

Closed vdrHorst closed 2 years ago

vdrHorst commented 2 years ago

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: exceptions.NameError

Total: WARNING : 0 SEVERE : 1

discoverDomain.sh failed (exit code = 2) Script "discover_WDT.sh" ended with 1 Failure(s) in 00:00:40

vdrHorst commented 2 years ago
DEBUG: (RETURN value:) JDK version is 1.8.0_333-b02
JAVA_HOME = /usr/java/jdk1.8.0_latest
WLST_EXT_CLASSPATH = /ohi/SWdepot/Oracle/weblogic-deploy-tooling/latest/lib/weblogic-deploy-core.jar
CLASSPATH = /ohi/SWdepot/Oracle/weblogic-deploy-tooling/latest/lib/weblogic-deploy-core.jar
WLST_PROPERTIES = -Dcom.oracle.cie.script.throwException=true -Djava.util.logging.config.class=oracle.weblogic.deploy.logging.WLSDeployLoggingConfig
/ohi/oraBase/product/frs12214/oracle_common/common/bin/wlst.sh /ohi/SWdepot/Oracle/weblogic-deploy-tooling/latest/lib/python/discover.py -oracle_home /ohi/oraBase/product/frs12214 -domain_type DOMSVL -domain_home /ohi/domBase/DOMSVL12214 -archive_file /ohi/domBase/DOMSVL12214/wdt.d/DOMSVL12214_20220815_180152.zip -model_file /ohi/domBase/DOMSVL12214/wdt.d/DOMSVL12214_20220815_180152_offline.yaml

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

####<Aug 15, 2022 6:02:11 PM> <INFO> <WebLogicDeployToolingVersion> <logVersionInfo> <WLSDPLY-01750> <The WebLogic Deploy Tooling discoverDomain version is 2.3.2:.229089c:Jul 20, 2022 15:29 UTC>
####<Aug 15, 2022 6:02:11 PM> <INFO> <path_utils> <find_config_path> <WLSDPLY-01725> <Using configuration file /ohi/SWdepot/Oracle/weblogic-deploy-tooling/fsgbu_custom_config/typedefs/DOMSVL.json>
####<Aug 15, 2022 6:02:11 PM> <INFO> <ModelContext> <__copy_from_args> <WLSDPLY-01050> <WebLogic version for aliases is 12.2.1.4.0.201001>
####<Aug 15, 2022 6:02:11 PM> <INFO> <discover> <main> <WLSDPLY-06024> <No variable file provided. Model passwords will contain the token '-- FIX ME --'6>
####<Aug 15, 2022 6:02:20 PM> <INFO> <discover> <_get_domain_name> <WLSDPLY-06022> <Discover domain DOMSVL12214>
####<Aug 15, 2022 6:02:20 PM> <INFO> <TopologyDiscoverer> <discover> <WLSDPLY-06600> <Discovering domain model topology>
####<Aug 15, 2022 6:02:20 PM> <INFO> <TopologyDiscoverer> <_get_nm_properties> <WLSDPLY-06627> <Discovering NM Properties>
####<Aug 15, 2022 6:02:21 PM> <INFO> <TopologyDiscoverer> <get_servers> <WLSDPLY-06603> <Discovering 4 servers>
####<Aug 15, 2022 6:02:21 PM> <INFO> <TopologyDiscoverer> <get_servers> <WLSDPLY-06604> <Adding Server AS_SVL12214>
####<Aug 15, 2022 6:02:21 PM> <INFO> <TopologyDiscoverer> <get_servers> <WLSDPLY-06604> <Adding Server MS_SVL12214_BTEXA53>
####<Aug 15, 2022 6:02:22 PM> <INFO> <TopologyDiscoverer> <get_servers> <WLSDPLY-06604> <Adding Server MS_SVL12214_BTEXA51>
####<Aug 15, 2022 6:02:22 PM> <INFO> <TopologyDiscoverer> <get_servers> <WLSDPLY-06604> <Adding Server MS_SVL12214_BTEXA52>
####<Aug 15, 2022 6:02:23 PM> <INFO> <TopologyDiscoverer> <get_unix_machines> <WLSDPLY-06609> <Discovering 1 Unix machines>
####<Aug 15, 2022 6:02:23 PM> <INFO> <TopologyDiscoverer> <get_unix_machines> <WLSDPLY-06610> <Adding Unix Machine localmachine>
####<Aug 15, 2022 6:02:23 PM> <INFO> <TopologyDiscoverer> <get_machines> <WLSDPLY-06611> <Discovering 0 machines>
####<Aug 15, 2022 6:02:23 PM> <INFO> <TopologyDiscoverer> <discover_security_configuration> <WLSDPLY-06622> <Adding Security Configuration>
####<Aug 15, 2022 6:02:24 PM> <INFO> <TopologyDiscoverer> <get_embedded_ldap_configuration> <WLSDPLY-06639> <Skipping Embedded LDAP Server Configuration>
####<Aug 15, 2022 6:02:24 PM> <INFO> <ResourcesDiscoverer> <discover> <WLSDPLY-06300> <Discovering domain model resources>
####<Aug 15, 2022 6:02:24 PM> <INFO> <GlobalResourcesDiscoverer> <get_self_tuning> <WLSDPLY-06441> <Adding Self Tuning>
####<Aug 15, 2022 6:02:24 PM> <INFO> <CommonResourcesDiscoverer> <get_datasources> <WLSDPLY-06340> <Discovering 9 JDBC System Resources>
####<Aug 15, 2022 6:02:24 PM> <INFO> <CommonResourcesDiscoverer> <get_datasources> <WLSDPLY-06341> <Adding JDBC System Resource DS_SVL_BTEXA53>
####<Aug 15, 2022 6:02:25 PM> <INFO> <CommonResourcesDiscoverer> <get_datasources> <WLSDPLY-06341> <Adding JDBC System Resource DS_HSL_BTEXA53>
####<Aug 15, 2022 6:02:25 PM> <INFO> <CommonResourcesDiscoverer> <get_datasources> <WLSDPLY-06341> <Adding JDBC System Resource DS_PSL_BTEXA53>
####<Aug 15, 2022 6:02:25 PM> <INFO> <CommonResourcesDiscoverer> <get_datasources> <WLSDPLY-06341> <Adding JDBC System Resource DS_SVL_BTEXA51>
####<Aug 15, 2022 6:02:25 PM> <INFO> <CommonResourcesDiscoverer> <get_datasources> <WLSDPLY-06341> <Adding JDBC System Resource DS_PSL_BTEXA51>
####<Aug 15, 2022 6:02:25 PM> <INFO> <CommonResourcesDiscoverer> <get_datasources> <WLSDPLY-06341> <Adding JDBC System Resource DS_SVL_BTEXA52>
####<Aug 15, 2022 6:02:26 PM> <INFO> <CommonResourcesDiscoverer> <get_datasources> <WLSDPLY-06341> <Adding JDBC System Resource DS_HSL_BTEXA52>
####<Aug 15, 2022 6:02:26 PM> <INFO> <CommonResourcesDiscoverer> <get_datasources> <WLSDPLY-06341> <Adding JDBC System Resource DS_PSL_BTEXA52>
####<Aug 15, 2022 6:02:26 PM> <INFO> <CommonResourcesDiscoverer> <get_datasources> <WLSDPLY-06341> <Adding JDBC System Resource DS_HSL_BTEXA51>
####<Aug 15, 2022 6:02:26 PM> <INFO> <CommonResourcesDiscoverer> <get_file_stores> <WLSDPLY-06346> <Discovering 2 File Stores>
####<Aug 15, 2022 6:02:26 PM> <INFO> <CommonResourcesDiscoverer> <get_file_stores> <WLSDPLY-06347> <Adding File Store WseeSoapjmsFileStore_auto_1>
####<Aug 15, 2022 6:02:26 PM> <INFO> <CommonResourcesDiscoverer> <archive_file_store_directory> <WLSDPLY-06349> <Add File Store WseeSoapjmsFileStore_auto_1 directory wlsdeploy/stores/WseeSoapjmsFileStore_auto_1/ to archive file>
####<Aug 15, 2022 6:02:26 PM> <INFO> <CommonResourcesDiscoverer> <get_file_stores> <WLSDPLY-06347> <Adding File Store WseeJaxwsFileStore_auto_1>
####<Aug 15, 2022 6:02:26 PM> <INFO> <CommonResourcesDiscoverer> <archive_file_store_directory> <WLSDPLY-06349> <Add File Store WseeJaxwsFileStore_auto_1 directory wlsdeploy/stores/WseeJaxwsFileStore_auto_1/ to archive file>
####<Aug 15, 2022 6:02:26 PM> <INFO> <JmsResourcesDiscoverer> <get_jms_servers> <WLSDPLY-06470> <Discovering 2 JMS Servers>
####<Aug 15, 2022 6:02:26 PM> <INFO> <JmsResourcesDiscoverer> <get_jms_servers> <WLSDPLY-06471> <Adding JMS Server WseeSoapjmsJmsServer_auto_1>
####<Aug 15, 2022 6:02:26 PM> <INFO> <JmsResourcesDiscoverer> <get_jms_servers> <WLSDPLY-06471> <Adding JMS Server WseeJaxwsJmsServer_auto_1>
####<Aug 15, 2022 6:02:26 PM> <INFO> <JmsResourcesDiscoverer> <get_saf_agents> <WLSDPLY-06472> <Discovering 1 SAF Agents>
####<Aug 15, 2022 6:02:26 PM> <INFO> <JmsResourcesDiscoverer> <get_saf_agents> <WLSDPLY-06473> <Adding SAF Agent ReliableWseeJaxwsSAFAgent>
####<Aug 15, 2022 6:02:27 PM> <INFO> <JmsResourcesDiscoverer> <get_jms_system_resources> <WLSDPLY-06478> <Discovering 2 JMS System Resources>
####<Aug 15, 2022 6:02:27 PM> <INFO> <JmsResourcesDiscoverer> <get_jms_system_resources> <WLSDPLY-06479> <Adding JMS System Resource WseeJaxwsJmsModule>
####<Aug 15, 2022 6:02:27 PM> <INFO> <JmsResourcesDiscoverer> <get_jms_system_resources> <WLSDPLY-06479> <Adding JMS System Resource WseeSoapjmsJmsModule>
####<Aug 15, 2022 6:02:27 PM> <INFO> <DeploymentsDiscoverer> <discover> <WLSDPLY-06380> <Discovering domain model deployments>
####<Aug 15, 2022 6:02:27 PM> <INFO> <DeploymentsDiscoverer> <get_applications> <WLSDPLY-06391> <Discovering 16 Applications>
####<Aug 15, 2022 6:02:27 PM> <INFO> <DeploymentsDiscoverer> <get_applications> <WLSDPLY-06392> <Adding Application state-management-provider-memory-rar>
####<Aug 15, 2022 6:02:27 PM> <INFO> <DeploymentsDiscoverer> <add_application_to_archive> <WLSDPLY-06393> <Will not add application state-management-provider-memory-rar from Oracle installation directory to archive>
####<Aug 15, 2022 6:02:27 PM> <INFO> <DeploymentsDiscoverer> <get_applications> <WLSDPLY-06392> <Adding Application SVLBOWS_BTEXA47#v4.453>
####<Aug 15, 2022 6:02:27 PM> <INFO> <DeploymentsDiscoverer> <add_application_to_archive> <WLSDPLY-06394> <Add application SVLBOWS_BTEXA47#v4.453 binary /ohi/envBase/BTEXA47/ohiBase/java/SVLBOWS.ear to archive>
####<Aug 15, 2022 6:02:27 PM> <SEVERE> <PyReflectedFunction> <__call__> <WLSDPLY-20035> <discoverDomain encountered an unexpected runtime exception.  Please file an issue on GitHub and attach the log file and stdout. Exception: exceptions.NameError>

Issue Log for null version 2.3.2 running WebLogic version null 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: exceptions.NameError

Total:       WARNING :     0    SEVERE :     1

discoverDomain.sh failed (exit code = 2)
ddsharpe commented 2 years ago

@vdrHorst Please attach the discoverDomain log file from the logs directory.

ddsharpe commented 2 years ago

What version and patch level is the Oracle Home that you used here?

vdrHorst commented 2 years ago

discover_DOMSVL12214.log Logfile is same as pasted 7 days ago as plain text in comment directly...

Version and patch level Oracle Home: 12.2.1.4, latest Stack Patch Bundle April 2022 lsinventory.txt

CarolynRountree commented 2 years ago

@vdrHorst the file that you provided is the stdout. We need the discover domain log found in \<wlsdeploy-tool>/logs

robertpatrick commented 2 years ago

@vdrHorst Can you please provide the actual log file instead of stdout? Without it, there is insufficient information about what happened to diagnose the issue.

vdrHorst commented 2 years ago

@CarolynRountree & @robertpatrick I did not have such /logs directory, as that directory is a central NFS export mounted read-only on all our hosts. The host where I run the wdt tools cannot create/write there.

I ran a separate run with a writable tool location and there the logs directory was created on the first run of the tool. It also gives clear direction of the actual root cause

<Sep 2, 2022 10:47:52 AM> <> <THROW

java.lang.IllegalArgumentException: WLSDeployArchive /ohi/domBase/DOMSVL12214/wdt.d/DOMSVL12214_20220902_104657.zip unable to add file /ohi/envBase/BTEXA47/ohiBase/java/SVLBOWS.ear to the archive because the file does not exist Clearly a local domain issue, not a tool issue. (Though would be nicer to report this root cause in the normal output instead of the generic exception. If you still need more logging, I can provide it)

I never knew there was a logs file needed there, as I never (until now) needed it. All tools runs perfectly without even mentioning it in the outputs it cannot write there. Would be nice if there was a warning notification on this. Would it be possible to set this logging directory with an environment parameter? As I would like to keep the tools directory secured and therefore read only.

robertpatrick commented 2 years ago

@vdrHorst If the weblogic-deploy/logs directory is not writable by the user running WDT, WDT will first try to use the current working directory for the logs. If that directory is also not writable, WDT creates a directory in your OS’s temp directory and uses that. Can you check these other locations for the log file?

robertpatrick commented 2 years ago

@vdrHorst if all else fails, the WLSDEPLOY_LOG_DIRECTORY environment variable will allow you to override where the logs are created.

vdrHorst commented 2 years ago

Hi @robertpatrick , It works like it is described on https://oracle.github.io/weblogic-deploy-tooling/userguide/tools-config/logging/ (there was an extra logging in /tmp present though, related but different /tmp/wlstOfflineLogs_oracle/cfgfwk_20220905110449.log which surprised me, guessing that is log from the WebLogic server itself instead of the wdt tool.) discoverDomain.log

robertpatrick commented 2 years ago

@vdrHorst Yes, the wlstOfflineLogs directory is create by WLST offline. It can be helpful in certain scenarios where WDT does not have enough information about why WLST offline operations failed.

Please note that there is a problem in your domain where the binary referred to by the SVLBOWS_BTEXA47#v4.453 application does not exist.

####<Sep 5, 2022 11:34:11 AM> <INFO> <DeploymentsDiscoverer> <add_application_to_archive> <WLSDPLY-06394> <Add application SVLBOWS_BTEXA47#v4.453 binary /ohi/envBase/BTEXA47/ohiBase/java/SVLBOWS.ear to archive>
####<Sep 5, 2022 11:34:11 AM> <FINER> <WLSDeployArchive> <addApplication> <> <ENTRY /ohi/envBase/BTEXA47/ohiBase/java/SVLBOWS.ear>
####<Sep 5, 2022 11:34:11 AM> <FINER> <WLSDeployArchive> <validateExistingFile> <> <ENTRY /ohi/envBase/BTEXA47/ohiBase/java/SVLBOWS.ear appPath /ohi/domBase/DOMSVL12214/wdt.d/DOMSVL12214_20220905_113330.zip addApplication true>
####<Sep 5, 2022 11:34:11 AM> <FINER> <WLSDeployArchive> <validateExistingFile> <> <THROW
java.lang.IllegalArgumentException: WLSDeployArchive /ohi/domBase/DOMSVL12214/wdt.d/DOMSVL12214_20220905_113330.zip unable to add file /ohi/envBase/BTEXA47/ohiBase/java/SVLBOWS.ear to the archive because the file does not exist

@CarolynRountree This error condition above should be handled and WDT discoverDomain should exist with a proper error message instead of getting a Python NameError.

####<Sep 5, 2022 11:34:11 AM> <SEVERE> <PyReflectedFunction> <__call__> <WLSDPLY-20035> <discoverDomain encountered an unexpected runtime exception.  Please file an issue on GitHub and attach the log file and stdout. Exception: exceptions.NameError>
####<Sep 5, 2022 11:34:11 AM> <FINER> <PyReflectedFunction> <__call__> <WLSDPLY-20036> <discoverDomain encountered an unexpected runtime exception.  Stacktrace: ['Traceback (most recent call last):\n', '  File "/ohi/.autofs/SWdepot.LHR/github/weblogic-deploy-tooling/2.3.2/weblogic-deploy/lib/python/discover.py", line 645, in ?\n    main(sys.argv)\n', '  File "/ohi/.autofs/SWdepot.LHR/github/weblogic-deploy-tooling/2.3.2/weblogic-deploy/lib/python/discover.py", line 618, in main\n    model = __discover(model_context, aliases, credential_injector, helper)\n', '  File "/ohi/.autofs/SWdepot.LHR/github/weblogic-deploy-tooling/2.3.2/weblogic-deploy/lib/python/discover.py", line 249, in __discover\n    aliases=aliases, credential_injector=credential_injector).discover()\n', '  File "/ohi/.autofs/SWdepot.LHR/github/weblogic-deploy-tooling/2.3.2/weblogic-deploy/lib/python/wlsdeploy/tool/discover/deployments_discoverer.py", line 50, in discover\n    model_top_folder_name, applications = self.get_applications()\n', '  File "/ohi/.autofs/SWdepot.LHR/github/weblogic-deploy-tooling/2.3.2/weblogic-deploy/lib/python/wlsdeploy/tool/discover/deployments_discoverer.py", line 227, in get_applications\n    self._add_application_to_archive(application, result[application])\n', '  File "/ohi/.autofs/SWdepot.LHR/github/weblogic-deploy-tooling/2.3.2/weblogic-deploy/lib/python/wlsdeploy/tool/discover/deployments_discoverer.py", line 269, in _add_application_to_archive\n    self._disconnect_target(application_name, application_dict, iae.getLocalizedMessage())\n', '  File "/ohi/.autofs/SWdepot.LHR/github/weblogic-deploy-tooling/2.3.2/weblogic-deploy/lib/python/wlsdeploy/tool/discover/deployments_discoverer.py", line 344, in _disconnect_target\n    class_name=_class_name, method_name=_method_name)\n', "<type 'instance'>: iae\n"]>