You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/03/14 18:05:00 UTC

[jira] [Commented] (NIFI-4976) ConsumeJMS occasionally failing when reading TextMessage from IBM MQ

    [ https://issues.apache.org/jira/browse/NIFI-4976?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16399004#comment-16399004 ] 

ASF GitHub Bot commented on NIFI-4976:
--------------------------------------

GitHub user markap14 opened a pull request:

    https://github.com/apache/nifi/pull/2545

    NIFI-4976: If unable to retrieve message content, warn an error but a…

    …cknowledge message.
    
    Thank you for submitting a contribution to Apache NiFi.
    
    In order to streamline the review of the contribution we ask you
    to ensure the following steps have been taken:
    
    ### For all changes:
    - [ ] Is there a JIRA ticket associated with this PR? Is it referenced 
         in the commit message?
    
    - [ ] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
    
    - [ ] Has your PR been rebased against the latest commit within the target branch (typically master)?
    
    - [ ] Is your initial contribution a single, squashed commit?
    
    ### For code changes:
    - [ ] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder?
    - [ ] Have you written or updated unit tests to verify your changes?
    - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? 
    - [ ] If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly?
    - [ ] If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly?
    - [ ] If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties?
    
    ### For documentation related changes:
    - [ ] Have you ensured that format looks appropriate for the output in which it is rendered?
    
    ### Note:
    Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/markap14/nifi NIFI-4976

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi/pull/2545.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2545
    
----
commit 6949b448316de6613c8d3281a13c1eb454193d94
Author: Mark Payne <ma...@...>
Date:   2018-03-14T18:04:03Z

    NIFI-4976: If unable to retrieve message content, warn an error but acknowledge message.

----


> ConsumeJMS occasionally failing when reading TextMessage from IBM MQ
> --------------------------------------------------------------------
>
>                 Key: NIFI-4976
>                 URL: https://issues.apache.org/jira/browse/NIFI-4976
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>            Reporter: Mark Payne
>            Assignee: Mark Payne
>            Priority: Major
>
> When reading from IBM MQ we will occasionally encounter a stack trace like the following:
> {code:java}
> 2018-02-27 11:26:53,138 WARN [Timer-Driven Process Thread-186] o.a.n.c.t.ContinuallyRunProcessorTask
> org.apache.nifi.jms.processors.MessageBodyToBytesConverter$MessageConversionException: Failed to convert BytesMessage to byte[]
> at org.apache.nifi.jms.processors.MessageBodyToBytesConverter.toBytes(MessageBodyToBytesConverter.java:42)
> at org.apache.nifi.jms.processors.JMSConsumer$1.doInJms(JMSConsumer.java:84)
> at org.apache.nifi.jms.processors.JMSConsumer$1.doInJms(JMSConsumer.java:65)
> at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:494)
> at org.apache.nifi.jms.processors.JMSConsumer.consume(JMSConsumer.java:65)
> at org.apache.nifi.jms.processors.ConsumeJMS.rendezvousWithJms(ConsumeJMS.java:119)
> at org.apache.nifi.jms.processors.AbstractJMSProcessor.onTrigger(AbstractJMSProcessor.java:136)
> at org.apache.nifi.jms.processors.ConsumeJMS.onTrigger(ConsumeJMS.java:57)
> at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
> at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1118)
> at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:147)
> at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47)
> at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:132)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: com.ibm.msg.client.jms.DetailedJMSException: JMSCMQ1049: The character set '1208(UTF-8) Unmappable Action: REPORT Unmappable Replacement: 63' cannot convert some or all of the string '[B@14c194bd'
> at sun.reflect.GeneratedConstructorAccessor1012.newInstance(Unknown Source)
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
> at com.ibm.msg.client.commonservices.j2se.NLSServices.createException(NLSServices.java:319)
> at com.ibm.msg.client.commonservices.nls.NLSServices.createException(NLSServices.java:226)
> at com.ibm.msg.client.wmq.common.internal.WMQUtils.computeTextFromBytes(WMQUtils.java:382)
> at com.ibm.msg.client.wmq.common.internal.WMQUtils.computeTextFromByteBuffer(WMQUtils.java:421)
> at com.ibm.msg.client.wmq.common.internal.messages.WMQTextMessage.getText(WMQTextMessage.java:240)
> at com.ibm.msg.client.jms.internal.JmsTextMessageImpl.getText(JmsTextMessageImpl.java:205)
> at com.ibm.jms.JMSTextMessage.getText(JMSTextMessage.java:124)
> at org.apache.nifi.jms.processors.MessageBodyToBytesConverter.toBytes(MessageBodyToBytesConverter.java:40)
> ... 19 common frames omitted
> Caused by: java.nio.charset.MalformedInputException: Input length = 1
> at java.nio.charset.CoderResult.throwException(CoderResult.java:281)
> at java.nio.charset.CharsetDecoder.decode(CharsetDecoder.java:816)
> at com.ibm.mq.jmqi.system.JmqiCodepage.bytesToString(JmqiCodepage.java:690)
> at com.ibm.msg.client.wmq.common.internal.WMQUtils.computeTextFromBytes(WMQUtils.java:375)
> ... 24 common frames omitted{code}
> Unfortunately, if using Client Acknowledge, we end up not acknowledging the message, since we can't read it, so it stays on the queue, and we constantly attempt to pull it again, causing the processor to essentially become 'stuck'.
> If such an issue arises, where we cannot retrieve the content of the message, we are better off to log an ERROR with the stack trace and then acknowledge the message even without the content.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)