Weblogic Administration for Dummies
Learn Weblogic in 5 minutes
Weblogic administration tips and shortcuts
Disclaimer
- Thumb rule - Do it* at your own risk.
- *it = Any Changes/Steps/Activities/Commands/DIY/Tutorials/Hacks that are mentioned in this blog or blog entries.
- These steps/changes (it*) may not be supported by the respective products and/or companies, unless explicitly specified somewhere. Please check for yourself.
- All these are for personal use, (tinkering / hacks). I don't claim any of these failproof.
- Do take, backup of your systems i.e application, database, etc., before venturing into any changes.
- Stop systems before any changes
- Start systems after any changes
How to find the weblogic console url
- Go to weblogic installed directory
- Find setupinfo.txt
How to find t3 adminurl
- Login to web console a.k.a Admin Console
- Navigate to - AdminConsole->Server->Configuration->ListenPort
- Enable and note down the port for use
- The same info is available @ startscript.xml
How to find ports used by weblogic
- Find file oms/install/portlist.ini
- Find config.xml under your weblogic installation / server / domain folders
How to reset / change my weblogic console username , password
- Find security/boot.properties
- Stop WLS
- modify boot.properties with plain text values
- Start WLS
How to start stop (manage) admin , managed servers
- Go to ./gc_inst/user_projects/domains/YourDomain/bin
- Look at the list of files *.sh/.cmd/.bat (Executing these files with proper parameters will help you)
- startWebLogic.sh, , stopWebLogic.sh, wlscontrol.sh, startManagedWebLogic.sh, stopManagedWebLogic.sh, wlsifconfig.sh, setDomainEnv.sh,
- Explore the below director too
- ./wlserver_10.3/common/bin/
How to pass java arguments to weblogic, How to debug weblogic
- Find startup.properties for your domain/nodemanager
- Stop WLS, modify as below, Start WLS.
- Under "Arguments=", you can append JVM arguments
- For debugging on port 4410
- -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=4410
- For enabling ADF logs
- jbo.debugoutput=adflogger -Djbo.adflogger.level=FINE
- For enabling / disabling production mode
- weblogic.ProductionModeEnabled=true (or false)
How to use weblogic java commands via command line
- wlserver_10.3/server/bin/setWLSEnv.sh
- echo $PATH and $CLASSPATH
- If the above returns empty / blank, set them manually (as echoed by setWLSEnv.sh)
- Execute a sample command to check , if it works.,
- java weblogic.version
- java weblogic.Deployer
How to start WLST (Weblogic Scripting tool)
To get WLST prompt / shell, follow as mentioned below
- Execute java weblogic.WLST (refer above on how to set path, classpath for this execution) OR
- oracle_common/common/bin/wlst.sh or wlserver_10.3/common/bin/wlst.sh
- Issue the below command on wlst shell to go online from offline
- connect('weblogic','weblogicPassword','t3s://localhost:7102')
- If you have any trust key store issues, set the property (as below) and try again ...
- export WLST_PROPERTIES="-Dweblogic.security.TrustKeyStore=DemoTrust"
- export WLST_PROPERTIES="-Dweblogic.security.TrustKeyStore=DemoTrust"
List of important weblogic configuration files
Take backups, before you edit any of them !
- oms/install/setupinfo.txt
- oms/install/portlist.ini
- webloigc_folder/user_projects/domains/domainName/config/config.xml
- security/boot.properties
- adrs-instances.xml
- emoms.properties
- startscript.xml
- tokenValue.properties
- startup.properties
- osb*.url file (other .url files ?)
- *.prop file
- Files that you may need to look into - in case of startup issues.
- *.lok file
- *.bak file
- *.state file
- *.DAT file
How to set autodeploy for an javaEE applications (automatic deployment , refresh, update of javaEE applications)
Change weblogic from production to development mode .,to autodeploy/refresh javaEE archives.
- Find setDomainEnv.sh
- set PRODUCTION_MODE="false"
or
- Find config.xml
- Change <production-mode-enabled>false</production-mode-enabled>
After this.,
- Once you bounce the server, On development mode a new 'autodeploy' folder is created,
- Check and find YourDomain\autodeploy
- copy your applications (folder - exploded war or archive - war/ear), under autodeploy folder
- staging-mode in config.xml should be 'stage' for autodeployment, weblogic should automatically take care of this.
- From now on, without bouncing - you get to deploy applications ! - just by copying your files.
How to clear cache
- Go to
- cd gc_inst/user_projects/domains/YourDomainName/servers/serverName/tmp
- Remove
- rm -rf gc_inst/user_projects/domains/YourDomainName/servers/serverName/tmp/*
- Other than tmp, you can also remove - cache and logs folder
How to create a domain?
After installation of weblogic ., go to weblogic_home/common/bin (i.e like /Oracle/Middleware/wlserver_12.1/common/bin) and start config.sh. If you have set the display (in linux) - it would have started in gui mode. Now you can create a domain and with it -it will create all the necessary scripts to start /stop etc.,