Finally my instances are running without complaining..
Please share your solution to this problem with the rest of us in this forum. I'm also running into JVM_Bind exceptions when running my second server. Just like you, I'm trying to run multiple JBoss servers in a single box. So, if you would shed some light on this issue, that would be greatly appreciated.
Note: I've also purchased the JBoss documents, but unfortunately, they don't talk about how to run multiple JBoss Servers on a single machine.
Here are the step by step instructions to run two JBoss server instances in the same box. I mean the same IP address and different ports.
Note: I assumed here JBoss 3.0.7 with Jetty.
I am not sure about the validity of these steps, but I followed this and so far things are ok. Please let me know if we need to do anything different from these steps.
1) Duplicate your "all" directory. This is the directory under JBOSS_HOME/server. Now you should have two directories under JBOSS_HOME/server named "all1" and "all2". Now this represents two JBOSS instances.
2) Now we need to change all ports where clashes(JVM_BIND Exception) may occur, because we are going to run "all1" and "all2" seperately.
2a) Leave "all1" as it is.
2b) Edit all2/conf/jboss-service.xml
1) change webservice port number from 8083 to "28083" ( Appending "2" doesn't mean anything, u can add what ever you want, but should be unique).
2) Change NamingService port from 1099 to 21099
3) Change JRMPInvoker port from 4444 to 24444.
2c) Edit all2/conf/jacorb.properties
1) change jacorb.ior_proxy_port to 24711
2)OAPort to 23528
2d) Edit all2/deploy/cluster-service.xml
1) HANamingService port to 21100.
I may be wrong here, but I forced to change HANamingService port to 21100. I am not sure how this work logically, ie two HANamingService Port in one cluster listening to 1100 and 21100.
2e) Edit all2/deploy/jbossweb.sar/meta-inf/jboss-service.xml
1) jetty.port change to 28080
2)AJPListener port to 28009
3) Confidential port to 2443(not sure)
2f) Edit all2/jbossmq-service
1) OILServiceILService port to 28090
2) UILServerILService port to 28091
3) UIL2. UILServerILService to 28092
3)Open two command prompts, go to JBOSS_HOME/bin
run -c all1 (in first window)
run -c all2( in second window).
4) Smile now(Hopes this helped)..
Ranjith, your step-by-step instructions worked perfectly for running a Jboss cluster on one machine. Thanks for your input :)
But... I am trying to run the cluster on 2 machines and am not having much luck. Firstly I tried the out-of-the-box approach as I understood it in the JBossCluster pdf file. I got nowhere. The servers seemed to know that they were in a cluster but my client refused to fail over when I took one of them down.
However I tried copying the 'all2' configuration onto the other machine. I got further with the failing over using this configuration, but eventually got the following trace on my client:
java.rmi.RemoteException: Service unavailable.
Has anyone encountered this problem? Has anyone also got the clustering to work using the out-of-the-box approach?
Thanks in advance
I am using JBoss 3.2.1 with Tomcat 4.1.24 (instead of Jetty as described here).
I have a basic question - How do we know that the cluster is working? Is there any test to perform? Any specific message to look for in the log file?
If you start up the first node and allow the initisialisation to finish, then start the second node a message should appear on the first node showing that there are two nodes in the cluster.
Here are the changes that I made to get clustering to work in the same machine with JBoss 3.2.1/Tomcat 4.1.24/Java 1.4.2
I replicated all folder to allB and made all the following changes in allB.
Edit conf\jboss-service.xml and change 8083 to 28038, 1099 to 21099
Edit deploy\cluster-service.xml and change 1100 to 21100
Edit deploy\http-invoker.sar\META-INF\jboss-service.xml and change all :8080 to :28080
Edit deploy\jbossweb-tomcat.sar\META-INF\jboss-service.xml and change 8080 to 28080, 8009 to 28009
Edit deploy\jms\jbossmq-service.xml and change 8090, 8091, 8092, 8093 to 28090, 28091, 28092, 28093
Edit conf\jacorb.properties and change 4711 to 24711, 3528 to 23528
The cluster starts up nice and displays so on the log.
I have one more question - How do I access the clustered environment in a browser, what is the URL to use in a browser to access the cluster?
I have set my web servers to listen on 8080 and 28080. Should I always ask users to point to http://machine:8080 and it will automatically balance load?
I've installed JBoss-4.0 and I'm able to configure 2 instances of Jboss and could see the 2 instances in cluster. Also, I could deploy stateful session bean successfully. But while accessing the jsps, I'm getting an exception "Non-serializable attribute"for the attribute which is of String type. Also, I'm getting warning message "No tx support found for method: findByPrimaryKey
No tx support found for method: create
No tx support found for method: setSession"
Can anybody help me how to proceed?
Thanks in advance.
I am in a project in which we are suppose to configure JBoss clustering in Redhat 5
The following is the clients requirement.
They want to configure a JBoss clustering in Redhat 5 for their three
application(Apache, JBoss, MSSQL, ).totally six servers.
They need to configure the server in active passive mode.
We are planning to configure MSSQL active in one machine and passive in
other machine then JBoss active in one machine and passive in other machine. (not sure whether it is possible).
The main constraint now is "How to setup the active passive setup in JBOSS Clustering ” in Redhat5
Please help me!!!
char910 at gmail dot com
Thanks in advance
+ 91 9841811113
I appreciate your post is quite old but I am facing the same problem in that I am trying to set up JBoss 5 as a cluster on 2 virtual machines, once they start up they can see one another as displayed in the log files but still cant fail over when I take one of them down. Did you manage to fix this? and if so how?