Sunday Dec 20, 2009

GlassFish Cluster Installation Tips

When ever you go in for GlassFish Cluster deployment please ensure that you do the following before and after installation so that the setup works without any issues:



  • Install the latest version of JDK available
  • See that the machines that have the NodeAgents / Instances on the same subnet. Clustering doen't work with machines that are not on the same subnetwork.
  • Enable Multicasting with in the subnet where the cluster installation is taking place. -- SHOAL which is the backbone of the cluster requires multicast to be enabled. You can test the Multicast on the network by the simple instruction you can can find here and here. Not checking these 2 might result in either the instances not joining the network or session replication failure.
  • Install the GlassFish with latest patch available. -- This step ensures that lot of the bugs are fixed which might be discovered later in the production.
  • Once installed ensure that the sample cluster application that is bundled with the GlassFish is deployed and runs properly in the cluster. This sample is bundled with the <GlassFishInstallFolder>/samples/quickstart/clusterjsp folder.


These steps (which might take 30 mins.) ensure that the GlassFish Cluster Installation in the envisaged manner and saves lot of trouble shooting time.


Hope you find these steps useful. Happy Clustering!!!


Friday Sep 18, 2009

Glassfish Update Tool on MAC OS

There will not be any JAVA_HOME set by default on MAC OS and also it will not be in the standard folder way as in case of Windows / Solaris. The Default Java would be in the /System/Library/Frameworks/JavaVM.framework/Versions/ directory with each version like 1.3, 1.4 installed. Also the directory structure would be

narayana-rallabandis-macbook:1.5.0 narayanarallabandi$ pwd
/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0
narayana-rallabandis-macbook:1.5.0 narayanarallabandi$ ls -la
total 0
drwxr-xr-x   9 root             wheel   306 Jun  2 13:31 .
drwxr-xr-x  14 root             wheel   476 May 29 17:27 ..
drwxr-xr-x  11 root             wheel   374 May 29 17:27 Classes
drwxr-xr-x  35 root             wheel  1190 May 29 17:27 Commands
drwxr-xr-x  13 root             wheel   442 May 29 17:27 Headers
drwxr-xr-x  12 root             wheel   408 Jun  3 19:46 Home
drwxr-xr-x  45 _update_sharing  wheel  1530 May 29 19:00 Libraries
drwxr-xr-x  25 root             wheel   850 Jun  4 10:07 Resources
drwxr-xr-x   4 root             wheel   136 Jun  3 19:47 lib
narayana-rallabandis-macbook:1.5.0 narayanarallabandi$

So the default update tool which comes with glassfish would not work since the same has the command starting with ""$JAVA_HOME"/bin/java -Dcom.sun.updatecenter.home="$UPDATECENTER_HOME" -cp ....."

Execution will throw error ./bin/updatetool: line 13: /bin/java: No such file or directory
We can circumvent this by replacing "$JAVA_HOME"/bin/java " with "/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Commands/java" since the Java executable will be in the Commands folder of the JAVA_HOME



Wednesday Sep 16, 2009

Running Open MQ with Java CAPS Server and accessing the same in eManager

For running Open MQ as a seperate process and then hooking the same to the Java CAPS and monitor the same in the eManager you need to do the following things:



  • Download the Open MQ for the OS and start the Open MQ. This would start the MQ on the default port 7676.

  • Modify the domain.xml of the Java CAPS installation for the JMS to run as "REMOTE" instead of the default "EMBEDDED". We need to make modification in the following element

  • <jms-service addresslist-behavior="random" addresslist-iterations="3" default-jms-host="default_JMS_host" init-timeout-in-seconds="60" reconnect-attempts="3" reconnect-enabled="true" reconnect-interval-in-seconds="5" type="REMOTE">
            <jms-host admin-password="admin" admin-user-name="admin" host="narayana-rallabandis-macbook.local" name="default_JMS_host" port="7676"/>
          </jms-service>

  • Start the glassfish with Open MQ running as separate process...

  • Start eManager

  • Go to J2EE Section and add the Glassfish domain that is currently running.. You should able to see the Open MQ in the server section.


Hope this helps !!!..


Wednesday Apr 08, 2009

Glassfish Startup problem -- /etc/hosts entry

I had an opensolaris environment on which I was running GlassfishESB. Since I had to connect to a local Network I had to make some changes to the /etc/hosts file and add an entry to the same.

After that I tried to restart Glassfish it did not restart. It failed at the following point

ADM1079: Initialization of AMX MBeans started

It gave the following exception in server.log. I had to modify the hosts file to make the server start again.

[#|2009-04-08T15:57:28.501+0530|SEVERE|sun-appserver2.1|javax.enterprise.system.core|_ThreadID=10;_ThreadName=main;com.sun.enterprise.admin.server.core.JmxConnectorLifecycle@1ef3d12;com.sun.appserv.server.ServerLifecycleException: Cannot bind to URL [rmi://localhost:8686/management/rmi-jmx-connector]: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
    java.net.ConnectException: Connection timed out];_RequestID=c39a90fc-8790-4b27-aa91-730bf7b8ba85;|Service com.sun.enterprise.admin.server.core.JmxConnectorLifecycle@1ef3d12 cannot be started! : com.sun.appserv.server.ServerLifecycleException: Cannot bind to URL [rmi://localhost:8686/management/rmi-jmx-connector]: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
    java.net.ConnectException: Connection timed out]|#]

Monday Mar 16, 2009

Java CAPS tip on Open Solaris

I recently installed Java CAPS on Open Solaris 10. I observed that I could not access repository from browser.

I tried to look at the following in the process of debugging:

  • install.info in the repository directory
  • tried to access localhost:12000
  • 127.0.0.1:12000
  • <hostname>:12000
  • <ipaddress>:12000

but all went in vain.

After a while of debugging I found that I installed punchin which erased the /etc/hosts file entries while installing the punchin client. After the entries are restored manually I could access the repository !

Hope this helps somebody who is having a similar issue.

Friday Feb 27, 2009

VirtualBox

The latest version of  VirtualBox is released on Feb 16th. This blog item is right from the same box, I could use Windows Live Writer in Windows XP which is my guest system while the host system is Open Solaris.

The whole experience is truly amazing!!! You can have best of the worlds in each operating systems from single desktop..

Try it out today!

Thursday Feb 19, 2009

Day 2: Sun Tech Days - Hyderabad

Today's highlights from my perspective are

  • Matt Thompson's presentation on cloud computing -- Matt explained the bits and pieces of cloud computing, Sun's offering in cloud computing stack. The most interesting piece for the development community is how the computing going to transform the way we code. Project Kenai and Project Zembly.
  • Chck's presentation on Java FX, which is coherent, ordered and informative
  • Simons presentation was very informative on Java performance..

Project Kenai doe's just offer site for pushing in the code like sourceforge, but it offers the full development stage including desktop,offers for choosing OS, build environment, test environment all on the cloud apart from the development tools like Netbeans. This offers the developers to choose the environment they want to develop, test deploy with out paying a penny out of their pocket. Just have Internet connection and create a company with zero cost. Have a distributed team over the net use the Sun's cloud facility to host your idea.

Project Zembly is another innovation from Sun which gives the users the power to create the widgets for social applications and share them with their family, friends and the whole world. The demo by Vidya on stage with Matt proved that simple social application can be developed previewed just on the browser without any other paraphernalia like IDE, runtime to test on the developer's machine. So the Browser happens to be the dev place ..

And when we think of the possibilities which these 2 innovations can bring to the way we think about apart from other things to the software development its awesome!!!!

Out of the stalls from the students, I liked the one from MS Ramaiah college of Bangalore, which have done a POC on Network Management solution available on web services. I spoke to them regarding ideology of Network Virtualization in the Management paradigm.

Apart from that I had few good discussions with the attendees for the yesterday's session on Open-ESB. The questions centered around why should they choose Open-ESB while they have other alternatives also in open source. I would like to post the answers though in some other posts..

Evening entertainment is from Abhi which was simply scintillating and enthralling the crowed. I have some pics for you!

 

1902200902419022009025

Wednesday Feb 18, 2009

Sun Tech days Day 1 at Hyderabad

Sun Tech days started today in a gala fashion today at HICC center defying the economic downturn. For Sun Hyderabad is important since the developer participation is resembles JavaOne the biggest developer conference in size, number of tracks its offering apart from hands on labs.

The presence of James Gosling for this event says how much important this event in India is for Sun. James delivered key note spoke on lot of technologies but the most interesting for me are the following in the following order:

  • Real time java -- because of the sheer technical challenges it poses like predictability. Just imagine how can you predict the Garbage collection in such a scenario or handling of thread priority ...
  • Ubiquitous computing and the power of Java
  • Java FX -- bringing the power of rich client experience that's much needed for Java plat form. The small game demo which he showed on his mobile apart from Chuck lee's another small presentation on FX again really were eye catchers...
  • Java 7 -- and what's coming there.

The crowd is still fantastic during these times and Sun I believe is very successful in pulling so much.. Kudos to the event organizers.

On a personal note I presented Open - ESB on Enterprise Track. Seemingly went well I 'll be posting the site so that you can download the preso!

The night party started with a wonderful performance from the trio (see below for pics)  and ended with a fashion show from Rahul's team which was received with enthusiasm from the crowd.

 

18022009017

Glimpse of the crowed during the inaugural session

 18022009020

Father of Java speaking to Hyderabad Sun Tech Days crowed

18022009022

The wonderful kids Siddhardh (11) on percussion, Raja Reddy on Guitar and Sastry on Casio

Wednesday Feb 11, 2009

Glassfish Portfolio Announced

Sun announced its Glassfish Portfolio which can be called its middle tier continuum yesterday. You can peek at whats there in that from the link: Sun GlassFish Portfolio - What's Inside

Though its a bit tough with respect what does it mean by each of the globes that are on the page currently, once you go through the details you can see that its almost akin to the previous JES stack. The additions being the ESB since the integration layer was not there previously and the communication server (SIP Servlet based). Apart from that it's  integrated web stack contains of popular open-source, Web-tier infrastructure
technologies such as Apache HTTP server, MySQL, memcached, PHP, and
Ruby optimized for the Solaris, OpenSolaris, and Linux platforms.

Some of the enterprise features like profiling with Enterprise Manager which comes with subscriptions (Sun offers for this portfolio flexible subscription-based pricing) .

Give it a try TODAY!!!



Tuesday Feb 10, 2009

A Week to go for Sun Tech Days at Hyderabad

The biggest tech event out side US for Sun is coming soon from 18th to 20th of February 2009.

For more information about Sun Tech Days and to view tentative agenda topics and registering for the event visit http://www.sercononline.com/suntechdays09/index.htm

 

 

top_header

Wednesday Dec 17, 2008

Integration Server Startup time issues

Its observed that when we develop applications on Java CAPS up till 5.1.3 the common size of the ear file happens to be 12 -15 MB. Its also observed that when we have normally applications more than 4 - 5 the domain startup time increases.  Generally we can not make any difference to the startup time of the domain.

The following are some of the tips which can possibly be followed to bring down the startup time.  You should not curse me if this doesn't work out smile_regular .

 

1. start the appserver in '-server' mode (JVM options). If this flag is not there, your app server JVM will spin trying to compile all the EAR code.

2. keep your Min and Max heap size the same (e.g. 2GB, what ever we have) to get more efficient heap size allocation and save on time.

3. Another thing to look out for is EAR file size... if all ear's have redundant jar's packaged within them, we can separate them and
put in /lib folder and not embedded in each EAR (class loading delay) --

4. Have you tried to deploy one app at a time and what effect it has on the startup time in case any specific app is taking much longer than
others? --- We can have some pointers here as to which application is taking more startup time.

5. Apart from above since these issues with respect to the performance needs to be seen in isolation we need to look at each of the ear with respect to the startup time. Since this can give a closure look at which application is causing the issue we can have a close look.

Why does the deployment take long time ? -- The application server a.k.a. IS is SJSAS 8.1 version. All the applications of the previous versions of the Java CAPS bundle the "rar" or the connector files with each of the ear file. Also the packaged applications used to create the resource connection pools etc. during the deployment time, which takes considerable time.

That said, I would recommend to move to SJSAS 9.1 for deployment since there has been lot of improvement with respect to startup time, resource pool management, cluster profile, performance etc.

I will cover moving to 6.0 in some other post believe me its simple.

Post your experiences with these options or any other options if there are any...

Saturday Nov 15, 2008

CEC Update

CEC 2008 is over land I will be bringing back good memories and experiances on with respect to networking with the attendees.

For Sun this event I felt was important from the perspective of "Skill upgrade" of the folks in the services side be it on Sales or Delivery and I believe that this is the right strategy since to remain competitive you need to be competent. Pursuing this direction the following steps are taken

  • the sessions are made more technical,
  • more observed
  • Attendee needs to stick to a single track
  • and are evaluated at the end of the session giving in accreditations
  • provisioning for free tests encouraging the attendees to get certified

All the sessions went with vigour till the last day though marred to some extent because of announcement RIF on the last day.

During my interaction I felt that there is need for know how with respect to each feature on the following

  • What is the product feature
  • How is that implemented (And Why That Way if possible)
  • Why are we doing some thing in a particular way and the implications of that

I resolved that in my future technical items I will commit to writing in that way since that would be of more use to the people in many ways.

Tuesday Nov 11, 2008

Attending First CEC

I am attending to Sun's CEC (Customer Engineering Conference) from Nov 10th - 14th 2008. This is my first CEC, since I moved to Professional Services Delivery in June 2008.

From the general session of yesterday its evident that Services is going to play a major part in Sun's offering and there is great emphasis on the quality of serivices that are provided. I am currently enjoying meeting my friends from Monrovia and attending sessions on Java CAPS track. I am getting a lot to learn since I am meeting the folks from the field and talking to them.

I will be posting more on CEC

Tuesday Sep 16, 2008

Utilizing 64bit JVMs in Java CAPS Integration Server

A very common error that is observed with Java CAPS Integration
Server is "Out of Memory". What can we do about it?

[Read More]

Common Reasons for Out Of Memory Errors

Out Of Memory error can happen due to following reasons:



  • Garbage Collection Issues

  • Orphaned Class loaders

    • Thread context classloader

    • new Thread()

    • Dangling thread



  • Classes with following references

    • static variables

    • SQL Driver

    • Commons logging

    • java.util.logging.Level

    • Bean util

      • Details






etc..


We can analyze the problem(s) associated with such errors at application level by having GC details and/or heap dump



  • -verbose:gc with -XX:+PrintGCDetails for observing GC model for tuning or altering suitable GC for the application

  • -XX:+HeapDumpOnOutOfMemoryError

  • -Xrunhprof:heap=dump,format=b

  • jmap -dump:format=b,file=heap.bin <pid>


Analyze heap dump using Jhat



  • jhat -J-mx1024m heap.bin

  • http://localhost:7000

  • Using built-in or custom queries to narrow down leak suspects

  • Identify an object or class in the application

  • List reference chains

About

I was part of Sun R&D in Java CAPS and later Glassfish ESB. I moved from R&D to Consulting. I am currently working as a Solution Architect in Oracle Consulting Services (India). I was sharing my experience w.r.t. Java CAPS and other technologies during Sun period. Now in Oracle world I share my experiences with Oracle FMW product line as well as other Oracle Technologies and products.

Search

Archives
« July 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  
       
Today