-
1. Re: Multiple application instances on same server JBoss 4.2.3 4.2.2
wdfink Nov 16, 2010 2:15 PM (in response to dpbaker57)What you mean by '2 or 3 instances of application on each server'?
- 2-3 instances of JBoss on one physical systems (I supose this macth the question)
- application with different JNDI-names deployed in the same JBoss instance
Is it a JBoss-cluster? What kind of application I suppose a web-app but do you use EJB?
If you use 4.2 or 4.3 the binding manager will work similar as before.
Main differences between 4.2 and 4.3 are WebServices and JMS (MQ vs. JBM)
-
2. Re: Multiple application instances on same server JBoss 4.2.3 4.2.2
dpbaker57 Nov 16, 2010 2:22 PM (in response to wdfink)I mean 2 or 3 JVMs as part of a cluster of machines. Yes the brower plugin will load balance as before and yes the instances will have unique names. I need to know which port numbers need to be unique per JVM on each physical machine and in what files do I find those port assignments.
-
3. Re: Multiple application instances on same server JBoss 4.2.3 4.2.2
wdfink Nov 16, 2010 3:24 PM (in response to dpbaker57)Most of the ports must be different.
See the configuration wiki:
http://community.jboss.org/wiki/ConfigurePorts
http://community.jboss.org/wiki/ChangingaClusterPartitionName
http://community.jboss.org/docs/DOC-12460
The node you want to cluster must have the same partitonname and JGroups multicast address and port.
You can see the run.sh commandline parameter in the DOC-12460 for this.
-
4. Re: Multiple application instances on same server JBoss 4.2.3 4.2.2
dpbaker57 Nov 16, 2010 4:52 PM (in response to wdfink)1 of 1 people found this helpfulhttp://community.jboss.org/wiki/ConfigurePorts
Exactly what I want but not for the releases I was asking about. The problem is much changed between 4.0.5 and 4.2.2 files moved, were renamed and some of controls in the files changed names. I did what I thought was equivalent of the changes for 4.0.5. The first instance comes up but the second gets a port conflict but the strange thing is it is one of the port numbers I made unique to each instance. That is just mind boggling.
http://community.jboss.org/wiki/ChangingaClusterPartitionName
http://community.jboss.org/docs/DOC-12460
Both have nothing of value to me.
-
5. Re: Multiple application instances on same server JBoss 4.2.3 4.2.2
wdfink Nov 17, 2010 2:49 AM (in response to dpbaker57)You talk about 4.2.x, the WIKI describe JBoss 4 versions below the topic
Previous versions of JBoss
(OK the headline is small and might not seen ;-)
I recommend to use the port-binding manager configuration in jboss-service.xml and the according configuration file from docs/examples (I made a copy to .../conf).
Doing by hand spread this over too much files ...
-
6. Re: Multiple application instances on same server JBoss 4.2.3 4.2.2
jaikiran Nov 17, 2010 3:08 AM (in response to dpbaker57)Darryl Baker wrote:
If you have the details and are interested in getting it resolved, please open a new thread to discuss it. Maybe it's easy to fix or a known issue.
-
7. Re: Multiple application instances on same server JBoss 4.2.3 4.2.2
jaikiran Nov 17, 2010 3:09 AM (in response to jaikiran)1 of 1 people found this helpfulBy the way, for the port changes, like Wolf-Dieter mentioned in his latest reply, take a look at the ServiceBindingManager http://community.jboss.org/wiki/ServiceBindingManager
-
8. Re: Multiple application instances on same server JBoss 4.2.3 4.2.2
dpbaker57 Nov 17, 2010 1:12 PM (in response to wdfink)I have been doing my work on 4.0.5 by wrote from our wiki so I'm trying figure out if we have been doing extra work. The first thing I have noticed with 4.2.3 is the default, all, and minimal directories. We have been using the jems installer for 4.0.5 and it builds only one directory in server and that is named from input jems was given. We the copy it to the 1 or 2 other names we want. I suspect this is where things change.
At this point here are the instructions from our wiki:
Set Up the Service Binding Manager
This configuration item will allow you to map servernames to ports for configurations where you have multiple JVMs on a server. If you don't configure it both will try to use the same defaulted port.
Edit C:\jboss-4.0.5.GA\server\%servername%\conf\jboss-service.xml.
- Uncomment the "servicebindingmanager" section that begins with
<mbean code="org.jboss.services.binding.ServiceBindingManager"
- Change <serverName> attribute to the name of the application server.
Example: <attribute name="ServerName">wa01_qa01</attribute>
- Change the storeURL to look like this
<attribute name="StoreURL">${jboss.home.url}/server/bindings.xml</attribute>
Repeat uncommenting the servicebindingmanager on each of the application servers you installed.
When setting up service binding manager in the jboss-service.xml be sure to change it from the default port of 8083. So on your first JVM change it to 8183, second JVM would be 8283, etc.
Set Up Port Bindings
Copy the file c:\jboss-{version}\docs\examples\binding-manager\sample-bindings.xml to c:\jboss-{version}\server\bindings.xml. Edit the bindings.xml file.
- replace "ports-01" with the name of your server config (like wa01_prod01). If you have multiple servers on each physical machine then make sure you have entries for each server.
- If you need to add entries for more than two servers you'll have to copy and paste in entries. Make sure you copy one of the existing servers and NOT ports-default. Once you have copied the section, follow the port incrementation scheme in the existing servers to create unique ports for the new servers. This is a time consuming and annoying process.
Add a JVM Route for the App Server
Edit C:\jboss-4.0.5.GA\server\%servername%\deploy\jbossweb-tomcat55.sar\server.xml.
- Find <Engine name="jboss.web" defaultHost="localhost">. Append jvmRoute="%appservername"> Assuming your app server is called webapp01, when you're done it should look like this:
<Engine name="jboss.web" defaultHost="localhost" jvmRoute="webapp01">
- Find the section labled "<!-- A AJP 1.3 Connector on port 8009 -->" Change the connector port to a unique port, for example 18009. If you are running multiple VMs on one server you will need to assign unique port numbers in each server.xml. For example, the second server's AJP port would be 28009.
- Uncomment the "servicebindingmanager" section that begins with
-
9. Re: Multiple application instances on same server JBoss 4.2.3 4.2.2
wdfink Nov 17, 2010 2:34 PM (in response to dpbaker57)The directories are simple, all below 'server' are configuration that can be started with run.* -c <dirname>
minimal - good starting point if you want to configure all yourself
default - mostly all without cluster
all - default plus cluster
... - special, e.g web or production (save, no experimental, some performance optimization)
I prefere to copy one of the directory and make changes in my copy (easy to track my changes)
You have to activate the ServerBindingManager section in jboss-service.xml (remove comment brackets)
Also you should place the bindings.xml in the server/.../conf directory (copy of docs/examples/binding-manager/example....)
The AJP port is also within the port-bindings.xml, you should not change the jbossweb*/server.xml.
I remove ports-* configuration and left only one configuration within the bindings.xml, this file I copy and adapt for each installation on the same system.
All this will be described in detail by the wiki pages posted by jaikiran and me.
-
10. Re: Multiple application instances on same server JBoss 4.2.3 4.2.2
dpbaker57 Nov 17, 2010 3:28 PM (in response to wdfink)Please attach a link to the wiki article when available.
I've marked the previous post correct even though I haven't tested it yet. I have all the rest of the configuration to redo before I test and then come up with the jservices line to install it as a service. I will update this after I test.
-
11. Re: Multiple application instances on same server JBoss 4.2.3 4.2.2
veeramuthiah Feb 14, 2011 11:45 AM (in response to dpbaker57)Hi,
I followed the steps mentioned above to start multiple instances on same JBoss Server Version jboss-4.2.3.GA.
I copied sample-binding.xml to conf folder of the new folder created and renamed ports-01 to the folder name.
When I start the server for the new instance I get the following error
DEBUG [org.jboss.deployment.MainDeployer] Copying file:/C:/jboss-4.2.3.GA/server/<server name>/deploy/sql-ds.xml -> C:\jboss-4.2.3.GA\server\<server name>\tmp\deploy\tmp52239sql-ds.xml
DEBUG [org.jboss.deployment.MainDeployer] No deployer found for url: file:/C:/jboss-4.2.3.GA/server/<server name>/deploy/sql-ds.xml
DEBUG [org.jboss.deployment.MainDeployer] deployment waiting for deployer: file:/C:/jboss-4.2.3.GA/server/<server name>/deploy/sql-ds.xml
DEBUG [org.jboss.deployment.MainDeployer] Watching new file: file:/C:/jboss-4.2.3.GA/server/<server name>/deploy/sql-ds.xml
DEBUG [org.jboss.deployment.MainDeployer] Deployment of package: file:/C:/jboss-4.2.3.GA/server/<server name>/deploy/sql-ds.xml is waiting for an appropriate deployer.
DEBUG [org.jboss.deployment.scanner.URLDeploymentScanner] Watch URL for: file:/C:/jboss-4.2.3.GA/server/<server name>/deploy/sql-ds.xml -> file:/C:/jboss-4.2.3.GA/server/<server name>/deploy/sql-ds.xml
ERROR [org.jboss.deployment.scanner.URLDeploymentScanner] Incomplete Deployment listing:
Right now for testing I haven't deployed any application in this folder. I just have an XML file containing SQL Server datasource information.
-
12. Re: Multiple application instances on same server JBoss 4.2.3 4.2.2
peterj Feb 14, 2011 1:23 PM (in response to veeramuthiah)Apparently <server name> (as in /C:/jboss-4.2.3.GA/server/<server name>) does not exist. Double-check the spelling of the -c parameter pass to run.bat.
By the way, I hope that "<server name>" is an obfuscation of the real name, and that it is not the text that you actually typed.
-
13. Multiple application instances on same server JBoss 4.2.3 4.2.2
veeramuthiah Feb 14, 2011 1:33 PM (in response to peterj)Yes. <server Name> is not the real server name.
I have the server name as App7 and I have checked the spelling. Following is the command that I execute.
C:\jboss-4.2.3.GA\bin>run.bat -c App7
App7 is under --> C:\jboss-4.2.3.GA\server\
-
14. Multiple application instances on same server JBoss 4.2.3 4.2.2
peterj Feb 14, 2011 1:47 PM (in response to veeramuthiah)I didn't read the error message carefully enough so the issue is not what I indicated earlier. It looks like the deployer doesn't know what to do with sql-ds.xml, which strikes me as strange since it should know that enything ending in -ds.xml is a datasource description. Perhaps there is something it doesn't like in that file - could you post the contents?