WLST script to Enable/Disable the debug flags in Weblogic Server
This tutorial explains the approach to enable/disable the debug flags in Weblogic Server.
The Debugging flags will help us to enable/disable the debugging for different modules in weblogic.
The flags can be enabled/disabled in different ways
Select the required flags and click on Enable/Disable.
WLST Script
The below WLST script enable the Debug Flag ‘DebugSSL’ for configured servers
EnableORDisableDFlags.properties
serverflagconfigs=AdminServer=DebugSSL:false,MS1=DebugSSL:true
EnableORDisableDFlags.py
import re
from java.io import FileInputStreamdef EnableORDisableDFlags(): edit()
startEdit()
propInputStream = FileInputStream('EnableORDisableDFlags.properties')
configProps = Properties()
configProps.load(propInputStream)
serverflagconfigs = re.split(",",configProps.get("serverflagconfigs"))
print serverflagconfigs
for serverConfig in serverflagconfigs:
serverName=re.split("=",serverConfig)[0]
config=re.split("=",serverConfig)[1]
print config
cd('/Servers/'+serverName+'/ServerDebug/'+serverName)
flagName=re.split(":",config)[0]
flagValue=re.split(":",config)[1]
set(flagName,flagValue)
print 'Modified the DFlag for '+serverName+' '+ flagName+':'+flagValue
save()
activate()
def main():
adminURL='t3://localhost:7001'
adminUserName='weblogic'
adminPassword='weblogic1'
connect(adminUserName, adminPassword, adminURL)
EnableORDisableDFlags();
print 'Successfully Modified the DFlags'
disconnect()
main()
Script -
https://github.com/techforum-repo/youttubedata/tree/master/scripts/wlst/EnableORDisableDFlagsBefore executing the script, change the configurations as required.
Execute the script — <<Oracle_Home>>\oracle_common\common\bin\wlst.cmd EnableORDisableDFlags.py
Now the DebugFlag is Enabled/Disabled based on the configurations
JVM start arguments
The debug flags can be enabled/disabled through server start up arguments
Add the flags with -D to the server start up arguments through console Environment →Servers →<<Server>> →Server Start
-Dweblogic.debug.DebugSSL=false
Other option is add the debug flags to the start up file startWebLogic.cmd/startWebLogic.sh or startManagedWebLogic.cmd/startManagedWebLogic.sh based on which file is used to start the server.
e.g.
JAVA_OPTIONS=”${JAVA_OPTIONS} -Dweblogic.debug.DebugSSL=true
The changes will take effect after restarting the server
Debug flags for the Reference
DebugAbbreviation
DebugAppContainer
DebugAsyncQueue
DebugBootstrapServlet
DebugClassRedef
DebugClassSize
DebugCluster
DebugClusterAnnouncements
DebugClusterFragments
DebugClusterHeartbeats
DebugConfigurationEdit
DebugConfigurationRuntime
DebugConnection
DebugConsensusLeasing
DebugDGCEnrollment
DebugDRSCalls
DebugDRSHeartbeats
DebugDRSMessages
DebugDRSQueues
DebugDRSStateTransitions
DebugDRSUpdateStatus
DebugDeploy
DebugDeployment
DebugDeploymentService
DebugDeploymentServiceInternal
DebugDeploymentServiceStatusUpdates
DebugDeploymentServiceTransport
DebugDeploymentServiceTransportHttp
DebugDescriptor
DebugDiagnosticAccessor
DebugDiagnosticArchive
DebugDiagnosticArchiveRetirement
DebugDiagnosticCollections
DebugDiagnosticContext
DebugDiagnosticDataGathering
DebugDiagnosticFileArchive
DebugDiagnosticImage
DebugDiagnosticInstrumentation
DebugDiagnosticInstrumentationActions
DebugDiagnosticInstrumentationConfig
DebugDiagnosticInstrumentationEvents
DebugDiagnosticInstrumentationWeaving
DebugDiagnosticInstrumentationWeavingMatches
DebugDiagnosticJdbcArchive
DebugDiagnosticLifecycleHandlers
DebugDiagnosticQuery
DebugDiagnosticWatch
DebugDiagnosticWlstoreArchive
DebugDiagnosticsHarvester
DebugDiagnosticsHarvesterData
DebugDiagnosticsHarvesterMBeanPlugin
DebugDiagnosticsHarvesterTreeBeanPlugin
DebugDiagnosticsModule
DebugDomainLogHandler
DebugEjbCaching
DebugEjbCmpDeployment
DebugEjbCmpRuntime
DebugEjbCompilation
DebugEjbDeployment
DebugEjbInvoke
DebugEjbLocking
DebugEjbMdbConnection
DebugEjbPooling
DebugEjbSecurity
DebugEjbSwapping
DebugEjbTimers
DebugEmbeddedLDAP
DebugEmbeddedLDAPLogToConsole
DebugEmbeddedLDAPWriteOverrideProps
DebugEventManager
DebugFailOver
DebugFileDistributionServlet
DebugHttp
DebugHttpLogging
DebugHttpSessions
DebugIIOP
DebugIIOPConnection
DebugIIOPMarshal
DebugIIOPNaming
DebugIIOPOTS
DebugIIOPReplacer
DebugIIOPSecurity
DebugIIOPStartup
DebugIIOPTransport
DebugIIOPTunneling
DebugJ2EEManagement
DebugJAXPIncludeClass
DebugJAXPIncludeLocation
DebugJAXPIncludeName
DebugJAXPIncludeTime
DebugJAXPUseShortClass
DebugJDBCConn
DebugJDBCDriverLogging
DebugJDBCInternal
DebugJDBCONS
DebugJDBCRAC
DebugJDBCRMI
DebugJDBCSQL
DebugJMSAME
DebugJMSBackEnd
DebugJMSBoot
DebugJMSCDS
DebugJMSCommon
DebugJMSConfig
DebugJMSDispatcher
DebugJMSDistTopic
DebugJMSDurableSubscribers
DebugJMSFrontEnd
DebugJMSJDBCScavengeOnFlush
DebugJMSLocking
DebugJMSMessagePath
DebugJMSModule
DebugJMSPauseResume
DebugJMSSAF
DebugJMSStore
DebugJMST3Server
DebugJMSWrappers
DebugJMSXA
DebugJMX
DebugJMXCompatibility
DebugJMXCore
DebugJMXDomain
DebugJMXEdit
DebugJMXRuntime
DebugJNDI
DebugJNDIFactories
DebugJNDIResolution
DebugJTA2PC
DebugJTA2PCStackTrace
DebugJTAAPI
DebugJTAGateway
DebugJTAGatewayStackTrace
DebugJTAHealth
DebugJTAJDBC
DebugJTALLR
DebugJTALifecycle
DebugJTAMigration
DebugJTANaming
DebugJTANamingStackTrace
DebugJTANonXA
DebugJTAPropagate
DebugJTARMI
DebugJTARecovery
DebugJTARecoveryStackTrace
DebugJTAResourceHealth
DebugJTATLOG
DebugJTAXA
DebugJTAXAStackTrace
DebugJpaDataCache
DebugJpaEnhance
DebugJpaJdbcJdbc
DebugJpaJdbcSchema
DebugJpaJdbcSql
DebugJpaManage
DebugJpaMetaData
DebugJpaProfile
DebugJpaQuery
DebugJpaRuntime
DebugJpaTool
DebugLeaderElection
DebugLibraries
DebugLoadBalancing
DebugLoggingConfiguration
DebugMessaging
DebugMessagingBridgeRuntime
DebugMessagingBridgeRuntimeVerbose
DebugMessagingBridgeStartup
DebugMessagingKernel
DebugMessagingKernelBoot
DebugMuxer
DebugMuxerConnection
DebugMuxerDetail
DebugMuxerException
DebugMuxerTimeout
DebugPathSvc
DebugPathSvcVerbose
DebugRA
DebugRAClassloader
DebugRAConnEvents
DebugRAConnections
DebugRADeployment
DebugRALifecycle
DebugRALocalOut
DebugRAParsing
DebugRAPoolVerbose
DebugRAPooling
DebugRASecurityCtx
DebugRAWork
DebugRAWorkEvents
DebugRAXAin
DebugRAXAout
DebugRAXAwork
DebugRC4
DebugRSA
DebugReplication
DebugReplicationDetails
DebugRouting
DebugSAFAdmin
DebugSAFLifeCycle
DebugSAFManager
DebugSAFMessagePath
DebugSAFReceivingAgent
DebugSAFSendingAgent
DebugSAFStore
DebugSAFTransport
DebugSAFVerbose
DebugSNMPAgent
DebugSNMPExtensionProvider
DebugSNMPProtocolTCP
DebugSNMPToolkit
DebugSSL
DebugScaContainer
DebugSecurityAdjudicator
DebugSecurityAtn
DebugSecurityAtz
DebugSecurityAuditor
DebugSecurityCertPath
DebugSecurityCredMap
DebugSecurityEEngine
DebugSecurityEncryptionService
DebugSecurityJACC
DebugSecurityJACCNonPolicy
DebugSecurityJACCPolicy
DebugSecurityKeyStore
DebugSecurityPasswordPolicy
DebugSecurityPredicate
DebugSecurityRealm
DebugSecurityRoleMap
DebugSecuritySAML2Atn
DebugSecuritySAML2CredMap
DebugSecuritySAML2Lib
DebugSecuritySAML2Service
DebugSecuritySAMLAtn
DebugSecuritySAMLCredMap
DebugSecuritySAMLLib
DebugSecuritySAMLService
DebugSecuritySSL
DebugSecuritySSLEaten
DebugSecurityService
DebugSecurityUserLockout
DebugSelfTuning
DebugServerLifeCycle
DebugServerMigration
DebugServerStartStatistics
DebugStoreAdmin
DebugStoreIOLogical
DebugStoreIOLogicalBoot
DebugStoreIOPhysical
DebugStoreIOPhysicalVerbose
DebugStoreXA
DebugStoreXAVerbose
DebugTunnelingConnection
DebugTunnelingConnectionTimeout
DebugURLResolution
DebugWANReplicationDetails
DebugWTCConfig
DebugWTCCorbaEx
DebugWTCGwtEx
DebugWTCJatmiEx
DebugWTCTDomPdu
DebugWTCUData
DebugWTCtBridgeEx
DebugWebAppIdentityAssertion
DebugWebAppModule
DebugWebAppSecurity
DebugWorkContext
DebugXMLEntityCacheIncludeClass
DebugXMLEntityCacheIncludeLocation
DebugXMLEntityCacheIncludeName
DebugXMLEntityCacheIncludeTime
DebugXMLEntityCacheUseShortClass
DebugXMLRegistryIncludeClass
DebugXMLRegistryIncludeLocation
DebugXMLRegistryIncludeName
DebugXMLRegistryIncludeTime
DebugXMLRegistryUseShortClass