-
Notifications
You must be signed in to change notification settings - Fork 642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Fix handle http message throw IllegalReferenceCountException #3271
Comments
@mxsm pls add full error log. |
@jonyangx Now HTTPHandler extends SimpleChannelInboundHandler, but when channelRead0 finished code invoked ReferenceCountUtil.release method. ReferenceCountUtil.release twice, So throw the exception in the log above. I hava described in pr. |
I couldn't reproduced the scene, and test is success. @mxsm |
@jonyangx make sure you HTTPHandler extends SimpleChannelInboundHandler, I refactor it before. Also because the refactoring I ignored the code that executes the ReferenceCountUtil release method 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);
}
} |
@mxsm I start eventmesh http server using org.apache.eventmesh.runtime.boot.EventMeshStartup, and use HTTP class as client . BUILD SUCCESSFUL in 11s |
@jonyangx
|
[ISSUE #3271]Fix handle http message throw IllegalReferenceCountException
…enceCountException" This reverts commit 3a36275.
Search before asking
Environment
Windows
EventMesh version
master
What happened
When I send http message to server. Causes the following problems:
How to reproduce
Sending messages over http
Debug logs
Are you willing to submit PR?
The text was updated successfully, but these errors were encountered: