Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Bug] close tcp client failed #4855

@Alonexc

Description

@Alonexc

Search before asking

  • I had searched in the issues and found no similar issues.

Environment

Mac

EventMesh version

master

What happened

Initialize the TCP client, and then close the client to report an error, but the server is normally closed channel.

How to reproduce

  1. start runtime
  2. Using TCP client to open and close the connection.

Debug logs

2024-04-22 15:28:16,602 WARN  [main] TcpClient(TcpClient.java:134) - close tcp client failed.|remote address=null
io.netty.channel.StacklessClosedChannelException: null
	at io.netty.channel.AbstractChannel$AbstractUnsafe.write(Object, ChannelPromise)(Unknown Source) ~[netty-transport-4.1.79.Final.jar:4.1.79.Final]
2024-04-22 15:28:16,603 INFO  [main] RequestContext(RequestContext.java:75) - _RequestContext|create|key=8351078330
2024-04-22 15:28:16,606 ERROR [main] CloudEventTCPSubClient(CloudEventTCPSubClient.java:141) - exception occurred when close
java.lang.InterruptedException: null
	at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:347) ~[?:1.8.0_311]
	at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1908) ~[?:1.8.0_311]
	at org.apache.eventmesh.client.tcp.common.TcpClient.io(TcpClient.java:193) ~[eventmesh-sdk-java-1.10.0-release.jar:1.10.0-release]
	at org.apache.eventmesh.client.tcp.common.TcpClient.goodbye(TcpClient.java:205) ~[eventmesh-sdk-java-1.10.0-release.jar:1.10.0-release]
	at org.apache.eventmesh.client.tcp.impl.cloudevent.CloudEventTCPSubClient.close(CloudEventTCPSubClient.java:138) ~[eventmesh-sdk-java-1.10.0-release.jar:1.10.0-release]
	at org.apache.eventmesh.client.tcp.impl.cloudevent.CloudEventTCPClient.close(CloudEventTCPClient.java:99) ~[eventmesh-sdk-java-1.10.0-release.jar:1.10.0-release]
	at org.apache.eventmesh.tcp.demo.sub.cloudevents.AsyncSubscribe.main(AsyncSubscribe.java:65) ~[main/:?]
2024-04-22 15:28:16,607 DEBUG [nioEventLoopGroup-3-1] Codec(Codec.java:64) - Encode pkg={"header":{"cmd":"CLIENT_GOODBYE_REQUEST","code":0,"seq":"8351078330","properties":{},"command":"CLIENT_GOODBYE_REQUEST"}}
2024-04-22 15:28:16,628 DEBUG [nioEventLoopGroup-3-1] Codec(Codec.java:181) - Decode headerJson={"cmd":"CLIENT_GOODBYE_RESPONSE","code":0,"desc":"success","seq":"8351078330","properties":{},"command":"CLIENT_GOODBYE_RESPONSE"}

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions