BewareMyPower opened a new issue, #261: URL: https://github.com/apache/pulsar-client-cpp/issues/261
### Search before asking - [X] I searched in the [issues](https://github.com/apache/pulsar-client-cpp/issues) and found nothing similar. ### Version - Pulsar 2.11.0 - Pulsar Client 3.2.0 candidate 1: https://dist.apache.org/repos/dist/dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.2.0-candidate-1 ### Minimal reproduce step ```c++ #include <pulsar/Client.h> using namespace pulsar; int main(int argc, char *argv[]) { // The server ran inside WSL2 on Windows Client client("pulsar://172.22.48.50:6650"); Producer producer; auto result = client.createProducer("persistent://public/default/test-topic", producer); if (result != ResultOk) { std::cerr << "Failed to create producer: " << result << std::endl; return 1; } client.close(); return 0; } ``` The Pulsar standalone ran on the Ubuntu 20.04 WSL2 subsystem whose IP is `172.22.48.50`. ### What did you expect to see? No error logs appeared. ### What did you see instead? There was an error log when closing the client: ``` 2023-04-28 22:08:06.875 INFO [12684] D:\a\pulsar-client-cpp\pulsar-client-cpp\lib\ProducerImpl:755 | [persistent://public/default/test-topic, standalone-5-42] Closing producer for topic 000001ED65D25180 2023-04-28 22:08:06.877 INFO [11036] D:\a\pulsar-client-cpp\pulsar-client-cpp\lib\ProducerImpl:719 | [persistent://public/default/test-topic, standalone-5-42] Closed producer 0 2023-04-28 22:08:06.878 INFO [3112] D:\a\pulsar-client-cpp\pulsar-client-cpp\lib\ClientConnection:1205 | [172.22.48.1:5376 -> 172.22.48.50:6650] Connection disconnected 2023-04-28 22:08:06.878 INFO [3112] D:\a\pulsar-client-cpp\pulsar-client-cpp\lib\ClientConnection:1205 | [172.22.48.1:5377 -> 172.22.48.50:6650] Connection disconnected 2023-04-28 22:08:06.878 ERROR [11036] D:\a\pulsar-client-cpp\pulsar-client-cpp\lib\ClientConnection:616 | [172.22.48.1:5376 -> 172.22.48.50:6650] Read operation failed: 由本地系统中止网络连接。 2023-04-28 22:08:06.878 INFO [11036] D:\a\pulsar-client-cpp\pulsar-client-cpp\lib\ClientConnection:263 | [172.22.48.1:5376 -> 172.22.48.50:6650] Destroyed connection 2023-04-28 22:08:06.879 ERROR [11036] D:\a\pulsar-client-cpp\pulsar-client-cpp\lib\ClientConnection:616 | [172.22.48.1:5377 -> 172.22.48.50:6650] Read operation failed: 由本地系统中止网络连接。 2023-04-28 22:08:06.880 INFO [11036] D:\a\pulsar-client-cpp\pulsar-client-cpp\lib\ClientConnection:263 | [172.22.48.1:5377 -> 172.22.48.50:6650] Destroyed connection ``` The error message is `The network connection was aborted by the local system` in English. We can see the following error logs in broker: ``` 2023-04-28T22:08:06,877+0800 [pulsar-io-19-1] INFO org.apache.pulsar.broker.service.ServerCnx - [PersistentTopic{topic=persistent://public/default/test-topic}][standalone-5-42] Closing producer on cnx /172.22.48.1:5377. producerId=0 2023-04-28T22:08:06,877+0800 [pulsar-io-19-1] INFO org.apache.pulsar.broker.service.ServerCnx - [PersistentTopic{topic=persistent://public/default/test-topic}][standalone-5-42] Closed producer on cnx /172.22.48.1:5377. producerId=0 2023-04-28T22:08:06,878+0800 [pulsar-io-19-16] WARN org.apache.pulsar.broker.service.ServerCnx - [/172.22.48.1:5376] Got exception io.netty.channel.unix.Errors$NativeIoException: recvAddress(..) failed: Connection reset by peer 2023-04-28T22:08:06,878+0800 [pulsar-io-19-1] WARN org.apache.pulsar.broker.service.ServerCnx - [/172.22.48.1:5377] Got exception io.netty.channel.unix.Errors$NativeIoException: recvAddress(..) failed: Connection reset by peer 2023-04-28T22:08:06,878+0800 [pulsar-io-19-16] INFO org.apache.pulsar.broker.service.ServerCnx - Closed connection from /172.22.48.1:5376 2023-04-28T22:08:06,879+0800 [pulsar-io-19-1] INFO org.apache.pulsar.broker.service.ServerCnx - Closed connection from /172.22.48.1:5377 ``` ### Anything else? When I ran the same code on WSL2 directly, no error logs appeared. Client side: ``` 2023-04-28 22:10:12.454 INFO [140283579778816] ClientConnection:1205 | [172.22.48.50:53056 -> 172.22.48.50:6650] Connection disconnected 2023-04-28 22:10:12.454 INFO [140283579778816] ClientConnection:263 | [172.22.48.50:53056 -> 172.22.48.50:6650] Destroyed connection 2023-04-28 22:10:12.455 INFO [140283579778816] ClientConnection:1205 | [172.22.48.50:53062 -> 172.22.48.50:6650] Connection disconnected 2023-04-28 22:10:12.455 INFO [140283579778816] ClientConnection:263 | [172.22.48.50:53062 -> 172.22.48.50:6650] Destroyed connection ``` Broker side: ``` 2023-04-28T22:10:12,453+0800 [pulsar-io-19-3] INFO org.apache.pulsar.broker.service.ServerCnx - [PersistentTopic{topic=persistent://public/default/test-topic}][standalone-5-43] Closing producer on cnx /172.22.48.50:53062. producerId=0 2023-04-28T22:10:12,454+0800 [pulsar-io-19-3] INFO org.apache.pulsar.broker.service.ServerCnx - [PersistentTopic{topic=persistent://public/default/test-topic}][standalone-5-43] Closed producer on cnx /172.22.48.50:53062. producerId=0 2023-04-28T22:10:12,454+0800 [pulsar-io-19-2] INFO org.apache.pulsar.broker.service.ServerCnx - Closed connection from /172.22.48.50:53056 2023-04-28T22:10:12,455+0800 [pulsar-io-19-3] INFO org.apache.pulsar.broker.service.ServerCnx - Closed connection from /172.22.48.50:53062 ``` ### Are you willing to submit a PR? - [X] I'm 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: commits-unsubscr...@pulsar.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org