Monthly Archives: January 2014

Do you forget your WebLogic Server password? No problem!

Do you forget your WebLogic Server password? No problem!

It is a frequently question that I receive from time to time: “I’ve lost my password, how can I change the AdminServer Password in WebLogic Server?”  In addition, normally administrators want to change the WLS password regularly, because security policy. I try to make it easy, but please try it first in a test environment! Make a Backup from your domain and do the following steps for WebLogic Server 11g and/or 12c:

1-       Check your Middleware-Home’s ($MW_HOME) and WLS-Domain-Home’s ($DOMAIN_HOME) paths. You can set up the environments under Linux with export command, e.g.:

$>export MW_HOME=/u01/app/oracle/middleware

$>export DOMAIN_HOME=$MW_HOME/user_projects/domains/MyDomain

2-      shut down the WebLogic domain, e.g. $DOMAIN_HOME/bin/stopWebLogic.sh

3-      Rename the data folder in $DOMAIN_HOME/servers/AdminServer/data

4-      set the environment variables with using, e.g.: $DOMAIN_HOME/bin/setDomainEnv.sh

### Now is the main command that you can change AdminServer’s password:

$> cd $DOMAIN_HOME/security

$> java weblogic.security.utils.AdminAccount <username> <NEWpassword> .

# Create and/or update “boot.properties” in “$DOMAIN_HOME/servers/AdminServer/security/ directory with your username and NEWpassword:

username=<username>

password=<NEWpassword>

# Start the WebLogic domain.

$ $DOMAIN_HOME/bin/startWebLogic.sh

Refernces:

PS4: Error for Updating OSB Domain after applying the latest Patch Set

Problem:

The customer does the following steps as PS4 Doc regarding “Updating OSB Domain after applying the latest Patch Set” (See 3.8.9.1 Updating an Oracle Service Bus Domain After Applying the Latest Patch Set in http://docs.oracle.com/cd/E21764_01/doc.1111/e16793/patch_set_installer.htm)

Perform the following steps for each domain to be upgraded:

1. Make sure you have backed up and shut down all domains to be upgraded.

2. Under each Oracle Service Bus 11gR1 domain to be upgraded, open a command window and run the DOMAIN/bin/setDomainEnv.cmd/sh command.

4. In the command window, switch to the directory in which the upgrade scripts resides: OSB_ORACLE_HOME/common/lib/upgrade

5. On the command line, runs the appropriate script for your operating system: Linux/Solaris: java weblogic.WLST ./domainUpgrade.py

java weblogic.WLST ./domainUpgrade.py

Initializing WebLogic Scripting Tool (WLST) …

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

 

AND he gets the following error:

Problem invoking WLST – Traceback (innermost last):

  File “/oracle/fmw/Oracle_OSB1/common/lib/upgrade/./domainUpgrade.py”, line 368, in ?

  File “/oracle/fmw/Oracle_OSB1/common/lib/upgrade/./domainUpgrade.py”, line 16, in replaceOSBServerModuleVersion

ValueError: substring not found in string.index

Solution:

This issue happens if the upgrade script has been run more than once and cannot find the proper substring in the configuration because it has already been changed.

„To resolve this issue first verify that the upgrade was not already run by examining the time-stamp of the DOMAIN_HOME/config/config.xml of the domain begin upgraded. If this file has recently changed then it is likely that the upgrade ran to completion. You can also look at the config.xml file and verify the version in the section:

<domain-version>10.3.4.0</domain-version>“

if you upgraded more than once, then you can solve the issue in two ways:

  1. Do not do anything and continue with the next steps of your upgrade, because script had already been run.
  2. (my suggestion) Please restore from backup and re-run your upgrade again, because you can be sure your upgrade is fully correct and you do not lost your time for problem analysis, if you find that there are other problems after the upgrade.    

Refernces:

The following note will help you: Running The Domainupgrade.Py Script Gives Error: “substring not found in string.index” (Doc ID 1313321.1)