Tuesday, July 23, 2019

Troubleshooting with unpack command in WebLogic Infrastructure 12.2.1.3.0

WebLogic traditional method for extending the configured domain in the remote machine for managed servers is using pack and unpack methods. It was discussed earlier in the Middleware Admin page and also in the blog post in the Weblogic 12c Essentials blog.



Unpack.sh command ERRORS in WebLogic 12.2.1.3
=======================================

Issue #1: password option is depricated instead of it use walletDir option.



[wladmin@myremote.localdomain /u01/app/middle12213/oracle_common/common/bin]$ ./unpack.sh -user_name="weblogic" -password="welcome1" -template="/u01/software/best_domain.jar" -domain=/u01/domains/best_domain
Warning: Option "-password" is deprecated. Use "-walletDir" to specify wallet where pw is stored.
<< read template from "/u01/software/best_domain.jar"
>>  succeed: read template from "/u01/software/best_domain.jar"
<< find Security "best_domain" as obj0
<< find Security "best_domain" as obj1
<< find Security "best_domain" as obj2
<< find Security!User "best_domain!weblogic" as obj3
>>  succeed: find Security!User "best_domain!weblogic" as obj3
<< find User "weblogic" as obj4
>>  succeed: find User "weblogic" as obj4

I've created a wallet file and entered the password value inside the file. But it is failed again with the following

Issue #2: loadWallet from wallet file



[wladmin@myremote.localdomain /u01/app/middle12213/oracle_common/common/bin]$ ./unpack.sh -user_name="weblogic" -walletDir="/u01/wladmin/.config/wallet" -template="/u01/software/best_domain.jar" -domain=/u01/domains/best_domain -log="unpack.log"
Jul 22, 2019 10:54:30 PM com.oracle.cie.wallet.impl.WalletHandlerImpl loadWallet
SEVERE: Wallet directory is invalid: /u01/wladmin/.config/wallet
Error:  wallet does not exist or is invalid.

You need to create wallet file using configWallet.sh script from $WL_HOME/../oracle_common/common/bin

  ./configWallet.sh -walletDir /u01/wladmin/wallet -create admin_name weblogic

[wladmin@myremote.localdomain /u01/app/middle12213/oracle_common/common/bin]$ ./configWallet.sh -walletDir /u01/wladmin/wallet -create admin_name weblogic
admin_name: [weblogic]
Confirm admin_name: [weblogic]
weblogic: [password]
Confirm weblogic: [password]

Note: all the [] values you need to replace accordingly.

Enter the username and the password appropriately.

Issue #3 : Missing app directory



When the unpack.sh script was  executed, new it is complaining about the 'app' directory missing.

[wladmin@myremote.localdomain /u01/app/middle12213/oracle_common/common/bin]$ ./unpack.sh -user_name="weblogic" -walletDir="/u01/wladmin/wallet" -template="/u01/software/best_domain.jar" -domain=/u01/domains/best_domain -log="unpack.log"
<< read template from "/u01/software/best_domain.jar"
>>  succeed: read template from "/u01/software/best_domain.jar"
<< find Security "best_domain" as obj0
<< find Security "best_domain" as obj1
<< find Security "best_domain" as obj2
<< find Security!User "best_domain!weblogic" as obj3
>>  succeed: find Security!User "best_domain!weblogic" as obj3
<< find User "weblogic" as obj4
>>  succeed: find User "weblogic" as obj4
<< set obj4 attribute Password to "********"
>>  succeed: set obj4 attribute Password to "********"
<< set obj4 attribute IsDefaultAdmin to "true"
>>  succeed: set obj4 attribute IsDefaultAdmin to "true"
>>  validateConfig "KeyStorePasswords"
>>  succeed: validateConfig "KeyStorePasswords"
<< write Domain to "/u01/domains/best_domain"
>>  fail: write Domain to "/u01/domains/best_domain"
>>  60304: Applications directory is not empty.
60304: The applications directory "/u01/app/middle12213/user_projects/applications/best_domain" that you specified contains files. Applications may only be written to an empty directory.
60304: Pick a different directory.
com.oracle.cie.domain.script.ScriptException: 60304: Applications directory is not empty.
60304: The applications directory "/u01/app/middle12213/user_projects/applications/best_domain" that you specified contains files. Applications may only be written to an empty directory.
60304: Pick a different directory.

Solution: Created a new apps folder and tell the unpack.sh script that we have new 'apps' folder, in my example created this folder in the $DOMAIN_HOME.

 mkdir -p /u01/domains/apps
./unpack.sh -user_name="/u01/software/best_domain.jar" -domain=/u01/domains/best_domain -log="unpack.log" app_dir="/u01/domains/apps
/u01/domains/best_domain
<< read template from "/u01/software/best_domain.jar"
>>  succeed: read template from "/u01/software/best_domain.jar"
<< set config option AppDir to "/u01/domains/apps"
>>  succeed: set config option AppDir to "/u01/domains/apps"
<< find Security "best_domain" as obj0
<< find Security "best_domain" as obj1
<< find Security "best_domain" as obj2
<< find Security!User "best_domain!weblogic" as obj3
>>  succeed: find Security!User "best_domain!weblogic" as obj3
<< find User "weblogic" as obj4
>>  succeed: find User "weblogic" as obj4
<< set obj4 attribute Password to "********"
>>  succeed: set obj4 attribute Password to "********"
<< set obj4 attribute IsDefaultAdmin to "true"
>>  succeed: set obj4 attribute IsDefaultAdmin to "true"
>>  validateConfig "KeyStorePasswords"
>>  succeed: validateConfig "KeyStorePasswords"
<< write Domain to "/u01/domains/best_domain"
...............................................................................................
>>  succeed: write Domain to "/u01/domains/best_domain"
<< close template
>>  succeed: close template
[wladmin@myremote.localdomain /u01/app/middle12213/oracle_common/common/bin]$

============================================================
SUCCESSFULLY CREATED REMOTE DOMAIN FOR MANAGED SERVERS
============================================================

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.