Reset your Weblogic Admin console password in Weblogic server

Requirement – Reset your weblogic admin console password

Solutions –

You can reset your pwd from the command line using the following process

-> Set up the following environment variables. They are not necessary for the process itself, but will help you navigate. In this case my domain is called “ClassicDomain”. Remember to change the value to match your domain.

->Shut down the WebLogic admin server.

->$MW_HOME/user_projects/domains/base_domain/bin/ stopWebLogic.sh

->Rename the data folder.

$ mv $DOMAIN_HOME/servers/AdminServer/data $DOMAIN_HOME/servers/AdminServer/data-bakup

  • Set the environment variables.
    $  $DOMAIN_HOME/bin/setDomainEnv.sh
  • Reset the password using the following command. Remember to substitute the appropriate username and password.
    $ cd $DOMAIN_HOME/security
    $ java weblogic.security.utils.AdminAccount <username> <password> .
  • you can also get java no class def found error.then weblogic.jar is not set in the classpath.Try to set weblogic.jar in classpath

  • Update the “$DOMAIN_HOME/servers/AdminServer/security/boot.properties” file with the new username and password. The file format is shown below.
    username=<username>
    password=<password>
  • Start the WebLogic domain.
    $ $DOMAIN_HOME/bin/startWebLogic.sh

Happy Weblogic Learning with Vinay Kumar

Create & Delete managed server by wlst script in Weblogic

Requirement – How to create and delete managed server by wlst script in weblogic

Solutions
As we can use wlst recording feature to generate the script.I have modified a script a little bit

Following script to create a managed server with assigning port and machine.

MakeServer.py

name=sys.argv[1]
port=int(sys.argv[2])
machine=sys.argv[3]
connect('weblogic', 'welcome1', 't3://192.168.0.123:7001')
edit()
startEdit()
cd('/')
cmo.createServer(name)
cd('/Servers/' + name)
cmo.setListenAddress("")
cmo.setListenPort(port)
activate()
startEdit()
cmo.setListenPortEnabled(true)
cmo.setJavaCompiler('javac')
cmo.setClientCertProxyEnabled(false)
cmo.setMachine(getMBean('/Machines/' + machine))
cmo.setCluster(None)
cd('/Servers/' + name + '/SSL/' + name)
cmo.setEnabled(false)
cd('/Servers/NewManagedServer/DataSource/NewManagedServer')
cmo.setRmiJDBCSecurity(None)
activate()

->Open terminal and go to
$MWHOME/wlserver_10.3/server/bin
-> . ./setWLSEnv.sh

-> open new terminal
-> go to $MWHOME/user_project/domains/ucm_domains/bin
-> execute . ./setDomainEnv.sh

:-Note it is like dot space dot/setDomainEnv.sh

Call this script as

java weblogic.WLST /u01/app/oracle/Oracle/middleware/wlserver_10.3/server/bin/MakeServer.py "servername" "portNumber" "MachineName"

___________________________________________________________________________________________________________-

Following script to delete server

DeleteServer.py

name=sys.argv[1]
connect('weblogic', 'welcome1', 't3://192.168.0.123:7001')
edit()
startEdit()
cd('/')
cd('/Servers/' + name)
cmo.setCluster(None)
cmo.setMachine(None)
editService.getConfigurationManager().removeReferencesToBean(getMBean('/Servers/' + name))

cd('/')
cmo.destroyServer(getMBean('/Servers/' + name))

activate()

->Open terminal and go to
$MWHOME/wlserver_10.3/server/bin
-> . ./setWLSEnv.sh

-> open new terminal
-> go to $MWHOME/user_project/domains/ucm_domains/bin
-> execute . ./setDomainEnv.sh

:-Note it is like dot space dot/setDomainEnv.sh

Call this script as

java weblogic.WLST /u01/app/oracle/Oracle/middleware/wlserver_10.3/server/bin/DeleteServer.py "servername"

See the video here

happy learning Weblogic with Vinay kumar in techartifact…..

Configure Node Manager in Weblogic and administer Managed server

Requirement – How to configure node manager with weblogic and administer Managed server

Solutions- I have provided below steps to accomplish this task.

-> Should have an machine accroding to Os. Either unix machine or machine
-> Start startNodeManager.sh in $MW_HOME/server/bin
-> Check if nodeManager.properties files is there
-> If file is there then make StartScriptEnabled=true
-> Then go to $MW_HOME/wlserver_10.3/common/bin
-> then go with command – ./wlst.sh
-> then go with command – connect(‘weblogic’,’welcome1′,’t3://192.168.228.134:7001′)
-> then type command – nmEnroll(‘/u01/app/oracle/Oracle/middleware/user_projects/domains/ucm_domain’,’/u01/app/oracle/Oracle/middleware/wlserver_10.3/common/nodemanager’)
-> If you successfuly enrolled then go to admin console and start managed server.
-> Then be happy and smile…..

Now you can see this video as well.

Happy Learning Weblogic with Vinay Kumar in techartifact……