You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by nilesh p <ni...@gmail.com> on 2009/06/11 13:34:52 UTC

[users@httpd] Apache with multiple instance of jboss on same server

Hi,

We have Apache Web server which is to be linked to 2 jboss instances on the
same server.
We have made the entries in workers.properties file but what changes need to
be done in Jboss so that both instances are picked up by Apache load
balancer?
I tried changing Connector port="8009" to 8007 for the second instance but
it doesnt seem to work.

Can anyone please help me out with this?

Regards,
Nilesh
-- 
View this message in context: http://www.nabble.com/Apache-with-multiple-instance-of-jboss-on-same-server-tp23979597p23979597.html
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache with multiple instance of jboss on same server

Posted by Tom Evans <te...@googlemail.com>.
On Thu, 2009-06-11 at 04:34 -0700, nilesh p wrote:
> Hi,
> 
> We have Apache Web server which is to be linked to 2 jboss instances on the
> same server.
> We have made the entries in workers.properties file but what changes need to
> be done in Jboss so that both instances are picked up by Apache load
> balancer?
> I tried changing Connector port="8009" to 8007 for the second instance but
> it doesnt seem to work.
> 
> Can anyone please help me out with this?
> 
> Regards,
> Nilesh

Can you provide any of your configuration? I'd absolutely love to guess,
but I left my magic guessing hat at home.

Cheers

Tom


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: Apache with multiple instance of jboss on same server

Posted by Tom Evans <te...@googlemail.com>.
On Thu, 2009-06-11 at 06:12 -0700, nilesh p wrote:
> :)
> Its like this, 
> 
> My workers.properties file is as below
> 
> worker.list=loadbalancer
> 
> 
> worker.loadbalancer.type=lb
> #worker.loadbalancer.balance_workers=server1,server2,server3
> worker.loadbalancer.balance_workers=server2,server3,server4,server5
> worker.loadbalancer.sticky_session=true
> 
> # Set properties for worker 'server1' (ajp13)
> #worker.server1.type=ajp13
> #worker.server1.host=IP1
> #worker.server1.port=8009
> 
> #worker.server1.cachesize=10
> #worker.server1.cache_timeout=600
> #worker.server1.socket_keepalive=1
> #worker.server1.reclycle_timeout=300
> 
> # Set properties for worker 'server2' (ajp13)
> worker.server2.type=ajp13
> worker.server2.host=IP2
> worker.server2.port=8009
> 
> worker.server2.cachesize=10
> worker.server2.cache_timeout=600
> worker.server2.socket_keepalive=1
> worker.server2.reclycle_timeout=300
> 
> # Set properties for worker 'server3' (ajp13)
> worker.server3.type=ajp13
> worker.server3.host=IP3
> worker.server3.port=8009
> 
> worker.server3.cachesize=10
> worker.server3.cache_timeout=600
> worker.server3.socket_keepalive=1
> worker.server3.reclycle_timeout=300
> 
> # Set properties for worker 'server4' (ajp13)
> worker.server4.type=ajp13
> worker.server4.host=IP4
> worker.server4.port=8009
> 
> worker.server4.cachesize=10
> worker.server4.cache_timeout=600
> worker.server4.socket_keepalive=1
> worker.server4.reclycle_timeout=300
> 
> # Set properties for worker 'server5' (ajp13)
> worker.server5.type=ajp13
> worker.server5.host=IP4
> worker.server5.port=8009
> 
> worker.server5.cachesize=10
> worker.server5.cache_timeout=600
> worker.server5.socket_keepalive=1
> worker.server5.reclycle_timeout=300
> 
> 
> As you can see, Server4 and Server5 have the same IP (IP4) and both are
> jboss instances.
> On the IP4 server(linux box), i have copied two exactly same instances of
> Jboss.
> In the server.xml file of 1st jboss instance all configurations are default
> config (8080)
> whereas in the server.xml of 2nd jboss instance, i have changed port to
> 9080.Thats it.
> now when i start only 1st Jboss instance, it works pretty fine but when i
> start the 2nd instance, the application starts to crash. I have given
> XMX=XMS=1024m for both the instances and the server has 4 gb of physical
> memory.
> 
> I can view the WEB-CONSOLE of 1st jboss instance and find 10 connections.
> I am not very clear if apache is actually using the 2nd instance and why
> does the application crash
> the error that i get is "Your Application session has expired or an
> unexpected error has occured!!!"
> 
> Can anyone help me out ? :(
> 

I thought you were asking about apache httpd server configuration? Those
all look like JBoss configuration - JBoss configuration/application
crashes are best debugged on the JBoss lists btw. 

Please provide your apache configuration, or at least some indication of
what it is.

Cheers

Tom




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: Apache with multiple instance of jboss on same server

Posted by André Warnier <aw...@ice-sa.com>.
Hi.
The configuration you provide below does not seem to make much sense.
Why do you have 2 workers (4 and 5), connecting to the /same/ back-end 
(IP4) on the same port (8009) ?
No wonder something is getting confused.

I have not cross-checked the rest, but generally speaking :

1 "worker", port X at Apache level <--> 1 <Connector, AJP, port X> at 
the Tomcat/JBoss level.

The HTTP connectors at the Tomcat/JBoss level have no role in this, only 
the AJP <Connectors>.
And each instance must have different ports.



nilesh p wrote:
> :)
> Its like this, 
> 
> My workers.properties file is as below
> 
> worker.list=loadbalancer
> 
> 
> worker.loadbalancer.type=lb
> #worker.loadbalancer.balance_workers=server1,server2,server3
> worker.loadbalancer.balance_workers=server2,server3,server4,server5
> worker.loadbalancer.sticky_session=true
> 
> # Set properties for worker 'server1' (ajp13)
> #worker.server1.type=ajp13
> #worker.server1.host=IP1
> #worker.server1.port=8009
> 
> #worker.server1.cachesize=10
> #worker.server1.cache_timeout=600
> #worker.server1.socket_keepalive=1
> #worker.server1.reclycle_timeout=300
> 
> # Set properties for worker 'server2' (ajp13)
> worker.server2.type=ajp13
> worker.server2.host=IP2
> worker.server2.port=8009
> 
> worker.server2.cachesize=10
> worker.server2.cache_timeout=600
> worker.server2.socket_keepalive=1
> worker.server2.reclycle_timeout=300
> 
> # Set properties for worker 'server3' (ajp13)
> worker.server3.type=ajp13
> worker.server3.host=IP3
> worker.server3.port=8009
> 
> worker.server3.cachesize=10
> worker.server3.cache_timeout=600
> worker.server3.socket_keepalive=1
> worker.server3.reclycle_timeout=300
> 
> # Set properties for worker 'server4' (ajp13)
> worker.server4.type=ajp13
> worker.server4.host=IP4
> worker.server4.port=8009
> 
> worker.server4.cachesize=10
> worker.server4.cache_timeout=600
> worker.server4.socket_keepalive=1
> worker.server4.reclycle_timeout=300
> 
> # Set properties for worker 'server5' (ajp13)
> worker.server5.type=ajp13
> worker.server5.host=IP4
> worker.server5.port=8009
> 
> worker.server5.cachesize=10
> worker.server5.cache_timeout=600
> worker.server5.socket_keepalive=1
> worker.server5.reclycle_timeout=300
> 
> 
> As you can see, Server4 and Server5 have the same IP (IP4) and both are
> jboss instances.
> On the IP4 server(linux box), i have copied two exactly same instances of
> Jboss.
> In the server.xml file of 1st jboss instance all configurations are default
> config (8080)
> whereas in the server.xml of 2nd jboss instance, i have changed port to
> 9080.Thats it.
> now when i start only 1st Jboss instance, it works pretty fine but when i
> start the 2nd instance, the application starts to crash. I have given
> XMX=XMS=1024m for both the instances and the server has 4 gb of physical
> memory.
> 
> I can view the WEB-CONSOLE of 1st jboss instance and find 10 connections.
> I am not very clear if apache is actually using the 2nd instance and why
> does the application crash
> the error that i get is "Your Application session has expired or an
> unexpected error has occured!!!"
> 
> Can anyone help me out ? :(
> 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: Apache with multiple instance of jboss on same server

Posted by nilesh p <ni...@gmail.com>.
:)
Its like this, 

My workers.properties file is as below

worker.list=loadbalancer


worker.loadbalancer.type=lb
#worker.loadbalancer.balance_workers=server1,server2,server3
worker.loadbalancer.balance_workers=server2,server3,server4,server5
worker.loadbalancer.sticky_session=true

# Set properties for worker 'server1' (ajp13)
#worker.server1.type=ajp13
#worker.server1.host=IP1
#worker.server1.port=8009

#worker.server1.cachesize=10
#worker.server1.cache_timeout=600
#worker.server1.socket_keepalive=1
#worker.server1.reclycle_timeout=300

# Set properties for worker 'server2' (ajp13)
worker.server2.type=ajp13
worker.server2.host=IP2
worker.server2.port=8009

worker.server2.cachesize=10
worker.server2.cache_timeout=600
worker.server2.socket_keepalive=1
worker.server2.reclycle_timeout=300

# Set properties for worker 'server3' (ajp13)
worker.server3.type=ajp13
worker.server3.host=IP3
worker.server3.port=8009

worker.server3.cachesize=10
worker.server3.cache_timeout=600
worker.server3.socket_keepalive=1
worker.server3.reclycle_timeout=300

# Set properties for worker 'server4' (ajp13)
worker.server4.type=ajp13
worker.server4.host=IP4
worker.server4.port=8009

worker.server4.cachesize=10
worker.server4.cache_timeout=600
worker.server4.socket_keepalive=1
worker.server4.reclycle_timeout=300

# Set properties for worker 'server5' (ajp13)
worker.server5.type=ajp13
worker.server5.host=IP4
worker.server5.port=8009

worker.server5.cachesize=10
worker.server5.cache_timeout=600
worker.server5.socket_keepalive=1
worker.server5.reclycle_timeout=300


As you can see, Server4 and Server5 have the same IP (IP4) and both are
jboss instances.
On the IP4 server(linux box), i have copied two exactly same instances of
Jboss.
In the server.xml file of 1st jboss instance all configurations are default
config (8080)
whereas in the server.xml of 2nd jboss instance, i have changed port to
9080.Thats it.
now when i start only 1st Jboss instance, it works pretty fine but when i
start the 2nd instance, the application starts to crash. I have given
XMX=XMS=1024m for both the instances and the server has 4 gb of physical
memory.

I can view the WEB-CONSOLE of 1st jboss instance and find 10 connections.
I am not very clear if apache is actually using the 2nd instance and why
does the application crash
the error that i get is "Your Application session has expired or an
unexpected error has occured!!!"

Can anyone help me out ? :(

-- 
View this message in context: http://www.nabble.com/Apache-with-multiple-instance-of-jboss-on-same-server-tp23979597p23981040.html
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache with multiple instance of jboss on same server

Posted by Sushant Gulati <su...@gmail.com>.
Hey Andre,

Thanks a lot for your suggestions.

Nilesh,

Always, please check the official links like the one's suggested by Andre.
They are always the best place to start. Hope you can figure out the error
in the configuration, which I am sure would be minor.
Otherwise we are all here to help each other.

Regards,
Sushant


On Thu, Jun 11, 2009 at 9:11 PM, André Warnier <aw...@ice-sa.com> wrote:

> Sushant Gulati wrote:
> ...
>  This list does
>
>> not allow discussions about Jboss configuration.
>>
>
> It is not that the list does not /allow/ discussions about JBoss.
> It is that JBoss is another software product, for which people here are
> probably not competent. And they know it, so they do not want to give bad
> recommendations.
>
> Send a seperate email
>
>> regarding JBoss to me/JBoss discussion groups.
>>
>
> That is a good recommendation, because as far as JBoss is concerned, the OP
> will get much better answers there.
>
>  Once you are able to run multiple Jboss instances, then we can come back
>> to
>> this list with details regarding JBoss+apache connection using mod_jk.
>>
>
> mod_jk is really part of the Apache Tomcat project, so the Tomcat list may
> be a better place.  The Tomcat website is where you will find the mod_jk
> documentation, which is always a good place to start.
> http://tomcat.apache.org/connectors-doc/
> There are how-to's, a wiki, example configurations etc..
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>  "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] Apache with multiple instance of jboss on same server

Posted by André Warnier <aw...@ice-sa.com>.
Sushant Gulati wrote:
...
  This list does
> not allow discussions about Jboss configuration. 

It is not that the list does not /allow/ discussions about JBoss.
It is that JBoss is another software product, for which people here are 
probably not competent. And they know it, so they do not want to give 
bad recommendations.

Send a seperate email
> regarding JBoss to me/JBoss discussion groups.

That is a good recommendation, because as far as JBoss is concerned, the 
OP will get much better answers there.

> Once you are able to run multiple Jboss instances, then we can come back to
> this list with details regarding JBoss+apache connection using mod_jk.

mod_jk is really part of the Apache Tomcat project, so the Tomcat list 
may be a better place.  The Tomcat website is where you will find the 
mod_jk documentation, which is always a good place to start.
http://tomcat.apache.org/connectors-doc/
There are how-to's, a wiki, example configurations etc..

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache with multiple instance of jboss on same server

Posted by Sushant Gulati <su...@gmail.com>.
Nilesh,

The two JBoss instances need to be on different ports in case they are
running on the same physical server with one IP address. Your
workers.properties file has a discrepancy regarding the server4 and server5
workers.

Before working on Apache tomcat connector configuration, try running the two
Jboss server instances simultaneously on the same server. If you succeed in
that, the Apache+tomcat+mod_jk configuration is straight forward.

Let me know if you need help regarding Jboss configurations. This list does
not allow discussions about Jboss configuration. Send a seperate email
regarding JBoss to me/JBoss discussion groups.
Once you are able to run multiple Jboss instances, then we can come back to
this list with details regarding JBoss+apache connection using mod_jk.

Regards,
Sushant


On Thu, Jun 11, 2009 at 5:04 PM, nilesh p <ni...@gmail.com> wrote:

>
> Hi,
>
> We have Apache Web server which is to be linked to 2 jboss instances on the
> same server.
> We have made the entries in workers.properties file but what changes need
> to
> be done in Jboss so that both instances are picked up by Apache load
> balancer?
> I tried changing Connector port="8009" to 8007 for the second instance but
> it doesnt seem to work.
>
> Can anyone please help me out with this?
>
> Regards,
> Nilesh
> --
> View this message in context:
> http://www.nabble.com/Apache-with-multiple-instance-of-jboss-on-same-server-tp23979597p23979597.html
> Sent from the Apache HTTP Server - Users mailing list archive at
> Nabble.com.
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>