Thanks for the quick reply. I have already gone through the Clustering7 manual.
First I built a simple EJB (stateless session bean) which includes a business logic of "Fibonacci number" generator. First I tested it and worked well. Then I added " true "in the jboss.xml (and also <cluster-config> etc ).
Then I made a request from a client machine (in the LAN) by putting a big number, (which will take a long time to process) and while it's being processed I stopped the server.
But unfortunately the "connection refused" popup came. I had three machines in the cluster and i've deployed in the farm folder. But that cluster nodes didn't serve when the server failed. That means failover didn't work and l've tested for load balancing as well; it also failed.
Please let me know if i skipped some steps or the correct order. Because "CLUSTERING 7" doesn't provide details more than this.
I have same problem with you. In case of HA-RMI it have message
Caused by: java.rmi.RemoteException: Service unavailable. at org.jboss.ha.framework.interfaces.HARMIClient.invokeRemote(HARMIClient.java:184) at org.jboss.ha.framework.interfaces.HARMIClient.invoke(HARMIClient.java:238) ... 2 more
anybody help us ?
What you wrote sounds like you're on the right track; no need for loadbalancer webapp.
1) You mention adding a cluster-config to jboss.xml. Not needed if you're using the DefaultPartition and standard loadbalance policies. Just pointing that out in case there's a problem there.
2) Are you certain that your servers have formed a cluster? Your logs should show something like this, where the last bit lists the 3 machines:
2006-02-22 13:09:52,765 INFO [org.jboss.ha.framework.interfaces.HAPartition.lifecycle.DefaultPartition] New cluster view for partition DefaultPartition (id: 1, delta: 1) : [192.168.90.164:1099, 192.168.90.165:1099]
3) Also, did the EJB properly deploy on all 3 nodes?
i found that althought i config deploy stateless session bean in clustered mode . But JBoss still load "invoker-proxy-binding" with name "stateless-rmi-invoker" which no "HA" is applied. And i try to reconfig "stateless-rmi-invoker" which "HA" is applied Jboss do load balance and fail over with no error
When i shut down one node and restart it this can not sync state with other nodes. And Tree Cache in restarted node tell that this node is first node in partition ?????
I'm having the problem with the central node of the cluster. As i think the cluster should be seen as a single machine to the outside world. In order to achieve this I believe we need something like a "cluster manager" in Oracle (i think here it is the dispatcher). The CODE that i got is very similar to the code you've sent. i.e.
10:52:22,135 INFO [DefaultPartition] Number of cluster members: 2
10:52:22,145 INFO [DefaultPartition] Other members: 1
10:52:22,155 INFO [DefaultPartition] Fetching state (will wait for 30000 milliseconds):
10:52:22,175 INFO [DefaultPartition] New cluster view for partition DefaultPartition: 9 ([10.17.25.109:1099, 10.17.19.70:1099] delta: 0)
10:52:22,205 INFO [DefaultPartition] I am (null) received membershipChanged event:
10:52:22,205 INFO [DefaultPartition] Dead members: 0 ()
10:52:22,215 INFO [DefaultPartition] New Members : 0 ()
10:52:22,225 INFO [DefaultPartition] All Members : 2 ([10.17.25.109:1099, 10.17.19.70:1099])
10:52:23,597 INFO [HANamingService] Listening on /0.0.0.0:1100
10:52:23,627 INFO [DetachedHANamingService$AutomaticDiscovery] Listening on /0.0.0.0:1102, group=23
0.0.0.4, HA-JNDI address=10.17.19.70:1100
This log snippet answers my point #2 above; your two cluster nodes are seeing each other and forming a cluster.
How about points #1 and #3?
The other points are ok. That is I used defaultpartion and didn't make any configuraions there. I just made only "/=ture". I think that means i'm using default loadbalancing and failover policies.
I deployed the ejb in the farm folder. Then it appeared in all the nodes in the cluster. (Also it worked in each node when i made seperate requests for each cluster.)
Now the problem i'm having is the configuring (or simetimes building) the dispatcher. As i understood it should have something called client code which downloads to the client at initial state. So i need to know more about this client code and a sample code. (since i didn't get it in the "Clustering 7" document.)
The "code that downloads to the client" is simply a) the EJB home proxy you obtain by doinga HA-JNDI lookup or b) the EJB proxy that is returned when you invoke create() on the home.
You said load balancing didn't work. How did you test that (in detail)?
Your Fibonacci number test is not a good failover test. Once a request has successfully reached a server and been invoked on it, if there is a failure during processing the client proxy is not going to transparently retry on another server -- it's going to throw an exception. The proxy has no way of knowing if retrying is the correct thing to do once it knows the method was invoked on the server. Only your application can make that decision.
The way i tested the load balancing is, I made several requests for the cluster and put large numbers to calculate in each of the browser instances.
Then I checked the CPU usage of each node. Then node that we made the original request exhibited 100% of cpu usage and others didn't show any significant change.
So we assumed that load balancing didn't happen.
I realized that fibonacci is not a good one to test load balancing after your guidance and if you could please suggest a suitable thing.