activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dhawan, Vikram \(LNG-DAY\)" <vikram.dha...@lexisnexis.com>
Subject RE: Load Balancer configuration
Date Wed, 11 Apr 2007 13:57:20 GMT
Hi James,

Thanks for your help and suggestion here. But this brings another
concern. 

There is always a possibility that some one can write a client app which
connects to AMQ on any of the real AMQ ports (61616/61613/61617 in
sample configuration) and disconnects the same way as Load Balancer is
doing. And what appears to me is this will cause AMQ to throw exceptions
like following, and which will result AMQ going out of memory. 

Looking forward to hear your thought.


ERROR TransportConnector             - Could not accept connection from
/testserver:50528: javax.net.ssl.SSLHandshakeException: Remote host
closed connection during handshake
javax.net.ssl.SSLHandshakeException: Remote host closed connection
during handshake	at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java
:742) 	at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSo
cketImpl.java:1030)
	at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.jav
a:622)
	at
com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:
59)
	at
org.apache.activemq.transport.tcp.TcpBufferedOutputStream.flush(TcpBuffe
redOutputStream.java:109)
	at java.io.DataOutputStream.flush(DataOutputStream.java:106)
	at
org.apache.activemq.transport.tcp.TcpTransport.oneway(TcpTransport.java:
119)
	at
org.apache.activemq.transport.InactivityMonitor.oneway(InactivityMonitor
.java:141)
	at
org.apache.activemq.transport.WireFormatNegotiator.sendWireFormat(WireFo
rmatNegotiator.java:155)
	at
org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegot
iator.java:73)
	at
org.apache.activemq.transport.TransportFilter.start(TransportFilter.java
:54)
	at
org.apache.activemq.broker.TransportConnection.start(TransportConnection
.java:816)
	at
org.apache.activemq.broker.TransportConnector$1.onAccept(TransportConnec
tor.java:148)
	at
org.apache.activemq.transport.tcp.TcpTransportServer.run(TcpTransportSer
ver.java:167)
	at java.lang.Thread.run(Thread.java:595)
Caused by: java.io.EOFException: SSL peer shut down incorrectly
	at
com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:333)
	at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java
:723)
	... 14 more

Vik
-----Original Message-----
From: James Strachan [mailto:james.strachan@gmail.com] 
Sent: Monday, April 09, 2007 6:24 PM
To: dev@activemq.apache.org
Subject: Re: Load Balancer configuration

It seems kinda strange to use a ping on a totally separate socket to
decide if another socket can be used. Sounds like a crappy load
balancer to me; can't you just disable the pointless ping and let the
load balancer use a broker/socket until it becomes unresponsive? If
you must have some kinda ping, it should be trivial to write your own
ping POJO and add it to the broker as an interceptor or a Spring bean
(since the ping has nothing at all to do with the broker, its just a
test that the VM is still running)



On 4/9/07, Dhawan, Vikram (LNG-DAY) <vikram.dhawan@lexisnexis.com>
wrote:
> Hey James,
>
> BTW... I just wanted to let you know that I am not overcrowding the
same
> socket. Clients are connecting on 61616 and 61613 and I am using 61617
> for load balancer ping.
>
> I will appreciate your help, if you can suggest me what is the ideal
way
> to configure AMQ in this type of environment.
>
> Thanks!
>
> Vik
>
> Hi James,
>
> Actually my AMQ clients are connecting to a VIP which is the load
> balancers IP, and load balancer wants to ping and checks the AMQ
> instance status before it routes the client call. That's why Load
> balancer is sending ping to AMQ instances.
>
> Any idea, how should I configure AMQ instances.
>
> Thanks!
>
> Vik
>
> The ActiveMQ client sends ping commands anyway, so why does the load
> balancer need to shove stuff down the same socket?
>
> On 4/9/07, Dhawan, Vikram (LNG-DAY) <vikram.dhawan@lexisnexis.com>
> wrote:
> > Hi,
> >
> >
> >
> > I am trying to configure multiple AMQ instances with a Load balancer
> > configuration for High availability. Load balancer I am using wants
to
> > Ping AMQ instances to do the keep-alive check.  I tried to set that
> > keep-alive port to 61617/61616. every time Load Balancer pings, AMQ
> > throws exception because this is not a real OpenWire/SSL
> communication;
> > but this approach works for few Hrs.
> >
> >
> >
> > But after some time AMQ gets tired of this ping and throws
OutofMemory
> > exception. I guess AMQ is growing in memory every time it throws the
> > connection exception and not cleaning up properly.
> >
> >
> >
> > My question is how to manage such a configuration where AMQ's are
> > configured behind a load balancer.
> >
> >
> >
> > Thanks!
> >
> >
> >
> >
> >
> > Vik
> >
> >
> >
> >
>
>
> --
>
> James
> -------
> http://radio.weblogs.com/0112098/
>


-- 

James
-------
http://radio.weblogs.com/0112098/

Mime
View raw message