mxsm opened a new issue, #3271:
URL: https://github.com/apache/incubator-eventmesh/issues/3271

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/eventmesh/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Environment
   
   Windows
   
   ### EventMesh version
   
   master
   
   ### What happened
   
   When I send http message to server. Causes the following problems:
   
![image](https://user-images.githubusercontent.com/15797831/221387623-bb0a7a19-d13e-45bd-9676-6387debf6d92.png)
   
   
   ### How to reproduce
   
   Sending messages over http
   ```java
   public class HTTP {
       public static void main(String[] args) throws Exception {
           EventMeshHttpClientConfig eventMeshClientConfig = 
EventMeshHttpClientConfig.builder()
               .liteEventMeshAddr("192.168.1.7:10105")
               .producerGroup("TEST_PRODUCER_GROUP")
               .env("DEV")
               .idc("idc")
               .ip(IPUtils.getLocalAddress())
               .sys("1234")
               .pid(String.valueOf(ThreadUtils.getPID()))
               .userName("eventmesh")
               .password("password")
               .build();
           /* ... */
           EventMeshHttpProducer eventMeshHttpProducer = new 
EventMeshHttpProducer(eventMeshClientConfig);
           Map<String, String> content = new HashMap<>();
           content.put("content", "testAsyncMessage");
   
           CloudEvent event = CloudEventBuilder.v1()
               .withId(UUID.randomUUID().toString())
               .withSubject("eventmesh-async-topic")
               .withSource(URI.create("/"))
               .withDataContentType("application/cloudevents+json")
               .withType(EventMeshCommon.CLOUD_EVENTS_PROTOCOL_NAME)
               
.withData(JsonUtils.toJSONString(content).getBytes(StandardCharsets.UTF_8))
               .withExtension(Constants.EVENTMESH_MESSAGE_CONST_TTL, 
String.valueOf(4 * 1000))
               .build();
           eventMeshHttpProducer.publish(event);
       }
   }
   ```
   
   ### Debug logs
   
   ```
   2023-02-26 09:22:28,703 ERROR [eventMesh-http-worker-1] 
AbstractHTTPServer(AbstractHTTPServer.java:595) - 
   io.netty.util.IllegalReferenceCountException: refCnt: 0, decrement: 1
        at 
io.netty.util.internal.ReferenceCountUpdater.toLiveRealRefCnt(ReferenceCountUpdater.java:83)
 ~[netty-common-4.1.79.Final.jar:4.1.79.Final]
        at 
io.netty.util.internal.ReferenceCountUpdater.release(ReferenceCountUpdater.java:147)
 ~[netty-common-4.1.79.Final.jar:4.1.79.Final]
        at 
io.netty.buffer.AbstractReferenceCountedByteBuf.release(AbstractReferenceCountedByteBuf.java:101)
 ~[netty-buffer-4.1.79.Final.jar:4.1.79.Final]
        at 
io.netty.handler.codec.http.HttpObjectAggregator$AggregatedFullHttpMessage.release(HttpObjectAggregator.java:378)
 ~[netty-codec-http-4.1.79.Final.jar:4.1.79.Final]
        at io.netty.util.ReferenceCountUtil.release(ReferenceCountUtil.java:90) 
~[netty-common-4.1.79.Final.jar:4.1.79.Final]
        at 
io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:106)
 ~[netty-transport-4.1.79.Final.jar:4.1.79.Final]
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
 [netty-transport-4.1.79.Final.jar:4.1.79.Final]
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
 [netty-transport-4.1.79.Final.jar:4.1.79.Final]
        at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
 [netty-transport-4.1.79.Final.jar:4.1.79.Final]
        at 
io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
 [netty-codec-4.1.79.Final.jar:4.1.79.Final]
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
 [netty-transport-4.1.79.Final.jar:4.1.79.Final]
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
 [netty-transport-4.1.79.Final.jar:4.1.79.Final]
        at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
 [netty-transport-4.1.79.Final.jar:4.1.79.Final]
        at 
io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:327)
 [netty-codec-4.1.79.Final.jar:4.1.79.Final]
        at 
io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:299)
 [netty-codec-4.1.79.Final.jar:4.1.79.Final]
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
 [netty-transport-4.1.79.Final.jar:4.1.79.Final]
        at 
io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:61)
 [netty-transport-4.1.79.Final.jar:4.1.79.Final]
        at 
io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:370)
 [netty-transport-4.1.79.Final.jar:4.1.79.Final]
        at 
io.netty.util.concurrent.AbstractEventExecutor.runTask$$$capture(AbstractEventExecutor.java:174)
 [netty-common-4.1.79.Final.jar:4.1.79.Final]
        at 
io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java)
 [netty-common-4.1.79.Final.jar:4.1.79.Final]
        at 
io.netty.util.concurrent.AbstractEventExecutor.safeExecute$$$capture(AbstractEventExecutor.java:167)
 [netty-common-4.1.79.Final.jar:4.1.79.Final]
        at 
io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java)
 [netty-common-4.1.79.Final.jar:4.1.79.Final]
        at 
io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
 [netty-common-4.1.79.Final.jar:4.1.79.Final]
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:503) 
[netty-transport-4.1.79.Final.jar:4.1.79.Final]
        at 
io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
 [netty-common-4.1.79.Final.jar:4.1.79.Final]
        at 
io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) 
[netty-common-4.1.79.Final.jar:4.1.79.Final]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_202]
   2023-02-26 09:22:28,703 INFO  [eventMesh-sendMsg-1] 
cmd(SendAsyncMessageProcessor.java:89) - 
cmd=MSG_SEND_ASYNC|http|client2eventMesh|from=192.168.1.7:52094|to=192.168.43.1
   ```
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to