Friday, August 26, 2016

Automatic JVM Upgarde in WebLogic 12.2.1.0.0 Without Disturbing End Users

Environment Details:
=================




1) Current JVM Version is  "1.8.0_65" and Planning to Upgrade it to "1.8.0_92"




2) Lets Place JVM Binaries "1.8.0_92" in Parallel With Old JVM on All Nodes.








3) Connect to AdminServer Using WLST

connect('weblogic','welcome1','t3://192.168.142.131:7001')



4) Execute Below WLST command for Upgrading JVM


progress=rolloutJavaHome('prod_domain','/oracle/jvm/jdk1.8.0_92')
progress.getStatus()

Note: Remember While Upgrading AdminServer Node Admin Console Will Not Be Available.After Upgrading JVM on Admin Node you will be able to access Admin Console(Everything Is Automatic Process)




5)  AdminServer node JVM is Upgraded to  "1.8.0_92" And Started Upgrading Managed Server ms2.





6) Managed Server ms2 Node JVM Upgraded to "1.8.0_92" And Started Upgrading Managed Server ms1.




7) JVM Up gradation Completed On All Nodes.


Wednesday, August 24, 2016

Perform SSH Login Without Password Using ssh-keygen & ssh-copy-id

Step 1: Create public and private keys using ssh-key-gen on host jagan.abs.com


[oracle@jagan ~]$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_rsa):Enter
Created directory '/home/oracle/.ssh'.
Enter passphrase (empty for no passphrase):Enter
Enter same passphrase again:Enter
Your identification has been saved in /home/oracle/.ssh/id_rsa.
Your public key has been saved in /home/oracle/.ssh/id_rsa.pub.
The key fingerprint is:
c9:31:0c:a6:b6:fc:ad:f7:bf:fa:a1:c5:b1:e5:24:11 oracle@jagan.abs.com
[oracle@jagan ~]$


Step 2: Copy the public key to sahiti.abs.com using ssh-copy-id


[oracle@jagan ~]$ ssh-copy-id -i ~/.ssh/id_rsa.pub sahiti.abs.com
28
The authenticity of host 'sahiti.abs.com (192.168.142.130)' can't be established.
RSA key fingerprint is d7:73:15:b9:17:e3:9b:2d:19:b8:13:9e:e8:a5:cd:ef.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'sahiti.abs.com,192.168.142.130' (RSA) to the list of known hosts.
oracle@sahiti.abs.com's password:Enter password
Now try logging into the machine, with "ssh 'sahiti.abs.com'", and check in:

  .ssh/authorized_keys

to make sure we haven't added extra keys that you weren't expecting.

[oracle@jagan ~]$

Step 3: Login to sahiti.abs.com without entering the password

[oracle@jagan ~]$ ssh sahiti.abs.com
[oracle@sahiti ~]$



Completed...............

Tuesday, August 23, 2016

CFGFWK-60550: Encountered error: "Attribute "Password" is not set for user "weblogic"" during UNPACK in WebLogic 12.2.1.1.0


1) Pack the Domain prod_domain using below command


./pack.sh -domain=/oracle/Middleware/user_projects/domains/prod_domain -template=wls_template12211.jar -template_name="wls_template12211"




2) Now Create Another Domain Called test_domain Using Above Template wls_template12211.jar

 ./unpack.sh -domain=/oracle/Middleware/user_projects/domains/test_domain -template=/oracle/Middleware/oracle_common/common/bin/wls_template12211.jar -log_priority=ALL -log=test.log





Error From Log File test.log
=========================
2016-08-24 06:02:36,974 SEVERE [9] com.oracle.cie.wizard.internal.engine.WizardControllerEngine - Wizard error cause
com.oracle.cie.wizard.tasks.TaskExecutionException: CFGFWK-60550: Script execution aborted.
CFGFWK-60550: Encountered error: "Attribute "Password" is not set for user "weblogic"". Error is logged to "null".
CFGFWK-60550: See log for details.
        at com.oracle.cie.wizard.domain.silent.tasks.RunScriptTask.runScriptWithExecutor(RunScriptTask.java:645)
        at com.oracle.cie.wizard.domain.silent.tasks.RunScriptTask.execute(RunScriptTask.java:363)
        at com.oracle.cie.wizard.internal.cont.SilentTaskContainer$TaskRunner.run(SilentTaskContainer.java:97)
        at java.lang.Thread.run(Thread.java:745)
Caused by: com.oracle.cie.domain.script.ScriptException: Attribute "Password" is not set for user "weblogic"
        at com.oracle.cie.domain.script.ScriptExecutor.checkSecurityInfo(ScriptExecutor.java:5590)
        at com.oracle.cie.domain.script.ScriptExecutor.writeDomain(ScriptExecutor.java:1752)
        at com.oracle.cie.domain.script.ScriptParserClassic$StateMachine.processWrite(ScriptParserClassic.java:573)
        at com.oracle.cie.domain.script.ScriptParserClassic$StateMachine.execute(ScriptParserClassic.java:429)
        at com.oracle.cie.domain.script.ScriptParserClassic.parseAndRun(ScriptParserClassic.java:148)
        at com.oracle.cie.domain.script.ScriptParserClassic.doExecute(ScriptParserClassic.java:110)
        at com.oracle.cie.domain.script.ScriptParser.execute(ScriptParser.java:72)
        at com.oracle.cie.domain.script.ScriptParser.execute(ScriptParser.java:35)
        at com.oracle.cie.wizard.domain.helpers.Executor.runSilentScript(Executor.java:66)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.oracle.cie.wizard.domain.silent.tasks.RunScriptTask.runScriptWithExecutor(RunScriptTask.java:575)



Solution 1) To Fix The Above Issue We Have To Pass Command Line Argument -user_name And -password To unpack.sh

./unpack.sh -domain=/oracle/Middleware/user_projects/domains/test_domain -template=/oracle/Middleware/oracle_common/common/bin/wls_template12211.jar -user_name=weblogic -password=xxxxxxx -log_priority=ALL -log=test.log


Solution 2) In This Case We Have To Create Wallet Using configWallet.sh And Pass The Same thing While Unpacking.


Create Wallet Using Below Command


./configWallet.sh -walletDir /oracle/wls1221/oracle_common/common/bin -create admin_name weblogic

Now Unpack, It Will Work.....


./unpack.sh -domain=/oracle/Middleware/user_projects/domains/test_domain -template=/oracle/Middleware/oracle_common/common/bin/wls_template12211.jar -walletDir /oracle/wls1221/oracle_common/common/bin -log_priority=ALL -log=test.log





Reference Document:

http://docs.oracle.com/middleware/12211/lcm/WLDPU/GUID-3C80A78F-891C-4767-B727-1E9372B125DF.htm#WLDPU143

COMPLETED................

Friday, August 19, 2016

How To Install Oracle WebLogic Server 12.2.1.1.0 Using Silent Mode ?

Summary 

     1) Create OS User and Group
     2) Create Required Directories
     3) Assign The Ownership and Permission To Directories
     4) Install the JDK and Export The JAVA_HOME in .bash_profile
     5) Prepare The Response file.
     6) Create The File oraInst.loc And add inventory_loc and inst_group
     7) Start The WebLogic Server Binaries Installation Using Silent Mode
     8) Create WebLogic Domain Using WLST.


1. Create OS User and Group

       groupadd -g 54321 oinstall
       useradd -u 54322 -g oinstall oracle
       passwd oracle













2. Create Required Directories 

       mkdir -p /oracle/Middleware
       mkdir -p /jdk/jvm


3. Assign The Ownership and Permission To Directories 

     chown -R oracle:oinstall /oracle
     chown -R oracle:oinstall /jdk
     chmod 775 /oracle
     chmod 775 /jdk






4. Install the JDK and Export The JAVA_HOME in .bash_profile

      su - oracle
      tar -zxvf jdk-8u92-linux-x64.tar.gz


export JAVA_HOME=/jdk/jvm/jdk1.8.0_92
export PATH=$JAVA_HOME/bin:$PATH


5. Prepare The Response file.

Create response file with below content (Note: change the ORACLE_HOME as per your environment need)


-----------------------------------------------------------------------------------------------------------
[ENGINE]

#DO NOT CHANGE THIS.
Response File Version=1.0.0.0.0

[GENERIC]

#Set this to true if you wish to skip software updates
DECLINE_AUTO_UPDATES=true

#My Oracle Support User Name
MOS_USERNAME=

#My Oracle Support Password
MOS_PASSWORD=<SECURE VALUE>

#If the Software updates are already downloaded and available on your local system, then specify the path to the directory where these patches are available and set SPECIFY_DOWNLOAD_LOCATION to true
AUTO_UPDATES_LOCATION=

#Proxy Server Name to connect to My Oracle Support
SOFTWARE_UPDATES_PROXY_SERVER=

#Proxy Server Port
SOFTWARE_UPDATES_PROXY_PORT=

#Proxy Server Username
SOFTWARE_UPDATES_PROXY_USER=

#Proxy Server Password
SOFTWARE_UPDATES_PROXY_PASSWORD=<SECURE VALUE>

#The oracle home location. This can be an existing Oracle Home or a new Oracle Home
ORACLE_HOME=/oracle/Middleware

#Set this variable value to the Installation Type selected. e.g. WebLogic Server, Coherence, Complete with Examples.
INSTALL_TYPE=Complete with Examples

#Provide the My Oracle Support Username. If you wish to ignore Oracle Configuration Manager configuration provide empty string for user name.
MYORACLESUPPORT_USERNAME=

#Provide the My Oracle Support Password
MYORACLESUPPORT_PASSWORD=<SECURE VALUE>

#Set this to true if you wish to decline the security updates. Setting this to true and providing empty string for My Oracle Support username will ignore the Oracle Configuration Manager configuration
DECLINE_SECURITY_UPDATES=true

#Set this to true if My Oracle Support Password is specified
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false

#Provide the Proxy Host
PROXY_HOST=

#Provide the Proxy Port
PROXY_PORT=

#Provide the Proxy Username
PROXY_USER=

#Provide the Proxy Password
PROXY_PWD=<SECURE VALUE>

#Type String (URL format) Indicates the OCM Repeater URL which should be of the format [scheme[Http/Https]]://[repeater host]:[repeater port]
COLLECTOR_SUPPORTHUB_URL=

---------------------------------------------------------------------------------------------------------------


6. Create The File oraInst.loc And add inventory_loc and inst_group


Create The File /etc/oraInst.loc using root user And The Below Content Into It.

inventory_loc=/home/oracle
inst_group=oinstall 



7. Start The WebLogic Server Binaries Installation Using Silent Mode

Use below command for installing weblogic binaries in silent mode

 java -jar fmw_12.2.1.1.0_wls.jar -silent -responseFile /oracle/setup/wls12211.rsp -invPtrLoc /etc/oraInst.loc -force



8. Create WebLogic Domain Using WLST.

       a) Create the python script wls_prod_domain with below content

----------------------------------------------------------------------------------------------------------
# Select the template to use for creating the domain

selectTemplate('Basic WebLogic Server Domain','12.2.1.1')
loadTemplates()

# Set the listen address and listen port for the Administration Server

cd('/Servers/AdminServer')
set('ListenAddress','192.168.142.128')
set('ListenPort',7001)

#Enable SSL on the Administration Server and set the SSL listen address and Port

create('AdminServer','SSL')
cd('SSL/AdminServer')
set('Enabled','false')
set('ListenPort', 7002)

# Set the domain password for the WebLogic Server administration user

cd('/')
cd('Security/base_domain/User/weblogic')
cmo.setPassword('welcome1')

# If the domain already exists, overwrite the domain

setOption('OverwriteDomain','true')

# write the domain and close the template

writeDomain('/oracle/Middleware/user_projects/domains/prod_domain')
closeTemplate()
exit()

---------------------------------------------------------------------------------------------------------------


   b) Execute below WLST command for creating prod_domain.

         java weblogic.WLST wls_prod_domain.py



    c) Start the weblogic server using below command 

          cd /oracle/Middleware/user_projects/domains/prod_domain/bin
          nohup ./startWebLogic.sh &


    d) Access The weblogic console using below URL