Failed to browse topic exception in ActiveMQ logs - jms

I am using ActiveMQ v5.10.
Am unable to understand root cause of exception am getting in my logs.
[20141116 13:07:30.288 EDT (ActiveMQ Broker[broker] Scheduler) org.apache.activemq.broker.region.Topic#doBrowse 615 WARN] - Failed to browse Topic: cometd.
ProxyPush
java.io.EOFException: Chunk stream does not exist, page: 34 is marked free
at org.apache.activemq.store.kahadb.disk.page.Transaction$2.readPage(Transaction.java:470)
at org.apache.activemq.store.kahadb.disk.page.Transaction$2.<init>(Transaction.java:447)
at org.apache.activemq.store.kahadb.disk.page.Transaction.openInputStream(Transaction.java:444)
at org.apache.activemq.store.kahadb.disk.page.Transaction.load(Transaction.java:420)
at org.apache.activemq.store.kahadb.disk.page.Transaction.load(Transaction.java:377)
at org.apache.activemq.store.kahadb.disk.index.BTreeIndex.loadNode(BTreeIndex.java:262)
at org.apache.activemq.store.kahadb.disk.index.BTreeIndex.getRoot(BTreeIndex.java:174)
at org.apache.activemq.store.kahadb.disk.index.BTreeIndex.iterator(BTreeIndex.java:232)
at org.apache.activemq.store.kahadb.MessageDatabase$MessageOrderIndex$MessageOrderIterator.<init>(MessageDatabase.java:2757)
at org.apache.activemq.store.kahadb.MessageDatabase$MessageOrderIndex.iterator(MessageDatabase.java:2739)
at org.apache.activemq.store.kahadb.KahaDBStore$KahaDBMessageStore$3.execute(KahaDBStore.java:526)
at org.apache.activemq.store.kahadb.disk.page.Transaction.execute(Transaction.java:779)
at org.apache.activemq.store.kahadb.KahaDBStore$KahaDBMessageStore.recover(KahaDBStore.java:522)
at org.apache.activemq.store.ProxyTopicMessageStore.recover(ProxyTopicMessageStore.java:62)
at org.apache.activemq.store.ProxyTopicMessageStore.recover(ProxyTopicMessageStore.java:62)
at org.apache.activemq.broker.region.Topic.doBrowse(Topic.java:578)
at org.apache.activemq.broker.region.Topic.access$100(Topic.java:65)
at org.apache.activemq.broker.region.Topic$6.run(Topic.java:703)
at org.apache.activemq.thread.SchedulerTimerTask.run(SchedulerTimerTask.java:33)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
Though this exception is infrequent and occurs sometimes but am wondering what could be cause of it.
Please note that broker and client communication is fine. client is able to send and receive messages on that topic but exception is continuously coming. There is no durable subscriber on this topic. Messages sent on this topic are non-persistent.

you can have a look here. seems to be some bug in KahaDB persistence Engine

Related

javax.net.ssl.SSLException: handshake timed out in corda node

While initiating flow from spring web server by passing required values from PartyA to PartyB in corda, I am getting following exception in my initiating node PartyA, kindly do the needfull.
entered verifysend method
E 12:01:47+0530 [Thread-4 (ActiveMQ-server-org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl$3#6cb2b947)] core.client.createConnection - AMQ214016: Failed to create netty connection
javax.net.ssl.SSLException: handshake timed out
at io.netty.handler.ssl.SslHandler.handshake(...)(Unknown Source) ~[netty-all-4.1.9.Final.jar:4.1.9.Final]
=========collecting ended=========
Even through my flow is running successfully by giving response as Transaction id:.... commited to ledger in web server, but my flow is taking around 5 minutes to create a unconsumed state.
I think you are run into low-memory issue, so one of your nodes was crashed. Hence lead to the handshake error.
The current minimal requirement for starting a node is 1GB of JVM Heap and 2GB minimal host RAM.

Excessive ERROR logs failed hearbeats with Spring SockJS and non-websocket transports

We're using Spring's SockJS with Stomp to send push messages to the browser.
It works fine so far, but when a client (browser) disconnects, we get an ERROR log everytime because the scheduled hearbeat fails:
11:11:18.241 [MessageBroker-1] ERROR [org.springframework.scheduling.support.TaskUtils$LoggingErrorHandler] - Unexpected error occurred in scheduled task.
org.springframework.web.socket.sockjs.SockJsTransportFailureException: Failed to write SockJsFrame content='h'; nested exception is org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe
at org.springframework.web.socket.sockjs.transport.session.AbstractSockJsSession.writeFrame(AbstractSockJsSession.java:339) ~[spring-websocket-4.3.4.RELEASE.jar:4.3.4.RELEASE]
at org.springframework.web.socket.sockjs.transport.session.PollingSockJsSession.writeFrame(PollingSockJsSession.java:82) ~[spring-websocket-4.3.4.RELEASE.jar:4.3.4.RELEASE]
at org.springframework.web.socket.sockjs.transport.session.AbstractSockJsSession.sendHeartbeat(AbstractSockJsSession.java:255) ~[spring-websocket-4.3.4.RELEASE.jar:4.3.4.RELEASE]
at org.springframework.web.socket.sockjs.transport.session.AbstractSockJsSession$HeartbeatTask.run(AbstractSockJsSession.java:451) ~[spring-websocket-4.3.4.RELEASE.jar:4.3.4.RELEASE]
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) ~[spring-context-4.3.4.RELEASE.jar:4.3.4.RELEASE]
But only when the client uses XHR-Polling fallback, websocket doesn't cause any errors. We use nginx as reverse proxy in front of tomcat 8.0.39. Nginx logs 499 (client closed connection) a few seconds before the SockJsTransportFailureException is risen
Is there a way to get rid of the ERROR logs when a heartbeat fails? I don't want to disable all logging from org.springframework.scheduling.support.TaskUtils as we might miss important errors.

IBM Websphere MQ authentication error while accessing channel

I am using IBM Websphere MQ 7.5 in Unix system. I have installed the client on my machine and server is running on other machine. I am observing a scenario where I am able to communicate with server when running my JMS application via 'mqm' user but facing below mentioned error when using other user.
But I am able to run 'amqsputc' and 'amqsgetc' command and communicate with the server with mqm as well as other user also. I have followed all steps mentioned http://www-01.ibm.com/support/knowledgecenter/SSFKSJ_7.5.0/com.ibm.mq.ins.doc/q009300_.htm?lang=en
Exception:
com.ibm.msg.client.jms.DetailedJMSSecurityException: JMSWMQ2013: The security authentication was not valid that was supplied for QueueManager 'TestManager' with connection mode 'Client' and host name 'x.x.x.x(9923)'.
Please check if the supplied username and password are correct on the QueueManager to which you are connecting.
at com.ibm.msg.client.wmq.common.internal.Reason.reasonToException(Reason.java:521)
at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:221)
at com.ibm.msg.client.wmq.internal.WMQConnection.<init>(WMQConnection.java:426)
at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createV7ProviderConnection(WMQConnectionFactory.java:6902)
at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createProviderConnection(WMQConnectionFactory.java:6277)
at com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl.createConnection(JmsConnectionFactoryImpl.java:285)
at com.ibm.mq.jms.MQConnectionFactory.createCommonConnection(MQConnectionFactory.java:6233)
at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:120)
at com.ibm.mq.jms.MQQueueConnectionFactory.createConnection(MQQueueConnectionFactory.java:203)
at performance.IBMMQTestProducer.start(IBMMQTestProducer.java:142)
at performance.IBMMQTestProducer.main(IBMMQTestProducer.java:177)
Caused by: com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2035' ('MQRC_NOT_AUTHORIZED').**
at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:209)
... 9 more
Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2035;AMQ9509: Program cannot open queue manager object. [1=2035,5=???]**
at com.ibm.mq.jmqi.internal.JmqiTools.getQueueManagerInfo(JmqiTools.java:783)
at com.ibm.mq.jmqi.remote.impl.RemoteSession.loadInfo(RemoteSession.java:1993)
at com.ibm.mq.jmqi.remote.impl.RemoteSession.getName(RemoteSession.java:2026)
at com.ibm.mq.jmqi.remote.api.RemoteHconn.getName(RemoteHconn.java:728)
at com.ibm.mq.ese.intercept.JmqiConnInterceptorImpl.validate(JmqiConnInterceptorImpl.java:321)
at com.ibm.mq.ese.intercept.JmqiConnInterceptorImpl.afterConnect(JmqiConnInterceptorImpl.java:226)
at com.ibm.mq.ese.intercept.JmqiConnInterceptorImpl.afterJmqiConnect(JmqiConnInterceptorImpl.java:133)
at com.ibm.mq.ese.jmqi.InterceptedJmqiImpl.jmqiConnect(InterceptedJmqiImpl.java:315)
at com.ibm.mq.ese.jmqi.ESEJMQI.jmqiConnect(ESEJMQI.java:337)
I am able to run it when I am running as myself and passing 'mqm' when starting the connection.
connection = cf.createConnection("mqm", "pswd");
I am not getting anything in manager's log. Below is the log.
------------------------------------------------------------------------------
10/30/2015 06:50:54 AM - Process(31064.1) User(mqm) Program(strmqm)
Host(x.x.x.x) Installation(Installation1)
VRMF(7.5.0.2)
AMQ7125: There are 83 days left in the trial period for this copy of WebSphere
MQ.
EXPLANATION:
This copy of WebSphere MQ is licensed for a limited period only.
ACTION:
None.
Given that you have told us that you have successfully connected and run the amqsgetc and amqsputc client samples using the same server-connection channel as you are attempting to use for your JMS program that suggests that this is not a connection time problem, in other words the MQCONN to the queue manager has been successful and something following that is failing. We know that you can MQPUT and MQGET (since that is what the aforementioned samples do).
Something that JMS does that those simple samples do not do, is an MQINQ of the queue manager. The following part of your exception makes me wonder if that is what you are tripping over:-
Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2035;
AMQ9509: Program cannot open queue manager object. [1=2035,5=???] at
com.ibm.mq.jmqi.internal.JmqiTools.getQueueManagerInfo(JmqiTools.java:783) at
To be completely certain you must check the queue manager AMQERR01.LOG to see what is reported there. If it is missing authorization then it will tell you there.

xa_commit failed when trying to commit jms transaction

We are trying to write a message to a broker queue. But the whole request fails when it tries to commit the JMS transaction & then it tries to rollback each subsequent time. We use oracle XA drivers. Not sure where to post this issue: MQ forums or Oracle forum. So thought would give a try here. Can someone help resolve this please.
Error:
[9/25/12 17:10:06:871 EDT] 0000003e XATransaction E J2CA0027E: An exception occurred while invoking commit on an XA Resource Adapter from dataSource JMS$QCF$JMSManagedConnection#23, within transaction ID {XidImpl: formatId(57415344), gtrid_length(36), bqual_length(54), data(00000139ff43ef2500000001000043106c82332ef6bc723402e84f341fb357080ddd4d1b00000139ff43ef2500000001000043106c82332ef6bc723402e84f341fb357080ddd4d1b000000010000000000000000000000000001)}: javax.transaction.xa.XAException: The method 'xa_commit' has failed with errorCode '-7'.
at com.ibm.mq.jmqi.JmqiXAResource.commit(JmqiXAResource.java:407)
at com.ibm.ejs.jms.JMSManagedSession$JMSXAResource.commit(JMSManagedSession.java:1702)
at com.ibm.ejs.j2c.XATransactionWrapper.commit(XATransactionWrapper.java:463)
at com.ibm.ws.Transaction.JTA.JTAXAResourceImpl.commit_one_phase(JTAXAResourceImpl.java:305)
at com.ibm.ws.Transaction.JTA.RegisteredResources.flowCommitOnePhase(RegisteredResources.java:2916)
at com.ibm.ws.Transaction.JTA.TransactionImpl.commitXAResources(TransactionImpl.java:2533)
at com.ibm.ws.Transaction.JTA.TransactionImpl.stage1CommitProcessing(TransactionImpl.java:1687)
at com.ibm.ws.Transaction.JTA.TransactionImpl.processCommit(TransactionImpl.java:1647)
at com.ibm.ws.Transaction.JTA.TransactionImpl.commit(TransactionImpl.java:1582)
at com.ibm.ws.Transaction.JTA.TranManagerImpl.commit(TranManagerImpl.java:247)
at com.ibm.ws.Transaction.JTA.TranManagerSet.commit(TranManagerSet.java:168)
at com.ibm.ws.Transaction.JTA.UserTransactionImpl.commit(UserTransactionImpl.java:293)
at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1009)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723)
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:255)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1002)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:901)
at org.springframework.scheduling.commonj.DelegatingWork.run(DelegatingWork.java:61)
at com.ibm.ws.asynchbeans.J2EEContext$RunProxy.run(J2EEContext.java:264)
at java.security.AccessController.doPrivileged(Native Method)
at com.ibm.ws.asynchbeans.J2EEContext.run(J2EEContext.java:1137)
at com.ibm.ws.asynchbeans.WorkWithExecutionContextImpl.go(WorkWithExecutionContextImpl.java:195)
at com.ibm.ws.asynchbeans.CJWorkItemImpl.run(CJWorkItemImpl.java:187)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1560)
.
[9/25/12 17:10:06:880 EDT] 0000003e RegisteredRes W WTRN0052E: An attempt by the transaction manager to call one phase commit on a transactional resource has resulted in an XAER_RMFAIL error. The resource was com.ibm.ws.Transaction.JTA.JTAXAResourceImpl#1d07bf1#{XidImpl: formatId(57415344), gtrid_length(36), bqual_length(54), data(00000139ff43ef2500000001000043106c82332ef6bc723402e84f341fb357080ddd4d1b00000139ff43ef2500000001000043106c82332ef6bc723402e84f341fb357080ddd4d1b000000010000000000000000000000000001)}
[9/25/12 17:10:06:887 EDT] 0000003e DefaultMessag W org.springframework.jms.listener.DefaultMessageListenerContainer handleListenerSetupFailure Setup of JMS message listener invoker failed for destination 'queue:///RANDOM QUEUE?targetClient=1' - trying to recover. Cause: Heuristic completion: outcome state is mixed; nested exception is javax.transaction.HeuristicMixedException
Here's the cause and resolution
Quote-
The cause of these errors is usually the result of a WebSphere MQ
messaging provider JMS Connection being closed off by WebSphere
Application Server because the Aged timeout for the Connection has
expired.
Resolution-
To resolve this issue, ensure that the JMS Connection Factory being
used by the application has the Connection Pool property Aged timeout
set to zero. This will prevent JMS Connections being closed when they
are returned to the Free Pool, and so ensures that any outstanding
transactional work can be completed
It is sometimes also caused by the faulty DataDirect Driver and is reported and fixed by IBM, see this.
Earlier we had multiple JMS sessions. That was probably the cause of the issue in one of the environments. So we had to change to 2 diff. sessions & now it works!
Julian:
My scenario is slightly different from yours. Earlier we had:
A request message was put on the queue. This queue was picked up & processed. Then we saved to the DB & then generated another message & put it on another broker queue & then sent a response to the first message. All this was 1 flow.
Now we changed that to 2 diff. flows : Request --> Process --> Save to DB --> Reply
and then another flow to put on Broker queue.
Hope this helps

MQ Failure to send message - MQJE046: Unsupported codeset

I'm using MQ v. 6.x.
Usually i can send and receive messages just fine. However, for some messages I get a 'MQJE046: Unsupported codeset' exception.
It seeme to be related to size, as i could reproduce the issue with message made of chars 0-9 in length greater then 32218 bytes.
javax.jms.JMSException: MQJMS1016: an internal error has occurred. Please contact your system administrator. Detail: com.ibm.mqservices.MQInternalException: MQJE001: An MQException occurred: Completion Code 2, Reason 2195
MQJE046: Unsupported codeset : 0
at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:586)
at com.ibm.mq.jms.MQMessageProducer.sendInternal(MQMessageProducer.java:1693)
at com.ibm.mq.jms.MQMessageProducer.send(MQMessageProducer.java:1056)
Is it a multithreaded app? MQTopicPublisher or MQQueueSender cannot be shared between threads and this message could be caused from sharing this objects between threads.
Refer to this mqseries.net thread

Resources