Wednesday, May 25, 2011

change java version / JDK of a weblogic domain

1> Take a backup and edit <DOMAIN_HOME>\bin\setDomainEnv.sh /.cmd

after the lines:
set WL_HOME=D:\work\wls\wlserver_10.3
for %%i in ("%WL_HOME%") do set WL_HOME=%%~fsi

set BEA_JAVA_HOME=D:\work\wls\jrockit_160_17_R28.0.0-679

set SUN_JAVA_HOME=D:\work\wls\jdk160_18

add the line
set JAVA_VENDOR=Oracle     for jrockit
set JAVA_VENDOR=Sun        for sun jdk

so the setDomainEnv.sh or setDomainEnv.cmd will look like below for jrockit

set WL_HOME=D:\work\wls\wlserver_10.3
for %%i in ("%WL_HOME%") do set WL_HOME=%%~fsi

set BEA_JAVA_HOME=D:\work\wls\jrockit_160_17_R28.0.0-679

set SUN_JAVA_HOME=D:\work\wls\jdk160_18

set JAVA_VENDOR=Oracle

if "%JAVA_VENDOR%"=="Oracle" (


However if you have JVM tuning parameters set in your startup scripts, you would have to set the corresponding jvm parameters of the new java.
so in that case its best create a new domain with above changes, else you can do the changes in current domain.

2> else look for the below lines in setdomainenv.sh

# We need to reset the value of JAVA_HOME to get it shortened AND
# we can not shorten it above because immediate variable expansion will blank it

under the above lines add the new jdk path and vendor so the result would be like

# We need to reset the value of JAVA_HOME to get it shortened AND
# we can not shorten it above because immediate variable expansion will blank it
JAVA_HOME="/u01/CR-root/Oracle/Middleware/combinedjdk/jdk1.6.0_37"
JAVA_VENDOR="Sun"
export JAVA_HOME
export JAVA_VENDOR

save it in vi mode as esc:wq

ref : Doc ID 1058804.1

Wednesday, May 11, 2011

Weblogic server takes long to start

Only on server present in the domain and it took more then 45mins to come up.

Have deleted the cache present in tmp, cache & stage folders within user_projects\domains\<DOMAIN>\servers\<myserver> after stopping the server.
Also 2GB diagnostics file under /user_projects/domains/DOMAIN_NAME/servers/SERVER_NAME/data/store/diagnostics.
The server is now fine.

Thursday, April 28, 2011

weblogic installation fail

Error message: A fatal error has occurred. This application will terminate.


User had downloaded a generic versoin of weblogic (64bit) which came as *.zip and had unzipped the file in linux to find a installer.jar file which she ran and received the error.

The generic file must be run the way it is ignoring the *.zip extension.
for 64 bit jvm ex: java -d64 -jar *generic.zip
for 32 bit jvm ex: java -jar *generic.zip
Provide full permissions to the file (chmod -r 777 *.zip)

Linux flavour template
$ java -d64 -Djava.io.tmpdir=<your temp dir> -jar wls1033_generic.jar -log=/tmp/wls.log

Windows template
d:\java -d64 -jar wls1034_generic.jar -Djava.io.tmpdir=<your temp dir>


If you are unable to set the java try below:
/home/misc/jdk1.6.0_25/bin/java -jar wls1034_generic.jar -mode=console

Friday, April 22, 2011

weblogic nodemanager password change methods

I
Edit WLS config.xml and edit thelines:
<node-manager-username>weblogic</node-manager-username>
<node-manager-password-encrypted>{AES}WIoQZoc+EIlXEHfqVnNq68K9LGvtO90SsjRg62Z1LI0=</node-manager-password-encrypted>

II
Go to directory: domain_directory/config/nodemanager
Take a backupof file: nm_password.properties
Find an entry hashed=uFiKcLvYU3x9r11u8tjZlRvwBr4\= and remove it
add credentials in simple text:
password=
username=

III
Log in to Admin Console and go to: DomainName -> Security tab-> General tab -> Advanced Options. Then change the property Credentials with the new password.

IV
Also, in order to verify your changes you can connect to your Node Manager using the new credentials:
1 $ cd */oracle_common/common/bin
2 $ wlst.sh
3 wls:/offline> nmConnect(domainName='robin_domain', username='User123', password='password123')
4 Connecting to Node Manager ...
5 Successfully Connected to Node Manager.
6 wls:/nm/test_domain> nmDisconnect()
7 Successfully disconnected from Node Manager.
8 wls:/offline> exit()

AuthenticationEnabled to “false” in the nodemanager.properties file to ignore what we are passing as part of user and password while connecting to the node manager. 

managed server not starting via nodemanager: ensure that the admin's ldap is copied over managed server's ldap. 

Thursday, April 21, 2011

11g OMS & Repository in unknow status after WLS silent install

Error message:
Caused by: java.lang.NoClassDefFoundError:
HTTPClient/https/Handler
at oracle.sysman.util.jdk.URLUtil.getURL(URLUtil.java:232)
at oracle.sysman.emSDK.sec.auth.EMLoginServlet.authenticateUser(EMLoginServlet.java:273)
at oracle.sysman.emSDK.sec.auth.EMLoginServlet.doPost(EMLoginServlet.java:542)

Above error messages were thrown after grid control installation was done over WLS silent installation,

1. Stop the OMS.
2. Copy the $OMS_HOME/oui/jlib/http_client.jar to the */user_projects/domains/GCDomain/lib directory
3. Start the OMS
4. Access the console page.

Monday, April 4, 2011

Admin server not coming up

LDAP corruption: 
Admin server was not coming up and was terminating at acquiring license part in admin server log.

Renamed admin server folder and started the admin service, it came up but the user was unable to login.
So i restored ldapfiles folder from (user_projects\domains\base_domain\servers\AdminServer\data\ldap\backup) to  (user_projects\domains\base_domain\servers\AdminServer\data\ldap) and restarted and issue fixed.

Friday, April 1, 2011

Using virtual directory mapping in production mode

Its a facility in which you can place all your JPEG or video files in one location and many deployables can access it from that common location.
i implemented <virtual-directory-mapping> in my deployment and placed a text file in the virtual directory and am able to access the text file via a browser after deployment.
However whenever i make random changes to the text file, the changed values are not reflected in the browser page dynamically/immediately.
However when i tried this on my development domain it worked for me.I was able to see the changed values instantly after updating the text file. I changed the development domain to production mode and it still worked for me.
Later when I created a new domain in Production mode I was not able see the changes anymore.

Weblogic.xml (dev)
````````````````````````
<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/weblogic-web-app">
<context-root>/cplus</context-root>
                <virtual-directory-mapping>
                                <local-path>C:\temp\docroot</local-path>
                                <url-pattern>*.txt</url-pattern>
                </virtual-directory-mapping>
</weblogic-web-app>

I did the following change to weblogic.xml and it works in prod mode aswell.

Weblogic.xml (Prod)
'''''''''''''''''''''''''''''''''''
<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/weblogic-web-app">
<context-root>/cplus</context-root>
<jsp-descriptor>
    <page-check-seconds>1</page-check-seconds>
    <verbose>true</verbose>
  </jsp-descriptor>
    <virtual-directory-mapping>
        <local-path>C:\temp\docroot</local-path>
        <url-pattern>*.txt</url-pattern>
    </virtual-directory-mapping>
</weblogic-web-app>

ref: http://download.oracle.com/docs/cd/E17904_01/web.1111/e13712/weblogic_xml.htm#i1075630

Thursday, March 17, 2011

Managed server crashed due to oversized LDAP

weblogic server crashed and heap analysis shows ( as done from MAT tool) maximum memory was utilized by "com.bea.security.providers.xacml.store.ldap.LDAPAuthorizationPolicyStore" which is related to DB authentication.

In the directory ./servers/<server>/data/ldap/ldapfiles contains a very large data file.
618MB    EmbeddedLDAP.data

took a backup of the ldap directory of the affected server. (./servers/<server>/data/ldap) and place it outside the domain.
stop the affected server, remove the ldap directory and start the server again. The server will pick up required ldap files from the admin server.


Any changes done on the LDAP side will result in size increase,

we can try setting a parameter which will limit the size of the EmbeddedLDAP.data file.
stop the domain
take a backup of setDomainEnv.sh
edit setDomainEnv.sh and place
-Dweblogic.security.ldap.maxSize=mysize -Dmysize=100000000
after JAVA_OPTIONS= (usually found in the end of the file)
it will look like
set JAVA_OPTIONS=-Dweblogic.security.ldap.maxSize=mysize -Dmysize=100000000 %JAVA_OPTIONS%
we are trying to set size of EmbeddedLDAP.data as 100mb
save and restart domain

https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&doctype=REFERENCE&id=972082.1

Friday, March 11, 2011

Member with Operator/deployer role cannot stop Managed Server, its a OSB setup on a weblogic domain.


The  OSB internal artifacts (for ex. data sources used by OSB) are protected by a role called "ALSBSystem". The users who belong to group "ALSBSystemGroup" have access to these artifacts.

Since operator group is a WLS group, it is not able to provide required access on ALSB resources. To use any user in "operator" role to shutdown an OSB domain,
please add this user to ALSBSystemGroup as well using WLS admin console under :
Security Realms >my realm >Users and Groups
Once added to this group you may be able to cleanly shutdown the server with this user.

Out of swap space?


Getting "java.lang.OutOfMemoryError" and the Weblogic Server gets shutdown unexpectedly 
java.lang.OutOfMemoryError: requested 97 bytes for char in /BUILD_AREA/jdk6_05/hotspot/src/share/vm/runtime/sharedRuntime.cpp. Out of swap space?


Machine is highly burdened with other applications and sessions already running.
Disable or stop all the unnecessary services in the machine.
Allocate more disk memory to virtual memory and stop other applications which run simultaneously.
decrease your usage of memory by reducing the value of the -Xmx & -Xms flag

ex:  -Xms256m -Xmx256m -XX:PermSize=256m -XX:MaxPermSize=512m 

Thursday, March 10, 2011

transaction roll back & jvm's being thrown out of cluster

managed servers are getting thrown out of cluster

recieved the below error messages

<BEA-010026> <Exception occurred during commit of transaction
Caused by: weblogic.transaction.internal.TimedOutException: Transaction has timed out when making request to XAResource


<BEA-000144> <Managed server WLS1D has been suspended or shutdown.>
<BEA-000115> <Lost 2 multicast message(s).>
<BEA-000111> <Adding WLS1D with ID 5716223036452484921S:WLS1:[8371,8371,-1,-1,-1,-1,-1]:CMS:WLS1D to cluster: cmsCluster view.>
<BEA-000128> <Updating 5716223036452484921S:WLS1:[8371,8371,-1,-1,-1,-1,-1]:CMS:WLS1D in the cluster.>
<BEA-000112> <Removing WLS1C jvmid:-943465781735899304S:WLS1:[8271,8271,-1,-1,-1,-1,-1]:CMS:WLS1C from cluster view due to timeout.>



I see that many transactions are being rolled back and those exceptions are causing the memory to get filled frequently, and so the garbage collection takes time causing the multicast messages to miss.
change the value of your JTA in config.xml and restart to check if we still get the same problems.

stop the domain
take backup of config.xml
change  <jta>
<timeout-seconds>90</timeout-seconds>
<security-interop-mode>default</security-interop-mode>
</jta>

from 90 to 600 and start the servers.
Fixed

Tuesday, February 15, 2011

Vulnerability

Critical Patch Update Availability for WebLogic Server Plug-ins
https://support.oracle.com/CSP/main/article?cmd=show&amp;type=NOT&amp;doctype=REFERENCE&amp;id=1263333.1

The Web Server plug-ins built at change number CL1338089

Supported config:
The WebLogic webserver plugins are common to all versions of WebLogic servers.

Upgrade instructions:
Save a back-up copy of your existing plug-in module.
replace the plug-in module with the one found in this zip-file
restart your web server.

SSL Server Allows Anonymous Authentication Vulnerability

if ssl has been set
apply below flags in startup script.
-Dweblogic.security.SSL.protocolVersion=SSL3
-Dweblogic.security.disableNullCipher=true
-Dweblogic.security.SSL.allowUnencryptedNullCipher=false

ex:
set JAVA_OPTIONS=%SAVE_JAVA_OPTIONS% -Dweblogic.security.SSL.protocolVersion=SSL3 -Dweblogic.security.disableNullCipher=true
or
ex:
SAVE_JAVA_OPTIONS="${JAVA_OPTIONS} -Dweblogic.security.SSL.protocolVersion=SSL3 -Dweblogic.security.disableNullCipher=true"

SSL Server Has SSLv2 Enabled Vulnerability

please shut down your servers and take a backup of config.xml
edit config.xml and add the below lines

in between <name>AdminServer</name> and <listen-address></listen-address> add

<ssl>
<enabled>true</enabled>
<ciphersuite>TLS_RSA_WITH_RC4_128_SHA</ciphersuite>
<ciphersuite>TLS_RSA_WITH_RC4_128_MD5</ciphersuite>
<ciphersuite>TLS_RSA_WITH_DES_CBC_SHA</ciphersuite>
</ssl>

and restart your server.
then check sslv2 using the command utility 
s_client -connect ip:port -ssl2

Doc ID 1312916.1

To enable High ciphers (note id 1067411.1) in nodemanager add the flag -Dweblogic.security.SSL.Ciphersuites=TLS_RSA_WITH_RC4_128_SHA,TLS_RSA_WITH_RC4_128_MD5
in your startnodemanger.sh file
or
add it in the nodemanager.properties file.
CipherSuite=TLS_RSA_WITH_RC4_128_SHA,TLS_RSA_WITH_RC4_128_MD5
if nodemanager is being started by wlst and not by startnodemanager.sh

To enable SSLV3 in nodemanager if startnodemanger.sh is not being used
SSLArguments= -Dweblogic.security.SSL.protocolVersion=SSL3 in startup.properties under user_projects\domains\<base_domain>\servers\<new_managedServer>\data\nodemanager

To deactivate SSLV2
 It's not possible to deactivate just SSL2 on Weblogic Server 10.3.x, to leave both SSL3 and TLS1 working at the same time.

The only options are:

- Use exclusively SSL3
- Use exclusively TLS1
- Use the default value which is all.

So for disabling SSLv2, you can additionally add the flag
-Dweblogic.security.SSL.protocolVersion=SSL3         - Only SSL V3.0 messages are sent and accepted.
-Dweblogic.security.SSL.protocolVersion=TLS1         - Only TLS V1.0 messages are sent and accepted.
-Dweblogic.security.SSL.protocolVersion=ALL          - This is the default behavior.

List of supported suites.
http://docs.oracle.com/cd/E17904_01/web.1111/e13707/ssl.htm#BABBDACC

Sunday, February 13, 2011

Disable sun one webserver from displaying server information within response header

Start Web Server 7 Administration Server
Run the below command line
wadm set-http-prop --user=admin --config= server-header=""
wadm deploy-config --user=admin

which does nothing but adding the ServerString none value in magnus.conf file,
you may also change it to ServerString apache where apache is your custom or misleading info.
below is an example.

magnus.conf file
#
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#

ServerString none

Init fn="load-modules" shlib="lib*****lugin.so"
Init fn="load-modules" funcs="wl_proxy,wl_init" shlib="/opt/s***em/web***gin/lib/lib***xy.so"
Init fn="wl_init"

Wednesday, February 2, 2011

CR295275

CR295275 is associated with Bug 8094100
Description : INVESTIGATE/REMOVE CHECK THAT PREVENTS INTEROP BETWEEN >2 MAJOR VERSIONS
It has been Fixed in Product Version 10.0

You would be only needing the fix if you need interoperability between
WLS 7.0 and WLS 10.0
However the patch is only available for WLS 7.0 SP4, SP6 & SP7
Oracle support for WLS7.x is being terminated from 31st march 2011.

Monday, January 17, 2011

weblogic.management.DeploymentException: Error: Unresolved Webapp Library references for ServletContext

Problem in starting the EMConsole on Weblogic Server 10.3.3
Error in starting the Deployment comonent EM in WLS 10.3.3 Console
-----------------------------------------------------------------------------------------------
@437235777[app:em module:/em path:/em spec-version:2.5]", defined in weblogic.xml
[Extension-Name: jstl, Specification-Version: 1.2, Implementation-Version: 1.2.0.1, exact-match: false],
[Extension-Name: jstl, Specification-Version: 1.2, exact-match: false]
Errors were encountered while performing this operation.
----------------------------------------------------------------------------------------------

************************************************************************************
the applications EAR had an empty lib folder, when i looked in the console to check if any jstl modules were deployed as library, i found that it was not activated.
i had the module activated and redeployed the application and it worked.
************************************************************************************
ref:
http://download.oracle.com/docs/cd/E12840_01/wls/docs103/webapp/configurejsfandjtsl.html#wp162992

Wednesday, December 15, 2010

Scuba diving @ murdeshwar

we boarded a sea bird travels -isuzu bus from bangalore, However i recommend booking a KSRTC - volvo, since Seabird has a reputation of bad service, rash drivers and uncomfortable seats also an 8 hours journey usually takes 10 hours as they made last minute changes and we took a detour to the surrounding places.
murdeshwar happens to be the last stop and we decided to stay at Naveen beach resort,
I highly recommend this place as the rates are fairly good, 2+1 AC room is 2300 a day
also its right in front of the beach and the in-house restaurant is simply amazing.
murdeshwar beach is very pristine and totally unexploited. You also have speed boats, water scooter and other rides available, You can always talk to one of the fishing boats usually anchored on the other side of temple and take deep sea tour would cost you close to 2500 (make sure you carry a copy of your pan card).
The sea food is not only available in abundance but also cheaper than Bangalore.

We had opted for a discover scuba diving course with dreamz diving (5000 INR per person including pics)
trust me its worth every penny. The first morning we had a swimming pool session which included familiarization with the equipment and the next day would be the actual dive near a coral island called netrani.
It was one of the best times of my life as i found my self 15mtrs under the water among corals and pigeon fishes. its simply awesome and even better if you are a swimmer. (check my flickr page for pics). The 2 hour Journey to netrani is simply awesome, you can see loads of Grey dolphins hopping out every were around you and December brings whales.

Total cost : 7500 per person ( group of 3) bangalore - murdeswar - bangalore
(all costs included)

Tuesday, January 27, 2009

Sunday, June 8, 2008

I can't forget that day

It was a fine afternoon, Life was good. I was in my 6th grade.
after lunch classes were spent, day dreaming about girls.
Then suddenly from no where the office assistant drops in to the class and shouts at the top of her voice. ROBBBBBIN The Pricipal wants to see you right away.

Man i froze. Stood up slowly, and walked right out with her and all this while the entire class has its eyes fixed on me.

On my way to the principals office all kinds of thoughts gripped me. Did he come to know about window i broke the other day, or the fight i had in the football field and broke rudy's teeth.

I walked right in and there stood before me a 500 pound grizzly. He turned to me and said, there was a call from your home, You are needed there, you may leave for the day. I was confused and it took a moment for everything to sink in.

Well there i was on my cycle, peddling as hard as i could up the mountain. I was sweating and confused. All kinds of thoughts were circling my mind. What might have gone wrong, Oh no, May be Dad...... or Mom............
Oh no Oh no.... I was close to crying.....
Finally i reached home and from a distance i saw a small crowd near the porch.
I slowly made my way throught he crowd and saw the door closed and one man was peeping in, through our window......
Suddenly dads voice startled me, I turned around , He said softly
Son, the keys are with you.