activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Humphrey" <ja...@google.com>
Subject Re: JDBC Persistence
Date Sat, 25 Mar 2006 23:41:56 GMT
On 3/24/06, James Strachan <james.strachan@gmail.com> wrote:
> On 3/24/06, Jack Humphrey <jackh@google.com> wrote:
> > If I'm running on ActiveMQ 3.2.2 then master/slave is not an option, correct?
>
> Yes
>
> > I'm using 3.2.2 and the reliable: transport. Is the "randomize=false"
> > argument available to make sure that I usually hit my master broker?
> > How do I achieve the "locking out" that you refer to?

Any tips?

> > Also, in some testing I did with 3.2.2, it seemed that if journaling
> > was disabled, and the database became unavailable (simulating mysql
> > crash), that incoming messages were just lost. Does that sound like
> > what you'd expect? I can debug further if that surprises you.
>
> We should be failing the send() call in those cases

So, it is actually NOT failing send on the client side. Below is the
relevant portion of the broker log, with exceptions. Looking through
the code, I'm not clear on how the exception would make it back to the
client. I see that it sends the exception in the Receipt -- do I need
to do something to enable that. I can't find anywhere in the transport
code, though, that actually reads the exception from the receipt.

Should I file a bug on this? Thanks for your help.

++Jack++


---
15:09:43 INFO  Adding new client: AMDT on transport:
TcpTransportChannel:
Socket[addr=/127.0.0.1,port=36432,localport=61616]
15:09:44 WARN  caught exception consuming packet:
ACTIVEMQ_TEXT_MESSAGE: id = 0 ActiveMQMessage{ , jmsMessageID =
ID:localhost-36431-1143328183721-7:0, bodyAsBytes =
org.activemq.io.util.ByteArray@10f6d3, readOnlyMessage = false,
jmsClientID = 'AMDT' , jmsCorrelationID = 'null' , jmsDestination =
test.topic, jmsReplyTo = null, jmsDeliveryMode = 2, jmsRedelivered =
false, jmsType = 'null' , jmsExpiration = 0, jmsPriority = 4,
jmsTimestamp = 1143328183983, properties = {shardId=0},
readOnlyProperties = false, entryBrokerName =
'ID:localhost36381-1143327959784-0:0' , entryClusterName = 'default' ,
consumerNos = null, transactionId = 'null' , xaTransacted = false,
consumerIdentifer = 'null' , messageConsumed = false,
transientConsumed = false, sequenceNumber = 0, deliveryCount = 1,
dispatchedFromDLQ = false, messageAcknowledge = null,
jmsMessageIdentity = null, producerKey =
ID:localhost-36431-1143328183721-7: }, text = ...

javax.jms.JMSException: Failed to broker message:
ID:firefly.nyc.corp.google.com-36431-1143328183721-7:0 in container:
java.sql.SQLException: Unable to connect to any hosts due to
exception: java.net.ConnectException: Connection refused

** BEGIN NESTED EXCEPTION **

java.net.ConnectException
MESSAGE: Connection refused

STACKTRACE:
java.net.ConnectException: Connection refused
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
        at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
        at java.net.Socket.connect(Socket.java:507)
        at java.net.Socket.connect(Socket.java:457)
        at java.net.Socket.<init>(Socket.java:365)
        at java.net.Socket.<init>(Socket.java:178)
        at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:121)
        at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:220)
        at com.mysql.jdbc.Connection.createNewIO(Connection.java:1768)
        at com.mysql.jdbc.Connection.<init>(Connection.java:440)
        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:400)
        at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)
        at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
        at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:771)
        at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:95)
        at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:544)
        at org.activemq.store.jdbc.JDBCPersistenceAdapter.getConnection(JDBCPersistenceAdapter.java:418)
        at org.activemq.store.jdbc.JDBCMessageStore.addMessage(JDBCMessageStore.java:71)
        at org.activemq.store.vm.VMTransactionStore.addMessage(VMTransactionStore.java:230)
        at org.activemq.store.vm.VMTransactionStore$2.addMessage(VMTransactionStore.java:130)
        at org.activemq.store.cache.CacheMessageStore.addMessage(CacheMessageStore.java:51)
        at org.activemq.service.impl.DurableTopicMessageContainer.addMessage(DurableTopicMessageContainer.java:59)
        at org.activemq.service.impl.DurableTopicMessageContainerManager.sendMessage(DurableTopicMessageContainerManager.java:163)
        at org.activemq.broker.impl.DefaultBroker.doMessageSend(DefaultBroker.java:577)
        at org.activemq.broker.impl.DefaultBroker.sendMessage(DefaultBroker.java:320)
        at org.activemq.broker.impl.BrokerContainerImpl.sendMessage(BrokerContainerImpl.java:462)
        at org.activemq.broker.impl.BrokerConnectorImpl.sendMessage(BrokerConnectorImpl.java:281)
        at org.activemq.broker.impl.BrokerClientImpl.consumeActiveMQMessage(BrokerClientImpl.java:735)
        at org.activemq.broker.impl.BrokerClientImpl.consume(BrokerClientImpl.java:336)
        at org.activemq.transport.TransportChannelSupport.doConsumePacket(TransportChannelSupport.java:374)
        at org.activemq.transport.TransportChannelSupport.doConsumePacket(TransportChannelSupport.java:368)
        at org.activemq.transport.tcp.TcpTransportChannel.run(TcpTransportChannel.java:315)
        at java.lang.Thread.run(Thread.java:595)


** END NESTED EXCEPTION **


        at org.activemq.util.JMSExceptionHelper.newJMSException(JMSExceptionHelper.java:49)
        at org.activemq.store.jdbc.JDBCMessageStore.addMessage(JDBCMessageStore.java:74)
        at org.activemq.store.vm.VMTransactionStore.addMessage(VMTransactionStore.java:230)
        at org.activemq.store.vm.VMTransactionStore$2.addMessage(VMTransactionStore.java:130)
        at org.activemq.store.cache.CacheMessageStore.addMessage(CacheMessageStore.java:51)
        at org.activemq.service.impl.DurableTopicMessageContainer.addMessage(DurableTopicMessageContainer.java:59)
        at org.activemq.service.impl.DurableTopicMessageContainerManager.sendMessage(DurableTopicMessageContainerManager.java:163)
        at org.activemq.broker.impl.DefaultBroker.doMessageSend(DefaultBroker.java:577)
        at org.activemq.broker.impl.DefaultBroker.sendMessage(DefaultBroker.java:320)
        at org.activemq.broker.impl.BrokerContainerImpl.sendMessage(BrokerContainerImpl.java:462)
        at org.activemq.broker.impl.BrokerConnectorImpl.sendMessage(BrokerConnectorImpl.java:281)
        at org.activemq.broker.impl.BrokerClientImpl.consumeActiveMQMessage(BrokerClientImpl.java:735)
        at org.activemq.broker.impl.BrokerClientImpl.consume(BrokerClientImpl.java:336)
        at org.activemq.transport.TransportChannelSupport.doConsumePacket(TransportChannelSupport.java:374)
        at org.activemq.transport.TransportChannelSupport.doConsumePacket(TransportChannelSupport.java:368)
        at org.activemq.transport.tcp.TcpTransportChannel.run(TcpTransportChannel.java:315)
        at java.lang.Thread.run(Thread.java:595)

Mime
View raw message