Monday, February 14, 2011

Generate Key store 2048 in Websphere application server 6.x

Hello Everyone,

Last week one of my consultant had issues with creating SSL certificate 2048 in Websphere Application server v6.

We had apply some workaraounds for the same.


Problem discription :

The iKeyman utility within IBM HTTP Server V6.0 does not provide the option to create a certificate request (CSR) 2048 key size

After a CMS key database has been created using the iKeyman utility, in the task of creating a certificate request, the key size options listed are 512 and 1024.

After searching on google and IBM site we have found following cause :

By default, the iKeyman utility uses the Java 1.4 version of the gskikm.jar file installed with IBM HTTP Server V6.0. The file is located in the following directory:

/_jvm/jre/lib/ext/

The classes within this version of the gskikm.jar file only supply the key size options of 512 and 1024. By renaming and moving the gskikm.jar file from its default location, the iKeyman utility will load the Global Security Toolkit (GSKit) v7 classes providing an additional key size of 2048.


So for Resolving the problem we had Followed steps:

1. Stop the iKeyman utility.

2. Ensure the GSKit is installed with IBM HTTP Server V6.0, and has a 7.0.3.18 or higher version to support a key size of 2048. Applying the latest available IBM HTTP Server V6.0 fix pack will upgrade the GSKit V7 to a higher version.

OR

From the IBM HTTP Server Fixes web site, download and manually install the latest GSKit V7.0.4.28 ( PM07113 - IHS Version 6). A readme file will be included with instruction on how to install GSKit on a UNIX or Windows platform.

3. Rename and move the /_jvm/jre/lib/ext/gskikm.jar file to a directory that is not detectable to the JDK class path, extdirs, or bootclasspath.

For example:

From:

/_jvm/jre/lib/ext/gskikm.jar

To:

/_jvm/jre/lib/ext/gskfiles/gskikm.jar.org

4. Restart the iKeyman utility.

5. Follow the create a certificate request task and select the Key Size

Now we can see key size 2048 with 512 and 1024, before troubleshooting this problem i was not aware of this reasons.

So finally we resolve the issue and thanks to google and IBM site..... :)

Enjoy wroking with Middleware... Hope it will help you,,,


Regards,
Ajinkya Vichare

How to create E-mail notification in Weblogic using WebLogic Diagnostics Framework (WLDF)

Dear All,


Today we will discuss about Weblogic diagnostics and framework. and how to configure mail notification on Weblogic.
Actually i came across one of the requirement where we configure e-mail notifications for different-different purposes, now will discuss about Heap_size notifications.

WebLogic Diagnostics Framework (WLDF) – Watch & Notification

One of the features of WLDF is Watch and Notification. You can configure server(s) with watch condition and respective notification(s) to be sent if the watch conditions are met. For example, if the number of request waiting on a JDBC Data Source to grab a connection exceeds 10 and if the free heap in the server is less than 5% then you can trigger a notification.

The notification can be one or more of the following types:

* JMX Notification - Application(s) can register notification listener with WLDF to receive notifications.
* JMS Notification - WLDF can post a message to JMS destination to alert the situation which can be consumed by a message listener or MDBs to further processing.
* SNMP Notification - SNMP traps can be sent to alert SNMP managers.
* SMTP Notification - Email notifications through a Java Mail session.
* Image Notification - Generates a server image which contains information from different subsystem during the watch.

Creating JavaMail Session

First step is to make sure that the underlying resources for the notification are setup. In this case we are going to use SMTP notification so let us first create the Java Mail Session to connect to Mail Server.

1. Click "Lock & Edit" to acquire a configuration lock

2. Expand Services > Mail Sessions and click "New" to create a new Java Mail Session.

3. Provide Name, JNDI Name and JavaMail Properties as follow:

4. Name - WL-MailSession

5. JNDI Name - com.test.MailSession

6. JavaMail Properties:

mail.transport.protocol=smtp
mail.host=hostname_smtp
mail.user=admin
mail.password=password
mail.port=(port_number)
mail.from=admin@domain.com

(Note : The port number of the mail server for the specified protocol. If not specified the protocol's default port number is used.
mail.protocol.port=port_number)


So We can use following mail property



7. Click next to target the mail session to a server (Eg. AdminServer or mange_server1) and click finish.

8. Activate the changes by clicking "Activate Changes".



Creating WLDF Module

Next step in configuring watch and notification is to create a diagnostic module and target it to the server. You can use console or WLST to create a diagnostic module. The following steps illustrate the steps to create a WLDF system module:

1. Click "Lock & Edit" to acquire a configuration lock

2. Click Diagnostics > Diagnostics Modules and click "New" to create a new diagnostics module. Provide a name and description.

3. Name - Mail_WLDF_Module

4. Description - This is a WLDF module for testing email notifications

5. Select the newly created module and select targets tab. Select the appropriate server for target as before

6. Click "Save" and "Activate"


Creating Watch & Notification

Each WebLogic Server instance can be configured with only one diagnostic module but you can target the same diagnostic module to multiple servers or clusters. Once the WLDF system module is created and targeted to the appropriate server then watches and notifications can be configured. The following steps illustrate how to create a Watch and a Notification.

To create a watch:

1. Click "Lock & Edit" to acquire a configuration lock

2. Navigate to the diagnostic module created above (Mail_WLDF_Module) and select the "Watches and Notifications" tab and "Watches" sub-tab (if not already selected)

3. Click "New" to create a new Watch. Provide the name and select the type as "Collected Metrics" [Select "Collected Metrics" for inspecting Runtime MBean values, "Server Log" to watch log data and "Event Data" to watch instrumented data]

4. Name - Heap_Notification

5. Watch Type - Collected Metrics

6. Enable Watch - Selected

7. Click "Next"

8. Click "Add Expressions"

9. Ensure that "ServerRuntime" is selected and click "Next"

10. If you are running WebLogic Server on Java HotSpot VM, make sure
"Select an MBean Type from the following list" is selected and select "weblogic.management.runtime.JVMRuntimeMBean" and click "Next".

If you are using JRockit VM, make sure "Select an MBean Type from the following list" is selected and select "weblogic.management.runtime. JRockitRuntimeMBean" and click "Next".

11. Select the instance for the appropriate server from the list for "Instance" and click "Next"

12. For "Message Attribute" select "HeapFreePercent", "<" for "Operator" and type "85" for "Value". Click "Finish" twice to create a Watch 13. Activate the changes The above watch will trigger the configured notification if the percentage of free heap is less than 90. You could make complex rule expression by combining multiple attributes from different MBean. For now we haven't configured any notification for this watch. We will create the notification and will associate it to the watch in the following steps. To create a notification:

1. Click "Lock & Edit" to acquire a configuration lock

2. Navigate to the diagnostic module created above and select the "Watches and Notifications" tab and "Notification" sub-tab

3. Click "New" to create a new Notification

4. Select "SMTP (E-Mail) for Type and click "Next"

5. Provide a name - Email_Notification. Make sure the notification is enabled and click "Next".

6. Configure the following properties for the "Config Notification - SMTP Properties" page

7. Mail Session Name - MailSession01

8. E-Mail Recipients - admin@localhost

9. Click "Finish".

10. Activate the changes



To associate the watch and the notification:

1. Click "Lock & Edit" to acquire a configuration lock

2. Navigate to the diagnostic module created above (Mail_WLDF_Module) and select the "Watches and Notifications" tab and "Watches" sub-tab (if not already selected)

3. Select the watch you created earlier - Heap_Notification

4. Select the "Notifications" tab and move the "Email_Notification" from Available to Chosen

5. Click "Save"

6. Select the "Alarms" tab and select "Use an automatic reset alarm". Set the "Automatic reset period" to 6 and click "Save". This will ensure that the notifications are at least 90 seconds apart.

7. Click "Activate Changes"


As we configured the watch type to be Collected Metrics, the attributes involved in the watch rule will be harvested and tested for watch rule expression(s). The default sampling period for the harvester is 300,000 milliseconds (or 5 minutes). So the time between samples will be 5 minutes. To change the sampling period for metrics collection:

1. Click "Lock & Edit" to acquire a configuration lock

2. Navigate to the diagnostic module created above (Mail_WLDF_Module) and select the "Collected Metrics" tab

3. Ensure that "Enabled' check-box is selected

4. Change the "Sampling Period" as "120000" so that it will collect samples once every two minute


I hope it will help you in creating notifications.


[NOTE : change settings/names and properties as per your requirements. It could have some mismatch in above blogs]


Enjoy working in Middleware...... Cheerzzzz

Regards,
Ajinkya

Friday, January 21, 2011

Warnings while starting Oracle SOA 11g

Hello,

Few days back while starting SOA i noticed that SOA gave me the following warning :
"
Warning: JMS queue 'weblogic.wsee.DefaultQueue' is not found, as a result, Web Service async responses via jms transport is not supported. If the target service uses JMS transport, the responses will not be able to come back.
"
I was worried for this warning msg but when i tried to solve it i came accross following conclusion :

It's a harmless warning message and that can be avoided.But still if you don't want to see this WARNING message then please apply the following flag in the JAVA_OPTIONS of your Server :

-Dweblogic.wsee.skip.async.response=true

Why we see this WARNING is your Server Log:

Async web service support is not fully configured. The async response web service uri for this server was not fully deployed because the JMS reliability queue was not defined/deployed: queueName. The server will periodically retry completing the deploy for the service. This message can usually be ignored unless there are async web service applications. To completely disable async web service support, thus avoiding this message,

set -Dweblogic.wsee.skip.async.response=true.

Enjoy Working with fusion middleware... All the best..


I hope it will help you while working with SOA,

Regards,
Ajinkya

WLST Error - java.lang.UnsupportedClassVersionError

Hello Everyone,

Today i have gone through issue working with WLST, it gives me following error while stopping weblogic server via WLST

" Problem invoking WLST - java.lang.UnsupportedClassVersionError: Bad version number in .class file Done "

I have gone through some documents which gives me some idea about this issue, finally i got solution for the same.

Solution: The jdk version used while creating the domain is not supported. Use higher version ( present in the same WebLogic server installed location) and point it while domain creation.

I hope it will help you while working with WLST...

Keep working and smiling..... :)


Regards,
Ajinkya

Friday, January 7, 2011

Error while accessing Websphere Application Server console

Hi Everyone,

Today i have faced one issues while working on Websphere application server on AIX.

I finished my websphere application server installation successfully but while accesing console, was getting following error.

WebSphere Admin Console SRVE0190E: FileNotFound Errors when clicking certain hyperlinks

Should you find that you have some links in your WebSphere Administration console that generate an error in the following format:

com.ibm.ws.webcontainer.webapp.WebAppErrorReport:

SRVE0190E: File not found: /xxxxxxxxxxx.content.main
at com.ibm.ws.webcontainer.webapp.WebAppDispatcherContext.sendError(WebAppDispatcherContext.java)
at com.ibm.ws.webcontainer.srt.SRTServletResponse.sendError(SRTServletResponse.java)
at com.ibm.ws.webcontainer.servlet.FilterProxyServlet.dispatch(FilterProxyServlet.java)
at com.ibm.ws.webcontainer.servlet.FilterProxyServlet.service(FilterProxyServlet.java)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java(Compiled Code))
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java(Compiled Code))
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java(Compiled Code))
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java(Compiled Code))
at com.ibm.wsspi.webcontainer.extension.WebExtensionProcessor.invokeFilters(WebExtensionProcessor.java)
at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java)It appears that the admin console couldn’t find the servlet that should be used to display the page.


I did some R & D on it, and finally i got resolution for the same.

in my case, had corrupted Admin console registry. so i run following command for the same from profiles.

iscdeploy -restore


This will cause WebSphere Application Server to reinstall the admin console.

this is very helpful while working with Websphere Application server console...... :)


Hope it will help you...


Regards,
Ajinkya Vichare

Tuesday, December 7, 2010

Installation Websphere application Server

Hello Everyone,

Today we will disscuss about Installing IBM WebSphere Application Server, Sorry guys am not able to provide you screen shots
but following steps are sufficient for Installing WAS sucessfully.

Please find following steps to installing Websphere application server.

Step 1 Run launchpad.sh file from Websphere media.

Step 2 From the left of the launchpad choose the link Websphere Application Server Installation.

Step 3 Then click on the link Launch the installation wizard for the Websphere Application Server in the right side.

Step 4 Then click on the link Launch the installation wizard for the Websphere Application Server in the right side

Step 5 On the Welcome page press the Next button.

Step 6 Accept the license agreement and press the Next button.

Step 7 Once the system passes the prerequisite checks press the Next button.

Step 8 Leave the box for installing the sample applications unchecked and press the Next button.

Step 9 Leave the default installation directory as shown above and press the Next button.

Step 10 Leave the box for Enable administrative security checked.

Step 11 Press the Next button when your screen matches the one shown above.

Step 12 On the Installation Summary screen press the Next button to begin the installation. The installation will take some time.

Step 13 Once the installation is complete, click on the link for the AboutThisProfile.txt file.

Step 14 In the file that is opened, note the Profile name, Node name, and Host name.

Step 15 Close the test file showing the profile information.

Step 16 When the installation is complete press the Finish button. This will launch the First Steps console.

Step 17 Click the link for Installation verification. This will take some time.

Step 18 Make sure that you get a message that the verification is succeeded and completed.

Step 19 Close the verification window.

Step 20 In the First Steps window, click the link for Stop the Server.

Step 21 You will get the message “Server server1 stop completed”. Then close the window that showed the output of stopping the server.

Step 22 Click Exit on the First Steps window.

Step 23 Close the installation launchpad if it is still open.


I hope it will help you while installing IBM Websphere Application Server,

Enjoy working with Middleware.....

Regards,
Ajinkya

Tuesday, November 30, 2010

While applying patch on Oracle Application server OIDLDAPD COULD NOT BE STARTED AFTER APPLYING DB PSR 10.1.0.5

Hello Everyone,

We have face some issues after upgrading Oracle Application Server from 10.1.2.0.2 to 10.1.2.3.0 on solaris platform, i was not able to LDAPBIND on the same server.
I found that after upgrading DB, some infrastructure services like OID and OC4J_Security components gets down.

We have found some metalink documents for the same. we use the following workaround to resolve the issue .


Reference :

OIDLDAPD COULD NOT BE STARTED AFTER APPLYING DB PSR 10.1.0.5
ODIHRAGENT: SYMBOL LPMATTERM: REFERENCED SYMBOL NOT FOUND


The following is only applicable with installations where Oracle Internet Directory (OID) is installed. (e.g., Identity Management home, or a full Infrastructure home). This will not be applicable on Mid-Tier installations, or where there is a non-colocated Infrastructure, where the Metadata Repository is in a separate home.

The oidldapd could not be started after applying DB Patch Set 10.1.0.5 to AS 10.1.2.0.2 in Solaris. This may also have a symptom of OC4J_SECURITY not starting, or /oiddas not accessible. The DB 10.1.0.5 Patchset will otherwise seem successful. This issue will only arise while attempting to startup and use Oracle Application Server OID components.This may be prevented before the patchset installation, or fixed after the patchset installation, using the following methods:

Scenario I. Optional:

Before the installation of the 10.1.0.5 patchset, back up the "libldapclnt10.a" file:


> cp -p $ORACLE_HOME/lib32/libldapclnt10.a $ORACLE_HOME/lib32/libldapclnt10.a_10.1.2.0.2

Restore it after applying DB Patch Set 10.1.0.5, and go to Step II-5, below.

> mv $ORACLE_HOME/lib32/libldapclnt10.a_10.1.2.0.2 $ORACLE_HOME/lib32/libldapclnt10.a

Scenario II. If not able to perform Optional Step I, (DB 10.1.0.5 Patchset already installed to AS 10.1.2.0.2 home, and libldapclnt10.a not backed up), then follow the full workaround:


Step 1. Take the following file from AS 10.1.2.0.2 CD #1 ("Disk1"):

stage/Component/oracle.rsf.ldap_rsf/10.1.2.1.0/1/DataFiles/lib.1.1.jar

Step 2. Execute the following command for getting "libldapclnt10.a0":

> jar xvf lib.1.1.jar

Step 3. Back up the "libldapclnt10.a":

> mv $ORACLE_HOME/lib32/libldapclnt10.a $ORACLE_HOME/lib32/libldapclnt10.a_10.1.0.5

Step 4. Copy the "libldapclnt10.a0":

> cp -p libldapclnt10.a0 $ORACLE_HOME/lib32/libldapclnt10.a

Step 5. You will need to edit the $ORACLE_HOME/bin/relink script with the following:

a.) Update $ORACLE_HOME/ldap/lib/ to $ORACLE_HOME/ldap/lib32

b.) Ensure make points to correct location of make executable on the OS

Before:

MAKE="/usr/bin/make" # full path to make

After:

#MAKE="/usr/bin/make" # full path to make
MAKE="/usr/ccs/bin/make" # full path to make

Step 6. Run the following command to relink:

cd $ORACLE_HOME/ldap/lib32

make -f ins_ldap.mk install

Scenario III. Possible: (If using OID ports below 1024, ownership and permissions may need to be edited): After a relink, OID executables (e.g., oidmon, oidldapd,oidrepld) will be set back to oracle ownership and permissions will be changed.This will prevent OID from starting if OID ports in use are below 1024. The oidldapd must be owned by root with oracle group ownership.

Setting the ownership/permissions back to the way it was after the initial install is typically done by re-running root.sh as root. However, the Database Patchset renames the original root.sh to root.sh.old, and it leaves a root.sh in its place that does not correct the OID executables.

To fix this, manually cat or vi the root.sh.old and search for "oid" (lowercase), and then manually apply all the chmod's and chown's changes to the oid executables listed in root.sh.old. The exact items may differ on installation types, so your root.sh.old is the best location to validate.

Permissions for oidldapd, oidmon, and oidrepld should be as follows:

-rwsr-x--- 1 root dba 2570620 May 23 12:34 oidldapd
-rws------ 1 oracle dba 2662384 May 23 12:34 oidmon
-rws------ 1 oracle dba 2704172 May 23 12:34 oidrepld

Commands to obtain proper permissions:

chmod 4750 oidldapd
chmod 4700 oidmon
chmod 4700 oidrepld

Note: This bug and stated workarounds were provided by Oracle Development at the time of the issue. Since the Oracle Internet Directory Support team is continually seeing different situations.


We have solve the issues with this workaraound, hope it will help you..... :)

Enjoy Working with middlewares and Administration.


Regards,
Ajinkya Vichare