You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Dylan Vanderhoof <Dy...@semaphore.com> on 2008/03/03 20:42:45 UTC

Perl/Net::Stomp and multiple brokers

Does anybody have a hacked Net::Stomp they'd be willing to share for contacting multiple brokers?  Either a network, or failover, I'm not terribly picky about which at the moment.

-Dylan

Re: "WARNING: Transport failed" ... org.apache.activemq.transport.failover.FailoverTransport handleTransportFailure

Posted by James Strachan <ja...@gmail.com>.
Note that failover reconnected fine BTW

On 04/03/2008, James Strachan <ja...@gmail.com> wrote:
> It looks like the socket failed - could be thebroker thinking the
>  socket was inactive. You could try increasing or disabling the
>  inactivity timeout.
>
>
>  On 03/03/2008, Andrew <an...@oc384.net> wrote:
>  > Anyone know why this would happen?  Other clients connected simultaneously
>  >  don't disconnect.  Everything is on a simple LAN so no networking issues
>  >  should exist for one client and not others..
>  >  Thanks,
>  >  Andrew
>  >
>  >
>  >
>  >  Mar 3, 2008 3:00:55 PM
>  >  org.apache.activemq.transport.failover.FailoverTransport
>  >  handleTransportFailure
>  >  WARNING: Transport failed, attempting to automatically reconnect due to:
>  >  java.io.EOFException
>  >  java.io.EOFException
>  >         at java.io.DataInputStream.readInt(DataInputStream.java:375)
>  >         at
>  >  org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:26
>  >  8)
>  >         at
>  >  org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java
>  >  :192)
>  >         at
>  >  org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:184)
>  >         at
>  >  org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:172)
>  >         at java.lang.Thread.run(Thread.java:619)
>  >  Mar 3, 2008 3:00:56 PM
>  >  org.apache.activemq.transport.failover.FailoverTransport$1 iterate
>  >  INFO: Successfully reconnected to tcp://tupolev:61616
>  >
>  >  Mar 3, 2008 3:01:56 PM
>  >  org.apache.activemq.transport.failover.FailoverTransport
>  >  handleTransportFailure
>  >  WARNING: Transport failed, attempting to automatically reconnect due to:
>  >  java.io.EOFException
>  >  java.io.EOFException
>  >         at java.io.DataInputStream.readInt(DataInputStream.java:375)
>  >         at
>  >  org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:26
>  >  8)
>  >         at
>  >  org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java
>  >  :192)
>  >         at
>  >  org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:184)
>  >         at
>  >  org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:172)
>  >         at java.lang.Thread.run(Thread.java:619)
>  >  Mar 3, 2008 3:01:56 PM
>  >  org.apache.activemq.transport.failover.FailoverTransport$1 iterate
>  >  INFO: Successfully reconnected to tcp://tupolev:61616
>  >
>  >
>  >
>
>
>
> --
>  James
>  -------
>  http://macstrac.blogspot.com/
>
>  Open Source Integration
>  http://open.iona.com
>


-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://open.iona.com

RE: "WARNING: Transport failed" ... org.apache.activemq.transport.failover.FailoverTransport handleTransportFailure

Posted by Joe Fernandez <jo...@ttmsolutions.com>.
The SO_TIMEOUT is a standard java.net.Socket option. When set to a non-zero
value, the Socket read() call will block for only the amount of time
specified. If the timeout expires, the SocketTimeoutException will get
hurled, but the Socket connection should still be treated as active. A
timeout of zero (default) instructs the read to block indefinitely. 

The maxInactivityDuration is an OpenWire option that is used for detecting
dead sockets. There are cases where a Socket will never be notified that its
peer has gone away (e.g., its machine has been powered off or disconnected
from the net) so you implement something like maxInactivityDuration to
determine for yourself that the Socket has died. 

There is also the SO_KEEPALIVE standard java.net.Socket option, which when
set causes the underlying TCP stack to send a 'keepalive' probe to the
remote peer system if the connection has been idle for a specified amount of
time. The probe should provoke the peer to send back an ACK thus confirming
that the connection is okay. If the ACK is not received, then it confirms
the peer has gone away and the connection is dead. However, the keepalive
doesn't always work and that is why you sometimes want to implement
something more reliable (like maxInactivityDuration) at the application
layer. 

Joe
www.ttmsolutions.com



> -----Original Message-----
> From: Eric Rodriguez [mailto:toxicafunk@gmail.com]
> Sent: Friday, March 07, 2008 6:14 AM
> To: users@activemq.apache.org
> Subject: Re: "WARNING: Transport failed" ...
> org.apache.activemq.transport.failover.FailoverTransport
> handleTransportFailure
> 
> Is this timeout the same as the:
> 
> soTimeout (long) sets the SO_TIMEOUT value (in milliseconds) on the socket
> 
> configured on the TCP Transport and described here:
> http://activemq.apache.org/activemq-3-transport-configurations.html
> 
> I'm a bit confused about the different tiemouts that can be specified on
> a JMS solution.
> 
> Thanks,
> Eric
> 
> Andrew wrote:
> > That's all it was. Thanks.
> >
> > -----Original Message-----
> > From: James Strachan [mailto:james.strachan@gmail.com]
> > Sent: Tuesday, March 04, 2008 1:06 AM
> > To: users@activemq.apache.org
> > Subject: Re: "WARNING: Transport failed" ...
> > org.apache.activemq.transport.failover.FailoverTransport
> > handleTransportFailure
> >
> > It looks like the socket failed - could be thebroker thinking the
> > socket was inactive. You could try increasing or disabling the
> > inactivity timeout.
> >
> > On 03/03/2008, Andrew <an...@oc384.net> wrote:
> >> Anyone know why this would happen?  Other clients connected
> simultaneously
> >>  don't disconnect.  Everything is on a simple LAN so no networking
> issues
> >>  should exist for one client and not others..
> >>  Thanks,
> >>  Andrew
> >>
> >>
> >>
> >>  Mar 3, 2008 3:00:55 PM
> >>  org.apache.activemq.transport.failover.FailoverTransport
> >>  handleTransportFailure
> >>  WARNING: Transport failed, attempting to automatically reconnect due
> to:
> >>  java.io.EOFException
> >>  java.io.EOFException
> >>         at java.io.DataInputStream.readInt(DataInputStream.java:375)
> >>         at
> >>
> >
> org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:
> 26
> >>  8)
> >>         at
> >>
> >
> org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.ja
> va
> >>  :192)
> >>         at
> >>
> >
> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:184
> )
> >>         at
> >>
> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:172)
> >>         at java.lang.Thread.run(Thread.java:619)
> >>  Mar 3, 2008 3:00:56 PM
> >>  org.apache.activemq.transport.failover.FailoverTransport$1 iterate
> >>  INFO: Successfully reconnected to tcp://tupolev:61616
> >>
> >>  Mar 3, 2008 3:01:56 PM
> >>  org.apache.activemq.transport.failover.FailoverTransport
> >>  handleTransportFailure
> >>  WARNING: Transport failed, attempting to automatically reconnect due
> to:
> >>  java.io.EOFException
> >>  java.io.EOFException
> >>         at java.io.DataInputStream.readInt(DataInputStream.java:375)
> >>         at
> >>
> >
> org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:
> 26
> >>  8)
> >>         at
> >>
> >
> org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.ja
> va
> >>  :192)
> >>         at
> >>
> >
> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:184
> )
> >>         at
> >>
> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:172)
> >>         at java.lang.Thread.run(Thread.java:619)
> >>  Mar 3, 2008 3:01:56 PM
> >>  org.apache.activemq.transport.failover.FailoverTransport$1 iterate
> >>  INFO: Successfully reconnected to tcp://tupolev:61616
> >>
> >>
> >>
> >
> >


Re: "WARNING: Transport failed" ... org.apache.activemq.transport.failover.FailoverTransport handleTransportFailure

Posted by Eric Rodriguez <to...@gmail.com>.
Is this timeout the same as the:

soTimeout (long) sets the SO_TIMEOUT value (in milliseconds) on the socket

configured on the TCP Transport and described here:
http://activemq.apache.org/activemq-3-transport-configurations.html

I'm a bit confused about the different tiemouts that can be specified on 
a JMS solution.

Thanks,
Eric

Andrew wrote:
> That's all it was. Thanks.
> 
> -----Original Message-----
> From: James Strachan [mailto:james.strachan@gmail.com] 
> Sent: Tuesday, March 04, 2008 1:06 AM
> To: users@activemq.apache.org
> Subject: Re: "WARNING: Transport failed" ...
> org.apache.activemq.transport.failover.FailoverTransport
> handleTransportFailure
> 
> It looks like the socket failed - could be thebroker thinking the
> socket was inactive. You could try increasing or disabling the
> inactivity timeout.
> 
> On 03/03/2008, Andrew <an...@oc384.net> wrote:
>> Anyone know why this would happen?  Other clients connected simultaneously
>>  don't disconnect.  Everything is on a simple LAN so no networking issues
>>  should exist for one client and not others..
>>  Thanks,
>>  Andrew
>>
>>
>>
>>  Mar 3, 2008 3:00:55 PM
>>  org.apache.activemq.transport.failover.FailoverTransport
>>  handleTransportFailure
>>  WARNING: Transport failed, attempting to automatically reconnect due to:
>>  java.io.EOFException
>>  java.io.EOFException
>>         at java.io.DataInputStream.readInt(DataInputStream.java:375)
>>         at
>>
> org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:26
>>  8)
>>         at
>>
> org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java
>>  :192)
>>         at
>>
> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:184)
>>         at
>>  org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:172)
>>         at java.lang.Thread.run(Thread.java:619)
>>  Mar 3, 2008 3:00:56 PM
>>  org.apache.activemq.transport.failover.FailoverTransport$1 iterate
>>  INFO: Successfully reconnected to tcp://tupolev:61616
>>
>>  Mar 3, 2008 3:01:56 PM
>>  org.apache.activemq.transport.failover.FailoverTransport
>>  handleTransportFailure
>>  WARNING: Transport failed, attempting to automatically reconnect due to:
>>  java.io.EOFException
>>  java.io.EOFException
>>         at java.io.DataInputStream.readInt(DataInputStream.java:375)
>>         at
>>
> org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:26
>>  8)
>>         at
>>
> org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java
>>  :192)
>>         at
>>
> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:184)
>>         at
>>  org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:172)
>>         at java.lang.Thread.run(Thread.java:619)
>>  Mar 3, 2008 3:01:56 PM
>>  org.apache.activemq.transport.failover.FailoverTransport$1 iterate
>>  INFO: Successfully reconnected to tcp://tupolev:61616
>>
>>
>>
> 
> 

RE: "WARNING: Transport failed" ... org.apache.activemq.transport.failover.FailoverTransport handleTransportFailure

Posted by Andrew <an...@oc384.net>.
That's all it was. Thanks.

-----Original Message-----
From: James Strachan [mailto:james.strachan@gmail.com] 
Sent: Tuesday, March 04, 2008 1:06 AM
To: users@activemq.apache.org
Subject: Re: "WARNING: Transport failed" ...
org.apache.activemq.transport.failover.FailoverTransport
handleTransportFailure

It looks like the socket failed - could be thebroker thinking the
socket was inactive. You could try increasing or disabling the
inactivity timeout.

On 03/03/2008, Andrew <an...@oc384.net> wrote:
> Anyone know why this would happen?  Other clients connected simultaneously
>  don't disconnect.  Everything is on a simple LAN so no networking issues
>  should exist for one client and not others..
>  Thanks,
>  Andrew
>
>
>
>  Mar 3, 2008 3:00:55 PM
>  org.apache.activemq.transport.failover.FailoverTransport
>  handleTransportFailure
>  WARNING: Transport failed, attempting to automatically reconnect due to:
>  java.io.EOFException
>  java.io.EOFException
>         at java.io.DataInputStream.readInt(DataInputStream.java:375)
>         at
>
org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:26
>  8)
>         at
>
org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java
>  :192)
>         at
>
org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:184)
>         at
>  org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:172)
>         at java.lang.Thread.run(Thread.java:619)
>  Mar 3, 2008 3:00:56 PM
>  org.apache.activemq.transport.failover.FailoverTransport$1 iterate
>  INFO: Successfully reconnected to tcp://tupolev:61616
>
>  Mar 3, 2008 3:01:56 PM
>  org.apache.activemq.transport.failover.FailoverTransport
>  handleTransportFailure
>  WARNING: Transport failed, attempting to automatically reconnect due to:
>  java.io.EOFException
>  java.io.EOFException
>         at java.io.DataInputStream.readInt(DataInputStream.java:375)
>         at
>
org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:26
>  8)
>         at
>
org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java
>  :192)
>         at
>
org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:184)
>         at
>  org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:172)
>         at java.lang.Thread.run(Thread.java:619)
>  Mar 3, 2008 3:01:56 PM
>  org.apache.activemq.transport.failover.FailoverTransport$1 iterate
>  INFO: Successfully reconnected to tcp://tupolev:61616
>
>
>


-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://open.iona.com


Re: "WARNING: Transport failed" ... org.apache.activemq.transport.failover.FailoverTransport handleTransportFailure

Posted by James Strachan <ja...@gmail.com>.
It looks like the socket failed - could be thebroker thinking the
socket was inactive. You could try increasing or disabling the
inactivity timeout.

On 03/03/2008, Andrew <an...@oc384.net> wrote:
> Anyone know why this would happen?  Other clients connected simultaneously
>  don't disconnect.  Everything is on a simple LAN so no networking issues
>  should exist for one client and not others..
>  Thanks,
>  Andrew
>
>
>
>  Mar 3, 2008 3:00:55 PM
>  org.apache.activemq.transport.failover.FailoverTransport
>  handleTransportFailure
>  WARNING: Transport failed, attempting to automatically reconnect due to:
>  java.io.EOFException
>  java.io.EOFException
>         at java.io.DataInputStream.readInt(DataInputStream.java:375)
>         at
>  org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:26
>  8)
>         at
>  org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java
>  :192)
>         at
>  org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:184)
>         at
>  org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:172)
>         at java.lang.Thread.run(Thread.java:619)
>  Mar 3, 2008 3:00:56 PM
>  org.apache.activemq.transport.failover.FailoverTransport$1 iterate
>  INFO: Successfully reconnected to tcp://tupolev:61616
>
>  Mar 3, 2008 3:01:56 PM
>  org.apache.activemq.transport.failover.FailoverTransport
>  handleTransportFailure
>  WARNING: Transport failed, attempting to automatically reconnect due to:
>  java.io.EOFException
>  java.io.EOFException
>         at java.io.DataInputStream.readInt(DataInputStream.java:375)
>         at
>  org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:26
>  8)
>         at
>  org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java
>  :192)
>         at
>  org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:184)
>         at
>  org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:172)
>         at java.lang.Thread.run(Thread.java:619)
>  Mar 3, 2008 3:01:56 PM
>  org.apache.activemq.transport.failover.FailoverTransport$1 iterate
>  INFO: Successfully reconnected to tcp://tupolev:61616
>
>
>


-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://open.iona.com

"WARNING: Transport failed" ... org.apache.activemq.transport.failover.FailoverTransport handleTransportFailure

Posted by Andrew <an...@oc384.net>.
Anyone know why this would happen?  Other clients connected simultaneously
don't disconnect.  Everything is on a simple LAN so no networking issues
should exist for one client and not others..
Thanks,
Andrew



Mar 3, 2008 3:00:55 PM
org.apache.activemq.transport.failover.FailoverTransport
handleTransportFailure
WARNING: Transport failed, attempting to automatically reconnect due to:
java.io.EOFException
java.io.EOFException
	at java.io.DataInputStream.readInt(DataInputStream.java:375)
	at
org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:26
8)
	at
org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java
:192)
	at
org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:184)
	at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:172)
	at java.lang.Thread.run(Thread.java:619)
Mar 3, 2008 3:00:56 PM
org.apache.activemq.transport.failover.FailoverTransport$1 iterate
INFO: Successfully reconnected to tcp://tupolev:61616

Mar 3, 2008 3:01:56 PM
org.apache.activemq.transport.failover.FailoverTransport
handleTransportFailure
WARNING: Transport failed, attempting to automatically reconnect due to:
java.io.EOFException
java.io.EOFException
	at java.io.DataInputStream.readInt(DataInputStream.java:375)
	at
org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:26
8)
	at
org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java
:192)
	at
org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:184)
	at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:172)
	at java.lang.Thread.run(Thread.java:619)
Mar 3, 2008 3:01:56 PM
org.apache.activemq.transport.failover.FailoverTransport$1 iterate
INFO: Successfully reconnected to tcp://tupolev:61616



RE: Perl/Net::Stomp and multiple brokers

Posted by Dylan Vanderhoof <Dy...@semaphore.com>.
Nobody's done this?  I could've sworn I saw at least one person mention that'd added failover support to Net::Stomp, but I can't find that email right now.

-D

> -----Original Message-----
> From: Dylan Vanderhoof [mailto:DylanV@semaphore.com]
> Sent: Monday, March 03, 2008 11:43 AM
> To: 'users@activemq.apache.org'
> Subject: Perl/Net::Stomp and multiple brokers
>
>
> Does anybody have a hacked Net::Stomp they'd be willing to
> share for contacting multiple brokers?  Either a network, or
> failover, I'm not terribly picky about which at the moment.
>
> -Dylan
>