Showing posts with label Pramati. Show all posts
Showing posts with label Pramati. Show all posts

Wednesday, September 24, 2008

Pramati IIS Webgate plugin

Most of the times the Application servers are hidden beyond the Webserver/Load Balancers/Reverse Proxy servers, such as Apache and IIS. One of my previous posts talk about Reverse Proxy here In case you are running an apache server, it provides a nice Mod_proxy module to reverse proxy to back end nodes which happen to be Application servers. However, when running IIS, then we are in a fix if you are running the back end nodes as J2EE Application servers . Pramati Server has a nice plugin that helps you to dispatch requests from IIS to Pramati Server. Documentation for the same can be refered here

I have seen some issues where the IIS plugin installation shows up red in the IIS configuration window. Restarts of the IIS service/admin service does not seem to fix the problem. Here are 2 quick things that you might need to check if you are seeing this problem.

1. The version of the IIS Webgate plugin and the version of IIS being used. Pramati Server ships various versions of IIS Webgate plugin with different versions of Pramati Server. The ones shipped with 4.1 are compatible only with IIS 4 or IIS5. May be you are trying to use a wrong combination!! For Webgate plugin that works with IIS 5 and above, I recommend that you pick up the latest version of Pramati Server and use its plugin. The latest version of Pramati Server can be downloaded from the site here

2. Sometimes, the issue could be with the log file location that you have specified for the Webgate log. The log location tag is present in the iisplugin.props file located in the ${Pramati_install}/add_ons/webgate/iis folder. Change the value to a valid location on the system

LogFileName E:\\fubar.log

These 2 checks should be able to get you running with IIS Webgate plugin in Pramati Server. Inc case you still have problems, you can talk to your designated support contact at Pramati or drop a message in one of their forums here.

Monday, September 24, 2007

Hibernate, antlr and Class loading issues

Hibernate uses HQL(Hibernate Query Language) for generating Object-Oriented queries.  Hence for this purposes ships a specific version of antlr.jar along with the Hibernate. Most of the App servers use antlr to generate the Query Language for the CMP beans. In this case, it is quite possible that the two versions of antlr are different. The difference in versions kicks in some of the exception messages when you try to access the application. Most of the time, the exception is reported in the HQLToken class.

In some cases, ClassNotFound/NoClassDef exceptions are also reported as the global library file is trying to access the Applications WEB-INF/classes or WEB-INF/lib folders.

To resolve it, the easiest option is to remove the version shipped with App Server(Please note that most of the App Server support personnel refuse to assist if the folder structure/folders are altered in the server installation).  In case you are not using any components that use Container Managed Persistence, the above work around works fine.  The problems kick in when any of your component tries to use Container Managed Persistence. Also, to make sure that you get proper support from your App Server vendor, the above approach should not be followed.

So what should be done?

To fix the issues, the class load/search/scope functionalty of the App server needs to be modified. The classes in the WEB-INF/classes or WEB-INF/lib folders should be loaded/searched prior to the global ones.

Fortunately most of the Application servers provide a way to change to such classloading functionality. Following is the consolidated list for the App Servers:

Pramati Server:

Add the following tag after <module-name>  in the generated pramati-j2ee-server.xml file for the application under the <web-module> element:

<prefer-deployed-web-classes>true</prefer-deployed-web-classes>

OC4J:
http://download.oracle.com/docs/cd/B25221_04/web.1013/b14433/classload.htm#CIHFABFI

WebLogic:
http://edocs.bea.com/wls/docs81/programming/classloading.html#1082452

Websphere:
http://publib.boulder.ibm.com/infocenter/wasinfo/v5r0/topic/com.ibm.websphere.base.doc/info/aes/ae/crun_classload.html

JBoss:
http://wiki.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration

Thursday, July 19, 2007

HP ServiceGuard

Been busy last couple of weeks. Some really nice things happened during these weeks. We had an opportunity of integrating Pramati Server with HP Serviceguard. We had one of our customer who was looking for clustering solutions. We have offered Pramati Cluster, which offers fail over, and load balancing. The End User had HP machines for production enviroment. With these HP machines he happened to purchase the Serviceguard framework which manages the fail over mechanism and manages switching of IP address( virtual IP address). We had setups with OS level clustering such as Windows Clustering, Sun Clustering. However, these happened to manage the things at a machine level. Well it really depended on how you are trying to configure it. Generally these run with Active-Active or Active-Passive configurations. Active-Active means that both the machines are in active state and the data replication happens on both machines and the load is balanced between the two machines. This is achieved by using a Virtual IP address that forwards the traffic to back end machines. In Active-Passive configuration, only one machine is active at any time and all the traffic that hits virtual IP address is routed to the active machine.

However, the HP Serviceguard was managing the thing at package level. For this service any application registered with it is a package and it manages the package between the cluster nodes. That is to say App server can be running on one cluster machine and Database on the other. These two are independent and could be running anywhere on the cluster machines. With this background, I assume it is now safe to go into the details of what happened during this integration.

The End User has called up asking for few queries on how Pramati Server can be fit into the picture. Pramati Server has clustering solution which works independent of OS level clustering. We have proposed the same. However since there is no single point of entry for the traffic for cluster nodes, we were left with either using a loadbalancer or leveraging on the HP Serviceguard framework to manage the traffic routing. The Application vendor was in favor of leveraging on the existing HP Serviceguard framework. Hence, there were series of conference calls setup with HP implementation team, the Application vendor and us.

This is where the real fun has begun.

The following is the snapshot of the conversation that took place between the HP implementation guy at the clients place and me:

With all introductions done…

Me: How does this HP Serviceguard thing work? ( Though I have done some ground work on the HP Serviceguard thing, couldnot find any relevant docs on how the applications should interact with it).

HP: The HP Serviceguard has to register your application and a virtual IP address configured for your application.

Me: Okay, how do we register the application with HP Service?

HP: You will have to provide us with few scripts using which we would register your app into HP Service.

Me: (I was happy to hear this. Good just few scripts and its all done). Okay, what would these scripts be and what is the desired functionality of the scripts.

HP: I am not really sure, but all I know is that you will have to provide me few scripts.

Me: ( What the !!!!). Okay, if you can tell us what these scripts should be doing, we might quickly put up few scripts for the desired functionality.

HP: ( He repeats the same thing). I am not really sure, but all I know is that you will have to provide me few scripts.

Me: ( Now I am beginning to worry. This is not going to end soon). Okay, then who would know about what kind of scripts are required?

HP: The HP Serviceguard team would know.

Me: Are you from the HP team or a reseller of the product?

HP: I am from HP team, but from implementation team. So I do not know what kind of scripts. All I know that is few scripts are supposed to be provided by you.

Me: (Does any shell script do? Such as the one to display simple helloworld on the Console?) Okay, can you give me numbers of your HP Service team so that I can talk to them?

HP: You wouldn’t be able to talk to them directly without any case id.

Me: Okay, can we create a case for this and then talk to them.

HP: Sure, we should be able to do that. Shoot across an email on the info required and I will get back to you.

So I shot across an email to this guy and waited for a day. Nothing happened on it. So decided to call up and check what’s happening:

Me: Looks like we haven’t got a reply from your team. Since we have logged a case, can we call them up and check with them?

HP: Yes, but I do not have the numbers for the HP Serviceguard team.

Me: Okay, how do we get this?

HP: Can you call up HP Sales team and check with them?

Me: (Sigh….) Okay, I will call them up and check.

Now I call up HP sales team.

Me: Hi, this is ….. We have one customer who is interested in integrating our App server with one of your product. HP Serviceguard. We have few clarifications. Can you help us?

HPSales: I can provide you with HP Support number who should be able to help you

Me: Great.

I call up this number

Me: ( I ended up speaking few minutes about the current situation and what we are looking for).

HP Support: Sure Mr Naveen. Before we can start with any of your queries, can I have the serial number of the machines?

Me: Sure, we have few HP machines at our place. So will the number from any of them do?

Here comes the ace..

HP Support: No, the serial numbers should be of the machines on which HP Serviceguard framework was purchased.

Me: Okay I will get back with these numbers

Now I call up this HP guy at the clients place and ask him for the numbers. I asked him if he can give me the serial numbers. For some strange reasons he was reluctant to give me these numbers.

Finally with some intervention from Application Vendor and End User, we could get a sample script that was used to integrate MySql with HP Serviceguard. So we just mimicked these scripts and provided them to this HP implementation guy. After a day we got a call from our App Vendor saying all went well and Pramati Server has been registered with the scripts provided by us. One more happy customer.

But I really feel that HP Serviceguard is the one that provides clustering solution, they are supposed to have some documentation on what is required from applications such as App servers, database etc. It should have published its API if any and should be a part of the software that they sell. I wonder why it is not the case.