You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@eventmesh.apache.org by "mxsm (via GitHub)" <gi...@apache.org> on 2023/02/26 01:39:53 UTC

[GitHub] [incubator-eventmesh] mxsm opened a new issue, #3271: [Bug] Fix

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: dev-unsubscribe@eventmesh.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] xwm1992 closed issue #3271: [Bug] Fix handle http message throw IllegalReferenceCountException

Posted by "xwm1992 (via GitHub)" <gi...@apache.org>.
xwm1992 closed issue #3271: [Bug] Fix handle http message throw IllegalReferenceCountException
URL: https://github.com/apache/incubator-eventmesh/issues/3271


-- 
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: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] mxsm commented on issue #3271: [Bug] Fix handle http message throw IllegalReferenceCountException

Posted by "mxsm (via GitHub)" <gi...@apache.org>.
mxsm commented on issue #3271:
URL: https://github.com/apache/incubator-eventmesh/issues/3271#issuecomment-1445566401

   > @mxsm pls add full error log.
   
   This is the complete error log
   


-- 
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: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] mxsm commented on issue #3271: [Bug] Fix handle http message throw IllegalReferenceCountException

Posted by "mxsm (via GitHub)" <gi...@apache.org>.
mxsm commented on issue #3271:
URL: https://github.com/apache/incubator-eventmesh/issues/3271#issuecomment-1445573722

   @jonyangx  Now HTTPHandler extends SimpleChannelInboundHandler, but when channelRead0 finished code invoked ReferenceCountUtil.release method.
   ![image](https://user-images.githubusercontent.com/15797831/221456446-6b09b592-4c86-45fb-9753-7d59e84577e0.png)
   However in SimpleChannelInboundHandler class do the same thing:
   ![image](https://user-images.githubusercontent.com/15797831/221456597-cf18c6c7-965a-41f3-817a-213a3e30ef4f.png)
   
   ReferenceCountUtil.release twice, So throw the exception in the log above
   


-- 
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: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] jonyangx commented on issue #3271: [Bug] Fix handle http message throw IllegalReferenceCountException

Posted by "jonyangx (via GitHub)" <gi...@apache.org>.
jonyangx commented on issue #3271:
URL: https://github.com/apache/incubator-eventmesh/issues/3271#issuecomment-1445549155

   @mxsm  pls add full error log.


-- 
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: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] jonyangx commented on issue #3271: [Bug] Fix handle http message throw IllegalReferenceCountException

Posted by "jonyangx (via GitHub)" <gi...@apache.org>.
jonyangx commented on issue #3271:
URL: https://github.com/apache/incubator-eventmesh/issues/3271#issuecomment-1445603033

   I couldn't reproduced the scene, and test is success. @mxsm 


-- 
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: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] jonyangx commented on issue #3271: [Bug] Fix handle http message throw IllegalReferenceCountException

Posted by "jonyangx (via GitHub)" <gi...@apache.org>.
jonyangx commented on issue #3271:
URL: https://github.com/apache/incubator-eventmesh/issues/3271#issuecomment-1445679359

   @mxsm  I start eventmesh http server using  org.apache.eventmesh.runtime.boot.EventMeshStartup, and use HTTP class as client .
   Test code is success.
   
   2023-02-27 12:13:04,539 main DEBUG Apache Log4j Core 2.17.1 initializing configuration XmlConfiguration[location=/Users/apple/opensource/incubator-eventmesh/eventmesh-sdk-java/build/resources/test/log4j2.xml]
   2023-02-27 12:13:04,544 main DEBUG Installed 1 script engine
   2023-02-27 12:13:04,707 main DEBUG Oracle Nashorn version: 1.8.0_271, language: ECMAScript, threading: Not Thread Safe, compile: true, names: [nashorn, Nashorn, js, JS, JavaScript, javascript, ECMAScript, ecmascript], factory class: jdk.nashorn.api.scripting.NashornScriptEngineFactory
   2023-02-27 12:13:04,708 main DEBUG PluginManager 'Core' found 127 plugins
   2023-02-27 12:13:04,708 main DEBUG PluginManager 'Level' found 0 plugins
   2023-02-27 12:13:04,710 main DEBUG PluginManager 'Lookup' found 16 plugins
   2023-02-27 12:13:04,711 main DEBUG Building Plugin[name=layout, class=org.apache.logging.log4j.core.layout.PatternLayout].
   2023-02-27 12:13:04,719 main DEBUG PluginManager 'TypeConverter' found 26 plugins
   2023-02-27 12:13:04,728 main DEBUG PatternLayout$Builder(pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%t] %c{1}(%F:%L) - %m%n", PatternSelector=null, Configuration(/Users/apple/opensource/incubator-eventmesh/eventmesh-sdk-java/build/resources/test/log4j2.xml), Replace=null, charset="null", alwaysWriteExceptions="null", disableAnsi="null", noConsoleNoAnsi="null", header="null", footer="null")
   2023-02-27 12:13:04,728 main DEBUG PluginManager 'Converter' found 45 plugins
   2023-02-27 12:13:04,736 main DEBUG Building Plugin[name=appender, class=org.apache.logging.log4j.core.appender.ConsoleAppender].
   2023-02-27 12:13:04,741 main DEBUG ConsoleAppender$Builder(target="SYSTEM_OUT", follow="null", direct="null", bufferedIo="null", bufferSize="null", immediateFlush="null", ignoreExceptions="null", PatternLayout(%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%t] %c{1}(%F:%L) - %m%n), name="console", Configuration(/Users/apple/opensource/incubator-eventmesh/eventmesh-sdk-java/build/resources/test/log4j2.xml), Filter=null, ={})
   2023-02-27 12:13:04,742 main DEBUG Starting OutputStreamManager SYSTEM_OUT.false.false
   2023-02-27 12:13:04,743 main DEBUG Building Plugin[name=appenders, class=org.apache.logging.log4j.core.config.AppendersPlugin].
   2023-02-27 12:13:04,743 main DEBUG createAppenders(={console})
   2023-02-27 12:13:04,743 main DEBUG Building Plugin[name=AppenderRef, class=org.apache.logging.log4j.core.config.AppenderRef].
   2023-02-27 12:13:04,746 main DEBUG createAppenderRef(ref="console", level="null", Filter=null)
   2023-02-27 12:13:04,746 main DEBUG Building Plugin[name=asyncRoot, class=org.apache.logging.log4j.core.async.AsyncLoggerConfig$RootLogger].
   2023-02-27 12:13:04,747 main DEBUG createLogger(additivity="null", level="DEBUG", includeLocation="true", ={console}, ={}, Configuration(/Users/apple/opensource/incubator-eventmesh/eventmesh-sdk-java/build/resources/test/log4j2.xml), Filter=null)
   2023-02-27 12:13:04,751 main DEBUG Building Plugin[name=AppenderRef, class=org.apache.logging.log4j.core.config.AppenderRef].
   2023-02-27 12:13:04,752 main DEBUG createAppenderRef(ref="console", level="null", Filter=null)
   2023-02-27 12:13:04,753 main DEBUG Building Plugin[name=asyncLogger, class=org.apache.logging.log4j.core.async.AsyncLoggerConfig].
   2023-02-27 12:13:04,754 main DEBUG createLogger(additivity="false", level="DEBUG", name="org.apache.eventmesh.client", includeLocation="true", ={console}, ={}, Configuration(/Users/apple/opensource/incubator-eventmesh/eventmesh-sdk-java/build/resources/test/log4j2.xml), Filter=null)
   2023-02-27 12:13:04,754 main DEBUG Building Plugin[name=loggers, class=org.apache.logging.log4j.core.config.LoggersPlugin].
   2023-02-27 12:13:04,754 main DEBUG createLoggers(={root, org.apache.eventmesh.client})
   2023-02-27 12:13:04,755 main DEBUG Configuration XmlConfiguration[location=/Users/apple/opensource/incubator-eventmesh/eventmesh-sdk-java/build/resources/test/log4j2.xml] initialized
   2023-02-27 12:13:04,755 main DEBUG Starting configuration XmlConfiguration[location=/Users/apple/opensource/incubator-eventmesh/eventmesh-sdk-java/build/resources/test/log4j2.xml]
   2023-02-27 12:13:04,756 main DEBUG Log4j2 ConfigurationScheduler starting 1 threads
   2023-02-27 12:13:04,770 main DEBUG Starting AsyncLoggerConfig disruptor for this configuration with ringbufferSize=4096, waitStrategy=TimeoutBlockingWaitStrategy, exceptionHandler=org.apache.logging.log4j.core.async.AsyncLoggerConfigDefaultExceptionHandler@503d687a...
   2023-02-27 12:13:04,770 main DEBUG Started configuration XmlConfiguration[location=/Users/apple/opensource/incubator-eventmesh/eventmesh-sdk-java/build/resources/test/log4j2.xml] OK.
   2023-02-27 12:13:04,770 main DEBUG Shutting down OutputStreamManager SYSTEM_OUT.false.false-1
   2023-02-27 12:13:04,771 main DEBUG OutputStream closed
   2023-02-27 12:13:04,771 main DEBUG Shut down OutputStreamManager SYSTEM_OUT.false.false-1, all resources released: true
   2023-02-27 12:13:04,771 main DEBUG Appender DefaultConsole-1 stopped with status true
   2023-02-27 12:13:04,771 main DEBUG Stopped org.apache.logging.log4j.core.config.DefaultConfiguration@6a5fc7f7 OK
   2023-02-27 12:13:04,805 main DEBUG Registering MBean org.apache.logging.log4j2:type=73d16e93
   2023-02-27 12:13:04,808 main DEBUG Registering MBean org.apache.logging.log4j2:type=73d16e93,component=StatusLogger
   2023-02-27 12:13:04,809 main DEBUG Registering MBean org.apache.logging.log4j2:type=73d16e93,component=ContextSelector
   2023-02-27 12:13:04,810 main DEBUG Registering MBean org.apache.logging.log4j2:type=73d16e93,component=Loggers,name=
   2023-02-27 12:13:04,810 main DEBUG Registering MBean org.apache.logging.log4j2:type=73d16e93,component=Loggers,name=,subtype=RingBuffer
   2023-02-27 12:13:04,810 main DEBUG Registering MBean org.apache.logging.log4j2:type=73d16e93,component=Loggers,name=org.apache.eventmesh.client
   2023-02-27 12:13:04,811 main DEBUG Registering MBean org.apache.logging.log4j2:type=73d16e93,component=Loggers,name=org.apache.eventmesh.client,subtype=RingBuffer
   2023-02-27 12:13:04,811 main DEBUG Registering MBean org.apache.logging.log4j2:type=73d16e93,component=Appenders,name=console
   2023-02-27 12:13:04,813 main DEBUG org.apache.logging.log4j.core.util.SystemClock does not support precise timestamps.
   2023-02-27 12:13:04,814 main DEBUG Reconfiguration complete for context[name=73d16e93] at URI /Users/apple/opensource/incubator-eventmesh/eventmesh-sdk-java/build/resources/test/log4j2.xml (org.apache.logging.log4j.core.LoggerContext@73700b80) with optional ClassLoader: null
   2023-02-27 12:13:04,814 main DEBUG Shutdown hook enabled. Registering a new one.
   2023-02-27 12:13:04,814 main DEBUG LoggerContext[name=73d16e93, org.apache.logging.log4j.core.LoggerContext@73700b80] started OK.
   2023-02-27 12:13:05,233 DEBUG [main] InternalLoggerFactory(InternalLoggerFactory.java:63) - Using SLF4J as the default logging framework
   2023-02-27 12:13:05,237 DEBUG [main] PlatformDependent0(PlatformDependent0.java:495) - -Dio.netty.noUnsafe: false
   2023-02-27 12:13:05,237 DEBUG [main] PlatformDependent0(PlatformDependent0.java:998) - Java version: 8
   2023-02-27 12:13:05,238 DEBUG [main] PlatformDependent0(PlatformDependent0.java:136) - sun.misc.Unsafe.theUnsafe: available
   2023-02-27 12:13:05,238 DEBUG [main] PlatformDependent0(PlatformDependent0.java:160) - sun.misc.Unsafe.copyMemory: available
   2023-02-27 12:13:05,238 DEBUG [main] PlatformDependent0(PlatformDependent0.java:192) - sun.misc.Unsafe.storeFence: available
   2023-02-27 12:13:05,239 DEBUG [main] PlatformDependent0(PlatformDependent0.java:235) - java.nio.Buffer.address: available
   2023-02-27 12:13:05,239 DEBUG [main] PlatformDependent0(PlatformDependent0.java:306) - direct buffer constructor: available
   2023-02-27 12:13:05,240 DEBUG [main] PlatformDependent0(PlatformDependent0.java:384) - java.nio.Bits.unaligned: available, true
   2023-02-27 12:13:05,240 DEBUG [main] PlatformDependent0(PlatformDependent0.java:458) - jdk.internal.misc.Unsafe.allocateUninitializedArray(int): unavailable prior to Java9
   2023-02-27 12:13:05,240 DEBUG [main] PlatformDependent0(PlatformDependent0.java:481) - java.nio.DirectByteBuffer.<init>(long, int): available
   2023-02-27 12:13:05,240 DEBUG [main] PlatformDependent(PlatformDependent.java:1159) - sun.misc.Unsafe: available
   2023-02-27 12:13:05,240 DEBUG [main] PlatformDependent(PlatformDependent.java:1289) - -Dio.netty.tmpdir: /var/folders/12/dc96p6f11pg6ldnjp100dkch0000gp/T (java.io.tmpdir)
   2023-02-27 12:13:05,240 DEBUG [main] PlatformDependent(PlatformDependent.java:1368) - -Dio.netty.bitMode: 64 (sun.arch.data.model)
   2023-02-27 12:13:05,241 DEBUG [main] PlatformDependent(PlatformDependent.java:1127) - Platform: MacOS
   2023-02-27 12:13:05,241 DEBUG [main] PlatformDependent(PlatformDependent.java:178) - -Dio.netty.maxDirectMemory: 7635730432 bytes
   2023-02-27 12:13:05,241 DEBUG [main] PlatformDependent(PlatformDependent.java:185) - -Dio.netty.uninitializedArrayAllocationThreshold: -1
   2023-02-27 12:13:05,242 DEBUG [main] CleanerJava6(CleanerJava6.java:92) - java.nio.ByteBuffer.cleaner(): available
   2023-02-27 12:13:05,242 DEBUG [main] PlatformDependent(PlatformDependent.java:205) - -Dio.netty.noPreferDirect: false
   2023-02-27 12:13:05,259 DEBUG [main] HttpUtils(HttpUtils.java:144) - POST http://127.0.0.1:10105 HTTP/1.1
   2023-02-27 12:13:05,554 DEBUG [main] HttpUtils(HttpUtils.java:63) - HttpUtils.ResponseHolder(response={"retCode":0,"retMsg":"successSendResult[topic=eventmesh-async-topic, messageId=0]","resTime":1677471185513})
   2023-02-27 12:13:05,585 pool-1-thread-1 DEBUG Stopping LoggerContext[name=73d16e93, org.apache.logging.log4j.core.LoggerContext@73700b80]
   2023-02-27 12:13:05,585 pool-1-thread-1 DEBUG Stopping LoggerContext[name=73d16e93, org.apache.logging.log4j.core.LoggerContext@73700b80]...
   2023-02-27 12:13:05,587 pool-1-thread-1 DEBUG Shutting down OutputStreamManager SYSTEM_OUT.false.false
   2023-02-27 12:13:05,587 pool-1-thread-1 DEBUG OutputStream closed
   2023-02-27 12:13:05,587 pool-1-thread-1 DEBUG Shut down OutputStreamManager SYSTEM_OUT.false.false, all resources released: true
   2023-02-27 12:13:05,588 pool-1-thread-1 DEBUG Appender console stopped with status true
   2023-02-27 12:13:05,588 pool-1-thread-1 DEBUG Log4j2 ConfigurationScheduler shutting down threads in java.util.concurrent.ScheduledThreadPoolExecutor@34294cbf[Running, pool size = 1, active threads = 0, queued tasks = 1, completed tasks = 0]
   2023-02-27 12:13:05,588 pool-1-thread-1 DEBUG Stopped XmlConfiguration[location=/Users/apple/opensource/incubator-eventmesh/eventmesh-sdk-java/build/resources/test/log4j2.xml] OK
   2023-02-27 12:13:05,588 pool-1-thread-1 DEBUG Stopped LoggerContext[name=73d16e93, org.apache.logging.log4j.core.LoggerContext@73700b80] with status true
   
   BUILD SUCCESSFUL in 11s


-- 
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: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] mxsm commented on issue #3271: [Bug] Fix handle http message throw IllegalReferenceCountException

Posted by "mxsm (via GitHub)" <gi...@apache.org>.
mxsm commented on issue #3271:
URL: https://github.com/apache/incubator-eventmesh/issues/3271#issuecomment-1445843832

   @jonyangx 
   started in IDEA, master and the latest code:
   ![image](https://user-images.githubusercontent.com/15797831/221501836-4d965e25-7985-41df-9a60-8d4aeffe8524.png)
   test  code :
   ![image](https://user-images.githubusercontent.com/15797831/221502017-64f6dfe3-6f45-4951-98c5-b003645ddb17.png)
    then run test code, runtime server exception:
    ```
   2023-02-27 15:36:32,016 DEBUG [eventMesh-http-worker-2] AbstractHTTPServer(AbstractHTTPServer.java:438) - httpCommand={REQ,POST/HTTP,requestCode=104,opaque=3,header=sendMessageRequestHeader={code=104,language=JAVA,version=V1,env=DEV,idc=idc,sys=1234,pid=21436,ip=172.19.63.136:57237,username=eventmesh,passwd=password},body=sendMessageRequestBody={topic=null,bizSeqNo=null,uniqueId=null,content={"specversion":"1.0","id":"a1e291f2-8efa-4a40-9566-0fbcd0715a44","source":"/","type":"cloudevents","datacontenttype":"application/cloudevents+json","subject":"eventmesh-async-topic","protocolversion":"1.0","ip":"172.19.63.136","idc":"idc","protocoldesc":"V1","bizseqno":"750847729482426165841644938330","pid":"21436","language":"JAVA","env":"DEV","sys":"1234","ttl":"4000","uniqueid":"283198725850969120046106290900","data_base64":"eyJjb250ZW50IjoidGVzdEFzeW5jTWVzc2FnZSJ9"},ttl=null,tag=,producerGroup=TEST_PRODUCER_GROUP,extFields=null}}
   2023-02-27 15:36:32,017 ERROR [eventMesh-http-worker-2] 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-27 15:36:32,373 INFO  [eventMesh-sendMsg-2] cmd(SendAsyncMessageProcessor.java:89) - cmd=MSG_SEND_ASYNC|http|client2eventMesh|from=172.19.63.136:57237|to=172.19.63.136
   2023-02-27 15:36:32,374 DEBUG [eventMesh-sendMsg-2] message(SendAsyncMessageProcessor.java:262) - msg2MQMsg suc, bizSeqNo=750847729482426165841644938330, topic=eventmesh-async-topic
   2023-02-27 15:36:32,374 INFO  [eventMesh-sendMsg-2] message(SendAsyncMessageProcessor.java:319) - message|eventMesh2mq|REQ|ASYNC|send2MQCost=0ms|topic=eventmesh-async-topic|bizSeqNo=750847729482426165841644938330|uniqueId=283198725850969120046106290900
   2023-02-27 15:36:32,374 DEBUG [eventMesh-sendMsg-2] TraceUtils(TraceUtils.java:86) - finishSpan with event:CloudEvent{id='a1e291f2-8efa-4a40-9566-0fbcd0715a44', source=/, type='cloudevents', datacontenttype='application/cloudevents+json', subject='eventmesh-async-topic', data=BytesCloudEventData{value=[123, 34, 99, 111, 110, 116, 101, 110, 116, 34, 58, 34, 116, 101, 115, 116, 65, 115, 121, 110, 99, 77, 101, 115, 115, 97, 103, 101, 34, 125]}, extensions={protocolversion=1.0, reqeventmesh2mqtimestamp=1677483392374, code=104, reqsendeventmeship=172.19.63.136, ip=172.19.63.136:57237, idc=idc, protocoldesc=http, pid=21436, language=JAVA, env=DEV, sys=1234, ttl=4000, version=1.0, producergroup=TEST_PRODUCER_GROUP, passwd=password, bizseqno=750847729482426165841644938330, protocoltype=cloudevents, msgtype=persistent, uniqueid=283198725850969120046106290900, username=eventmesh, reqc2eventmeshtimestamp=1677483392015}}
   2023-02-27 15:36:32,374 DEBUG [eventMesh-sendMsg-2] TraceUtils(TraceUtils.java:86) - finishSpan with event:CloudEvent{id='a1e291f2-8efa-4a40-9566-0fbcd0715a44', source=/, type='cloudevents', datacontenttype='application/cloudevents+json', subject='eventmesh-async-topic', data=BytesCloudEventData{value=[123, 34, 99, 111, 110, 116, 101, 110, 116, 34, 58, 34, 116, 101, 115, 116, 65, 115, 121, 110, 99, 77, 101, 115, 115, 97, 103, 101, 34, 125]}, extensions={protocolversion=1.0, reqeventmesh2mqtimestamp=1677483392374, code=104, reqsendeventmeship=172.19.63.136, ip=172.19.63.136:57237, idc=idc, protocoldesc=http, pid=21436, language=JAVA, env=DEV, sys=1234, ttl=4000, version=1.0, producergroup=TEST_PRODUCER_GROUP, passwd=password, bizseqno=750847729482426165841644938330, protocoltype=cloudevents, msgtype=persistent, uniqueid=283198725850969120046106290900, username=eventmesh, reqc2eventmeshtimestamp=1677483392015}}
   2023-02-27 15:36:32,374 DEBUG [eventMesh-sendMsg-2] AbstractHTTPServer(AbstractHTTPServer.java:555) - httpCommand={RES,POST/HTTP,requestCode=104,opaque=3,cost=359,header=sendMessageResponseHeader={code=104,eventMeshEnv=PRD,eventMeshIdc=DEFAULT,eventMeshCluster=COMMON,eventMeshIp=172.19.63.136},body=sendMessageResponseBody={retCode=0,retMsg=successSendResult[topic=eventmesh-async-topic, messageId=1],resTime=2023-02-27 15:36:32.374}}
   2023-02-27 15:36:32,374 DEBUG [EventMesh-http-asyncContext-2] http(SendAsyncMessageProcessor.java:288) - httpCommand={RES,POST/HTTP,requestCode=104,opaque=3,cost=359,header=sendMessageResponseHeader={code=104,eventMeshEnv=PRD,eventMeshIdc=DEFAULT,eventMeshCluster=COMMON,eventMeshIp=172.19.63.136},body=sendMessageResponseBody={retCode=0,retMsg=successSendResult[topic=eventmesh-async-topic, messageId=1],resTime=2023-02-27 15:36:32.374}}
   2023-02-27 15:36:32,376 WARN  [eventMesh-http-worker-2] AbstractHTTPServer(AbstractHTTPServer.java:194) - send response to [172.19.63.136:57237] fail, will close this channel
   2023-02-27 15:36:32,376 WARN  [eventMesh-http-worker-2] AbstractHTTPServer(AbstractHTTPServer.java:194) - send response to [172.19.63.136:57237] fail, will close this channel
   ```
    


-- 
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: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] mxsm commented on issue #3271: [Bug] Fix handle http message throw IllegalReferenceCountException

Posted by "mxsm (via GitHub)" <gi...@apache.org>.
mxsm commented on issue #3271:
URL: https://github.com/apache/incubator-eventmesh/issues/3271#issuecomment-1445625034

   > I couldn't reproduced the scene, and test is success. @mxsm
   
   pull the latest code from master. start runtime and use this test code:
   ```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);
       }
   }
   ```


-- 
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: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org