This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JBoss/WildFly and the fly likes How to run more than one JBoss 4.x server in one m/c Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "How to run more than one JBoss 4.x server in one m/c" Watch "How to run more than one JBoss 4.x server in one m/c" New topic
Author

How to run more than one JBoss 4.x server in one m/c

Abhijit Das
Ranch Hand

Joined: Sep 25, 2007
Posts: 156
hi,
I want to run multiple instances of JBoss 4.0 in my m/c. I made the port number ( default 8080) different for each instances. But only one server is started , others shows duplicate port no. and other exceptions.

Thnaks
abhijit


Abhijit Das
SCJP 5.0 | SCWCD 1.5
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9960
    
163

Follow the steps mentioned here


[My Blog] [JavaRanch Journal]
Abhijit Das
Ranch Hand

Joined: Sep 25, 2007
Posts: 156
hi Jaikiran,
I have gone through the link. I understood, but it was not given in step wise. I got confused.

1st, I have created the directories as node1, node2 for 2 server instances.

...\jboss-4.0.0\server\node1
...\jboss-4.0.0\server\node2

2nd, I edit the file
...\jboss-4.0.0\docs\examples\binding-manager\sample-bindings.xml

( actually i used the same port numbers mentioned in the file. so no edit)

3rd,
In
..\jboss-4.0.0\server\node1\conf\jboss-service.xml
I uncomment the Service Binding section.
and added the entries for other two port in <mbean> e.g.



Note: my Jboss location is in C:/JBoss-1

4th, In console,I typed
C:\JBoss-1\jboss-4.0.0\bin>run.bat -c JBoss-1

so, ClassNotFoundException is coming.

Please help.

thanks
Abhijit





Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9960
    
163

org.jboss.deployment.DeploymentException: No ClassLoaders found for: org.jboss.services.binding.ServiceBindingManager; -
nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.services.binding.ServiceBindi
ngManager)


How did you create the JBoss-1 server profile under C:\JBoss-1\jboss-4.0.0\server folder? Or do you have separate JBoss installations one at C:\JBoss-1 and other at C:\JBoss-2? If it's the latter, then your command should be:



for both the instances.
Abhijit Das
Ranch Hand

Joined: Sep 25, 2007
Posts: 156
hi Jaikiran ,
I am getting confuse.
I am giveing my current setting as follows:

1. my JBoss4 is stored in
C:\JBoss\jboss-4.0.0

2. The three nodes namely JBoss-1, JBoss-2, JBoss-3 are created in
C:\JBoss\jboss-4.0.0\server

( node1 means JBoss-1 as shown in my last post)

3. Each folder of server instances like JBoss-1 contians
the folders of location in the
C:\JBoss\jboss-4.0.0\server

i.e. I copied the folders (all, default, minimal, standard) under
..\server
and pasted in the JBoss-1, JBoss-2 and JBoss-3.

4. Uncomment the 'Service Binding' block for the three nodes .
For JBoss-1, the file is
C:\JBoss\jboss-4.0.0\server\JBoss-1\conf\jboss-service.xml

as follows :


5. As the location
../docs/examples/binding-manager/sample-bindings.xml
is correct.

6. In console, I typed
C:\JBoss\jboss-4.0.0\bin>run.bat -c all

server is started succesfully. But I donot know whether the instances are started or not.
I think only the parent server(C:\JBoss\jboss-4.0.0\bin) is started.
Since, I get the url
http://localhost:8080
and also war files store in the location of ...\all or any other proper place is working.

***************************
My question are:
1. Whether my steps are correct or not?
2. If yes, server 3 instances are started or not. How to check it.
3. In a documentation, I come to know that WAR, EAR files have to place in the location (..\all\farm) of any

of the instances . i.e.
in my case
C:\JBoss\jboss-4.0.0\server\JBoss-1\all\farm\MyWebApp.war

and server will copy in other nodes in the cluster.

This is not working.

4. Please tell all the assumption is correct or not.


Thanks
Abhijit




Abhijit Das
Ranch Hand

Joined: Sep 25, 2007
Posts: 156
Hello Jaikiran ,

Can you give me the explanation.

Tnanks
Abhijit
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9960
    
163

1. Whether my steps are correct or not?
2. If yes, server 3 instances are started or not. How to check it.

If you have configured servers as C:\JBoss\jboss-4.0.0\server\JBoss-1 C:\JBoss\jboss-4.0.0\server\JBoss-2 and C:\JBoss\jboss-4.0.0\server\JBoss-3 with each one having its own ports-group in the jboss-service.xml, then to start these 3 servers, you have to use the following command:






These 3 commands will start the 3 server instances.

3. In a documentation, I come to know that WAR, EAR files have to place in the location (..\all\farm) of any


Do you need clustering?
Abhijit Das
Ranch Hand

Joined: Sep 25, 2007
Posts: 156
Thanking for continuing the thread.
I want to use JBoss clustering.

Are my steps in correct?

1stly, what are the folders in the

C:\JBoss\jboss-4.0.0\server\JBoss-1 and others to make a server instance.

2nd, What is the current directory for the command.
run -c JBoss-1



3rdly, If I typed
C:\JBoss\jboss-4.0.0\bin>run -c JBoss-1


Thanks
Abhijit

Neelesh A Korade
Greenhorn

Joined: Jun 07, 2007
Posts: 26
Jaikiran,

While I was going through this thread, I realized that on my JBoss installation, I do not have the "all", "minimal", "standard" folders that Abhijit has referred to in his post-

3. Each folder of server instances like JBoss-1 contians
the folders of location in the
C:\JBoss\jboss-4.0.0\server

i.e. I copied the folders (all, default, minimal, standard) under
..\server


I have two server profiles under my JBOSS-


and


Am I amiss somewhere? Why don't I see the folders that Abhijit has mentioned.

Note that I got this JBoss copied from someone's machine.

Thank you
Neelesh
Neelesh A Korade
Greenhorn

Joined: Jun 07, 2007
Posts: 26
I realized that the JBoss I got was a customized one and it didn't have the folders that are mentioned by Abhijit.
Ashish solanki
Greenhorn

Joined: Dec 30, 2008
Posts: 3

Look this webpage . May be it is help full for you
 
jQuery in Action, 2nd edition
 
subject: How to run more than one JBoss 4.x server in one m/c
 
Similar Threads
Need help to create a two instance of jboss server
https in Jboss 5.0.1
Running 2 wars on diferent ports
Configuring multiple users on 1 JBOSS servers
Help on Sybase