Hi,
   We use amazon elb for our activemq service, so we can modify activemq
master-slave node dynamically.     
Here is our broker url:
  
failover:(tcp://internal-wfmdev-trust-mq-2028363801.ap-northeast-1.elb.amazonaws.com:61116)

   But we faced a problem, the amazon elb will auto sacle so than the dns ip
will change sometimes. I have checked activemq client code,
org.apache.activemq.transport.tcp.TcpTransport will hold an old dataIn
object until the old ip, so message will be blocked when elb is sacling, the
old dataIn object will not re-create until old ip is not avaliable.

    Here is the error log
    [2015-12-25 19:43:23,629]-[ActiveMQ Transport:
tcp://internal-WFMaaS-Trust-ActiveMq-1305565828.eu-west-1.elb.amazonaws.com/172.2.0.249:61116@32931]-[]-[org.apache.activemq.transport.failover.FailoverTransport.handleTransportFailure(FailoverTransport.java:267)]-[WARN]
Transport
(tcp://internal-WFMaaS-Trust-ActiveMq-1305565828.eu-west-1.elb.amazonaws.com/172.2.0.249:61116@32931)
failed, attempting to automatically reconnect
java.net.SocketException: No route to host
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
        at java.net.SocketInputStream.read(SocketInputStream.java:170)
        at java.net.SocketInputStream.read(SocketInputStream.java:141)
        at
org.apache.activemq.transport.tcp.TcpBufferedInputStream.fill(TcpBufferedInputStream.java:50)
        at
org.apache.activemq.transport.tcp.TcpTransport$2.fill(TcpTransport.java:609)
        at
org.apache.activemq.transport.tcp.TcpBufferedInputStream.read(TcpBufferedInputStream.java:58)
        at
org.apache.activemq.transport.tcp.TcpTransport$2.read(TcpTransport.java:594)
        at java.io.DataInputStream.readInt(DataInputStream.java:387)
        at
org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:258)
        at
org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:221)
        at
org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:213)
        at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:196)
        at java.lang.Thread.run(Thread.java:745)



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Problem-with-failover-transport-and-amazon-elb-tp4705462.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to