You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by suri009 <su...@diagonal-consulting.com> on 2006/11/20 16:47:14 UTC
Exception on client connection
I get this exception when my client try to connect to broker in a different
machine. My client does not get this exception every time, but they get once
in every 4 attempts. Clients are testing the system so they are doing
connect/disconnects. Do i need to change any configuration to avoid this
exception?
Is my below configuration of activemq broker, publisher and subscriber
correct?
<transportConnectors>
<transportConnector name="default"
uri="tcp://170.19.18.141:61616?soTimeout=10000&connectionTimeout=30000"
discoveryUri="multicast://172.19.18.157"/>
</transportConnectors>
client (Topic subscriber) is connecting using uri:
tcp://170.19.18.141:61616?wireFormat.maxInactivityDuration=0
Server (Topic Publisher) is connecting using uri:
failover:(tcp://172.19.18.157:61616)?jms.useAsyncSend=true&wireFormat.maxInactivityDuration=0
javax.jms.JMSException: Wire format negociation timeout: peer did not send
his w
ire format.
at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSuppo
rt.java:58)
at
org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnect
ion.java:1125)
at
org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(Activ
eMQConnection.java:1203)
at
org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnecti
on.java:272)
at
org.apache.activemq.ActiveMQConnection.createTopicSession(ActiveMQCon
nection.java:904)
at
com.baa.tg.commons.jms.JmsMessageReceiver.initialize(JmsMessageReceiv
er.java:101)
at
com.baa.tg.commons.jms.JmsMessageReceiver.startReceiver(JmsMessageRec
eiver.java:58)
at com.test.tg.client.awt.JFMain$3.run(JFMain.java:249)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:242)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:163)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Caused by: java.io.IOException: Wire format negociation timeout: peer did
not se
nd his wire format.
at
org.apache.activemq.transport.WireFormatNegotiator.oneway(WireFormatN
egotiator.java:82)
at
org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.ja
va:45)
at
org.apache.activemq.transport.ResponseCorrelator.asyncRequest(Respons
eCorrelator.java:67)
at
org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorr
elator.java:72)
at
org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnect
ion.java:1115)
... 17 more
--
View this message in context: http://www.nabble.com/Exception-on-client-connection-tf2669782.html#a7444710
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Exception on client connection
Posted by James Strachan <ja...@gmail.com>.
On 11/30/06, suri009 <su...@diagonal-consulting.com> wrote:
>
>
> James, I observed that memory is not the case all the time. When my clients
> gets the wireformat exception even though there is enough memory. As
> suggested by you before it might be my network.
If the broker runs out of memory it could send that exception back to
the jms client. So it could be your broker JVM is running out of ram.
Whats your heap size? Do you see the OutOfMemoryException on the
broker?
--
James
-------
http://radio.weblogs.com/0112098/
Re: Exception on client connection
Posted by suri009 <su...@diagonal-consulting.com>.
James, I observed that memory is not the case all the time. When my clients
gets the wireformat exception even though there is enough memory. As
suggested by you before it might be my network.
Could you let us know if there any network issues/limitations (or the way
network needs to be configured ) that we need to consider before deploying
activeMq as broker? Any pointer would be helpful.
James.Strachan wrote:
>
>
> Yes. Is it the broker running out of memory or the clients? This does
> look like the cause - try increase your heap.
>
> --
>
> James
> -------
> http://radio.weblogs.com/0112098/
>
>
--
View this message in context: http://www.nabble.com/Exception-on-client-connection-tf2669782.html#a7622305
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Exception on client connection
Posted by James Strachan <ja...@gmail.com>.
On 11/29/06, suri009 <su...@diagonal-consulting.com> wrote:
>
>
> James,
>
> I get OutOfMemoryError's in activemq log. Do you think this might be the
> reason to throw wireformat exception to my clients?
>
> Exception in thread "ActiveMQ Transport: tcp:///172.19.18.141:57219"
> java.lang.OutOfMemoryError: Java heap space
> Exception in thread "ActiveMQ Transport: tcp:///172.19.18.141:57220"
> java.lang.OutOfMemoryError: Java heap space
> Exception in thread "ActiveMQ Transport: tcp:///172.19.18.141:57221"
> java.lang.OutOfMemoryError: Java heap space
> Exception in thread "ActiveMQ Transport: tcp:///172.19.18.141:57222"
> java.lang.OutOfMemoryError: Java heap space
Yes. Is it the broker running out of memory or the clients? This does
look like the cause - try increase your heap.
--
James
-------
http://radio.weblogs.com/0112098/
Re: Exception on client connection
Posted by suri009 <su...@diagonal-consulting.com>.
James,
I get OutOfMemoryError's in activemq log. Do you think this might be the
reason to throw wireformat exception to my clients?
Exception in thread "ActiveMQ Transport: tcp:///172.19.18.141:57219"
java.lang.OutOfMemoryError: Java heap space
Exception in thread "ActiveMQ Transport: tcp:///172.19.18.141:57220"
java.lang.OutOfMemoryError: Java heap space
Exception in thread "ActiveMQ Transport: tcp:///172.19.18.141:57221"
java.lang.OutOfMemoryError: Java heap space
Exception in thread "ActiveMQ Transport: tcp:///172.19.18.141:57222"
java.lang.OutOfMemoryError: Java heap space
Thanks,
Suri
James.Strachan wrote:
>
> So you're definitely not using any multicast or discovery at all - so
> if you get exceptions either the broker has failed / been killed or
> there's something wonky with your network (firewall or router issues?)
>
> You can get around this by using failover...
> http://incubator.apache.org/activemq/failover-transport-reference.html
>
> e.g. use the client side URI...
>
> failover:tcp://172.19.18.141:61616.
>
>
--
View this message in context: http://www.nabble.com/Exception-on-client-connection-tf2669782.html#a7607816
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Exception on client connection
Posted by James Strachan <ja...@gmail.com>.
So you're definitely not using any multicast or discovery at all - so
if you get exceptions either the broker has failed / been killed or
there's something wonky with your network (firewall or router issues?)
You can get around this by using failover...
http://incubator.apache.org/activemq/failover-transport-reference.html
e.g. use the client side URI...
failover:tcp://172.19.18.141:61616.
On 11/28/06, suri009 <su...@diagonal-consulting.com> wrote:
>
> This is the config XML that iam using:
>
> <beans xmlns="http://activemq.org/config/1.0">
> <bean
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
> <broker useJmx="false" persistent="false" brokerName="green1">
> <!-- Use the following to set the broker memory limit (in bytes) -->
> <memoryManager>
> <usageManager id="memory-manager" limit="20000000"/>
> </memoryManager>
>
> <!-- In ActiveMQ 4, you can setup destination policies -->
> <destinationPolicy>
> <policyMap><policyEntries>
>
> <policyEntry topic="FOO.>">
> <dispatchPolicy>
> <strictOrderDispatchPolicy />
> </dispatchPolicy>
> <subscriptionRecoveryPolicy>
> <lastImageSubscriptionRecoveryPolicy />
> </subscriptionRecoveryPolicy>
> </policyEntry>
> </policyEntries></policyMap>
> </destinationPolicy>
>
> <transportConnectors>
> <transportConnector name="default"
> uri="tcp://170.19.18.141:61616?soTimeout=10000&connectionTimeout=30000"
> />
> </transportConnectors>
>
> </broker>
> </beans>
>
> Java clients connect to broker using uri: tcp://172.19.18.141:61616.
>
> Thanks,
>
>
>
> So whats the XML you are using?
>
> On 11/28/06, suri009 <su...@diagonal-consulting.com> wrote:
> >
> >
> > Thanks for your reply. I have removed discoveryUri and i still get this
> > exception when clients are trying to connect to ActiveMq broker. Clients
> > get
> > this exception on every 3-4 attempts. Is there anyway i can avoid this
> > exception as my users use these clients to get the live updates and it is
> > very important that they should not get connection errors.
> >
> > Thanks,
> > Surya
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Exception-on-client-connection-tf2669782.html#a7587718
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>
--
James
-------
http://radio.weblogs.com/0112098/
Re: Exception on client connection
Posted by suri009 <su...@diagonal-consulting.com>.
This is the config XML that iam using:
<beans xmlns="http://activemq.org/config/1.0">
<bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
<broker useJmx="false" persistent="false" brokerName="green1">
<!-- Use the following to set the broker memory limit (in bytes) -->
<memoryManager>
<usageManager id="memory-manager" limit="20000000"/>
</memoryManager>
<!-- In ActiveMQ 4, you can setup destination policies -->
<destinationPolicy>
<policyMap><policyEntries>
<policyEntry topic="FOO.>">
<dispatchPolicy>
<strictOrderDispatchPolicy />
</dispatchPolicy>
<subscriptionRecoveryPolicy>
<lastImageSubscriptionRecoveryPolicy />
</subscriptionRecoveryPolicy>
</policyEntry>
</policyEntries></policyMap>
</destinationPolicy>
<transportConnectors>
<transportConnector name="default"
uri="tcp://170.19.18.141:61616?soTimeout=10000&connectionTimeout=30000"
/>
</transportConnectors>
</broker>
</beans>
Java clients connect to broker using uri: tcp://172.19.18.141:61616.
Thanks,
So whats the XML you are using?
On 11/28/06, suri009 <su...@diagonal-consulting.com> wrote:
>
>
> Thanks for your reply. I have removed discoveryUri and i still get this
> exception when clients are trying to connect to ActiveMq broker. Clients
> get
> this exception on every 3-4 attempts. Is there anyway i can avoid this
> exception as my users use these clients to get the live updates and it is
> very important that they should not get connection errors.
>
> Thanks,
> Surya
>
>
--
View this message in context: http://www.nabble.com/Exception-on-client-connection-tf2669782.html#a7587718
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Exception on client connection
Posted by James Strachan <ja...@gmail.com>.
So whats the XML you are using?
On 11/28/06, suri009 <su...@diagonal-consulting.com> wrote:
>
>
> Thanks for your reply. I have removed discoveryUri and i still get this
> exception when clients are trying to connect to ActiveMq broker. Clients get
> this exception on every 3-4 attempts. Is there anyway i can avoid this
> exception as my users use these clients to get the live updates and it is
> very important that they should not get connection errors.
>
> Thanks,
> Surya
>
>
>
>
> >
> > no. if your not using muticast discovery you can omit the whole
> > discoveryUri attribute. That is only used to advertise a specific
> > connector.
> >
> >> <transportConnector name="default"
> >> uri="tcp://170.19.18.141:61616?soTimeout=10000&connectionTimeout=30000"
> >> discoveryUri="tcp://172.19.18.141"/>
> >> </transportConnectors>
> >>
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Exception-on-client-connection-tf2669782.html#a7583482
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>
--
James
-------
http://radio.weblogs.com/0112098/
Re: Exception on client connection
Posted by suri009 <su...@diagonal-consulting.com>.
Thanks for your reply. I have removed discoveryUri and i still get this
exception when clients are trying to connect to ActiveMq broker. Clients get
this exception on every 3-4 attempts. Is there anyway i can avoid this
exception as my users use these clients to get the live updates and it is
very important that they should not get connection errors.
Thanks,
Surya
>
> no. if your not using muticast discovery you can omit the whole
> discoveryUri attribute. That is only used to advertise a specific
> connector.
>
>> <transportConnector name="default"
>> uri="tcp://170.19.18.141:61616?soTimeout=10000&connectionTimeout=30000"
>> discoveryUri="tcp://172.19.18.141"/>
>> </transportConnectors>
>>
>
>
>
--
View this message in context: http://www.nabble.com/Exception-on-client-connection-tf2669782.html#a7583482
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Exception on client connection
Posted by Hiram Chirino <hi...@hiramchirino.com>.
On 11/20/06, suri009 <su...@diagonal-consulting.com> wrote:
>
>
> Iam sure there is only one ActiveMq broker running in our LAN.
>
> If i disable multicast, Can i use tcp as a discoveryUri?
>
no. if your not using muticast discovery you can omit the whole
discoveryUri attribute. That is only used to advertise a specific
connector.
> <transportConnector name="default"
> uri="tcp://170.19.18.141:61616?soTimeout=10000&connectionTimeout=30000"
> discoveryUri="tcp://172.19.18.141"/>
> </transportConnectors>
>
> Thanks,
> Surya
>
> --
> View this message in context: http://www.nabble.com/Exception-on-client-connection-tf2669782.html#a7447684
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>
--
Regards,
Hiram
Blog: http://hiramchirino.com
Re: Exception on client connection
Posted by suri009 <su...@diagonal-consulting.com>.
Iam sure there is only one ActiveMq broker running in our LAN.
If i disable multicast, Can i use tcp as a discoveryUri?
<transportConnector name="default"
uri="tcp://170.19.18.141:61616?soTimeout=10000&connectionTimeout=30000"
discoveryUri="tcp://172.19.18.141"/>
</transportConnectors>
Thanks,
Surya
--
View this message in context: http://www.nabble.com/Exception-on-client-connection-tf2669782.html#a7447684
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Exception on client connection
Posted by James Strachan <ja...@gmail.com>.
You might want to disable the multicast features in your activemq.xml
- it could be folks are running different versions of ActiveMQ on your
LAN which are connecting with each other
On 11/20/06, suri009 <su...@diagonal-consulting.com> wrote:
>
>
> I get this exception when my client try to connect to broker in a different
> machine. My client does not get this exception every time, but they get once
> in every 4 attempts. Clients are testing the system so they are doing
> connect/disconnects. Do i need to change any configuration to avoid this
> exception?
>
> Is my below configuration of activemq broker, publisher and subscriber
> correct?
>
> <transportConnectors>
> <transportConnector name="default"
> uri="tcp://170.19.18.141:61616?soTimeout=10000&connectionTimeout=30000"
> discoveryUri="multicast://172.19.18.157"/>
> </transportConnectors>
>
> client (Topic subscriber) is connecting using uri:
> tcp://170.19.18.141:61616?wireFormat.maxInactivityDuration=0
> Server (Topic Publisher) is connecting using uri:
> failover:(tcp://172.19.18.157:61616)?jms.useAsyncSend=true&wireFormat.maxInactivityDuration=0
>
> javax.jms.JMSException: Wire format negociation timeout: peer did not send
> his w
> ire format.
> at
> org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSuppo
> rt.java:58)
> at
> org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnect
> ion.java:1125)
> at
> org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(Activ
> eMQConnection.java:1203)
> at
> org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnecti
> on.java:272)
> at
> org.apache.activemq.ActiveMQConnection.createTopicSession(ActiveMQCon
> nection.java:904)
> at
> com.baa.tg.commons.jms.JmsMessageReceiver.initialize(JmsMessageReceiv
> er.java:101)
> at
> com.baa.tg.commons.jms.JmsMessageReceiver.startReceiver(JmsMessageRec
> eiver.java:58)
> at com.test.tg.client.awt.JFMain$3.run(JFMain.java:249)
> at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
> at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
> at
> java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
> read.java:242)
> at
> java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
> ad.java:163)
> at
> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
>
> at
> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
>
> at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
> Caused by: java.io.IOException: Wire format negociation timeout: peer did
> not se
> nd his wire format.
> at
> org.apache.activemq.transport.WireFormatNegotiator.oneway(WireFormatN
> egotiator.java:82)
> at
> org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.ja
> va:45)
> at
> org.apache.activemq.transport.ResponseCorrelator.asyncRequest(Respons
> eCorrelator.java:67)
> at
> org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorr
> elator.java:72)
> at
> org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnect
> ion.java:1115)
> ... 17 more
>
> --
> View this message in context: http://www.nabble.com/Exception-on-client-connection-tf2669782.html#a7444710
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>
--
James
-------
http://radio.weblogs.com/0112098/