Uploaded image for project: 'ActiveMQ Artemis'
  1. ActiveMQ Artemis
  2. ARTEMIS-2883

Websocket Implementation Breaks with Large Messages

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Works for Me
    • 2.12.0
    • None
    • MQTT
    • None
    • Artemis Version: 2.12.0

      Websocket Implementations: ngx-mqtt: 6.13.0

      Chrome: 84.0.4147.135

    Description

      When publishing a large Message into an Topic (ca 80kb) and subscribing to this topic via a websocket connection, the websocket connection gets broken by artemis sending the wrong packages.

       

      Steps to reproduce:
      Create a Broker with --no-autotune

      Subscribe to an topic with a large retained message via an mqtt websocket 

       

      When this happens the following is seen in the artemis log:

      2020-08-19 19:13:08,697 WARN  [org.apache.activemq.artemis.core.server] AMQ222061: Client connection failed, clearing up resources for session f1cd4c98-e23c-11ea-bb3c-00155d89640c
      2020-08-19 19:14:55,535 WARN  [io.netty.channel.AbstractChannelHandlerContext] Failed to mark a promise as failure because it has succeeded already: DefaultChannelPromise@33ebd0(success): java.lang.IllegalArgumentException: promise already done: DefaultChannelPromise@33ebd0(success)
          at io.netty.channel.AbstractChannelHandlerContext.isNotValidPromise(AbstractChannelHandlerContext.java:885) [netty-all-4.1.48.Final.jar:4.1.48.Final]
          at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:774) [netty-all-4.1.48.Final.jar:4.1.48.Final]
          at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:758) [netty-all-4.1.48.Final.jar:4.1.48.Final]
          at org.apache.activemq.artemis.core.server.protocol.websocket.WebSocketFrameEncoder.writeContinuationFrame(WebSocketFrameEncoder.java:64) [artemis-server-2.12.0.jar:2.12.0]
          at org.apache.activemq.artemis.core.server.protocol.websocket.WebSocketFrameEncoder.write(WebSocketFrameEncoder.java:45) [artemis-server-2.12.0.jar:2.12.0]
          at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) [netty-all-4.1.48.Final.jar:4.1.48.Final]
          at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:709) [netty-all-4.1.48.Final.jar:4.1.48.Final]
          at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:792) [netty-all-4.1.48.Final.jar:4.1.48.Final]
          at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:702) [netty-all-4.1.48.Final.jar:4.1.48.Final]
          at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:112) [netty-all-4.1.48.Final.jar:4.1.48.Final]
          at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) [netty-all-4.1.48.Final.jar:4.1.48.Final]
          at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:709) [netty-all-4.1.48.Final.jar:4.1.48.Final]
          at io.netty.channel.AbstractChannelHandlerContext$WriteTask.run(AbstractChannelHandlerContext.java:1102) [netty-all-4.1.48.Final.jar:4.1.48.Final]
          at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164) [netty-all-4.1.48.Final.jar:4.1.48.Final]
          at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472) [netty-all-4.1.48.Final.jar:4.1.48.Final]
          at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500) [netty-all-4.1.48.Final.jar:4.1.48.Final]
          at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) [netty-all-4.1.48.Final.jar:4.1.48.Final]
          at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [netty-all-4.1.48.Final.jar:4.1.48.Final]
          at org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118) [artemis-commons-2.12.0.jar:2.12.0]
      

      Error Message from the Browser (see attached screenshot)

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            kerko Jan Kerkenhoff
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: