iceh09 opened a new issue, #1285:
URL: https://github.com/apache/pulsar-client-go/issues/1285

   I use [email protected] to Publish message  , and the message pass  
nginx proxy,   when   nginx initiative close tcp connetct ,  the Publish  
function is block.
   
   this is  some stack, more stack  see  the [go stack.txt]  file:
   
    0  0x000000000044118e in runtime.gopark
       at /usr/local/go/src/runtime/proc.go:403
    1  0x0000000000453fa5 in runtime.goparkunlock
       at /usr/local/go/src/runtime/proc.go:408
    2  0x0000000000453fa5 in runtime.semacquire1
       at /usr/local/go/src/runtime/sema.go:160
    3  0x00000000004751a5 in sync.runtime_SemacquireMutex
       at /usr/local/go/src/runtime/sema.go:77
    4  0x000000000048451d in sync.(*Mutex).lockSlow
       at /usr/local/go/src/sync/mutex.go:171
    5  0x0000000000c7ed5b in sync.(*Mutex).Lock
       at /usr/local/go/src/sync/mutex.go:90
    6  0x0000000000c7ed5b in 
github.com/apache/pulsar-client-go/pulsar/internal.(*connectionPool).GetConnection
       at 
/root/go/pkg/mod/github.com/apache/[email protected]/pulsar/internal/connection_pool.go:88
    7  0x0000000000c8c756 in 
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).Request
       at 
/root/go/pkg/mod/github.com/apache/[email protected]/pulsar/internal/rpc_client.go:153
    8  0x0000000000c8c48a in 
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).requestToHost
       at 
/root/go/pkg/mod/github.com/apache/[email protected]/pulsar/internal/rpc_client.go:127
    9  0x0000000000c8c657 in 
github.com/apache/pulsar-client-go/pulsar/internal.(*rpcClient).RequestToAnyBroker
       at 
/root/go/pkg/mod/github.com/apache/[email protected]/pulsar/internal/rpc_client.go:143
   10  0x0000000000c84c1c in 
github.com/apache/pulsar-client-go/pulsar/internal.(*lookupService).GetPartitionedTopicMetadata
       at 
/root/go/pkg/mod/github.com/apache/[email protected]/pulsar/internal/lookup_service.go:212
   11  0x0000000000cc1a09 in 
github.com/apache/pulsar-client-go/pulsar.(*client).TopicPartitions
       at 
/root/go/pkg/mod/github.com/apache/[email protected]/pulsar/client_impl.go:240
   12  0x0000000000ce854e in 
github.com/apache/pulsar-client-go/pulsar.(*producer).internalCreatePartitionsProducers
       at 
/root/go/pkg/mod/github.com/apache/[email protected]/pulsar/producer_impl.go:190
   13  0x0000000000ce8005 in 
github.com/apache/pulsar-client-go/pulsar.newProducer
       at 
/root/go/pkg/mod/github.com/apache/[email protected]/pulsar/producer_impl.go:152
   14  0x0000000000cc1585 in 
github.com/apache/pulsar-client-go/pulsar.(*client).CreateProducer
       at 
/root/go/pkg/mod/github.com/apache/[email protected]/pulsar/client_impl.go:200
   15  0x0000000000d57695 in 
b-oos-schedule/internal/broker/pulsar.(*pulsarBroker).publish
   
   
   some log:
   time="2024-09-12T15:24:57+08:00" level=info msg="TCP connection established" 
local_addr="10.16.6.188:37602" 
remote_addr="pulsar://opdpulsarretry.kgidc.cn:31002"
   time="2024-09-12T15:24:57+08:00" level=warning msg="Failed to perform 
initial handshake" error="unable to read frame size: EOF" 
local_addr="10.16.6.188:37602" 
remote_addr="pulsar://opdpulsarretry.kgidc.cn:31002"
   time="2024-09-12T15:24:58+08:00" level=info msg="Connecting to broker" 
remote_addr="pulsar://opdpulsarretry.kgidc.cn:31002"
   time="2024-09-12T15:24:58+08:00" level=info msg="TCP connection established" 
local_addr="10.16.6.188:59872" 
remote_addr="pulsar://opdpulsarretry.kgidc.cn:31002"
   time="2024-09-12T15:24:58+08:00" level=warning msg="Failed to perform 
initial handshake" error="unable to read frame size: EOF" 
local_addr="10.16.6.188:59872" 
remote_addr="pulsar://opdpulsarretry.kgidc.cn:31002"
   time="2024-09-12T15:24:59+08:00" level=info msg="Connecting to broker" 
remote_addr="pulsar://opdpulsarretry.kgidc.cn:31002"
   time="2024-09-12T15:24:59+08:00" level=info msg="TCP connection established" 
local_addr="10.16.6.188:59873" 
remote_addr="pulsar://opdpulsarretry.kgidc.cn:31002"
   time="2024-09-12T15:24:59+08:00" level=warning msg="Failed to perform 
initial handshake" error="unable to read frame size: EOF" 
local_addr="10.16.6.188:59873" 
remote_addr="pulsar://opdpulsarretry.kgidc.cn:31002"
   time="2024-09-12T15:25:01+08:00" level=info msg="Connecting to broker" 
remote_addr="pulsar://opdpulsarretry.kgidc.cn:31002"
   time="2024-09-12T15:25:01+08:00" level=info msg="TCP connection established" 
local_addr="10.16.6.188:59881" 
remote_addr="pulsar://opdpulsarretry.kgidc.cn:31002"
   time="2024-09-12T15:25:01+08:00" level=warning msg="Failed to perform 
initial handshake" error="unable to read frame size: read tcp 
10.16.6.188:59881->10.16.2.243:31002: read: connection reset by peer" 
local_addr="10.16.6.188:59881" 
remote_addr="pulsar://opdpulsarretry.kgidc.cn:31002"
   time="2024-09-12T15:25:04+08:00" level=warning msg="Failed to lookup topic" 
error="connection error" producerID=21 producer_name=pulsar-tx-gz6-58-8231 
topic="persistent://oos/logCollector/cron_exec_desc-partition-2"
   time="2024-09-12T15:25:04+08:00" level=error msg="Failed to create producer 
at reconnect" error="connection error" producerID=21 
producer_name=pulsar-tx-gz6-58-8231 
topic="persistent://oos/logCollector/cron_exec_desc-partition-2"
   time="2024-09-12T15:25:04+08:00" level=info msg="Reconnecting to broker" 
assignedBrokerURL= delayReconnectTime=1m9.220699951s producerID=21 
producer_name=pulsar-tx-gz6-58-8231 
topic="persistent://oos/logCollector/cron_exec_desc-partition-2"
   time="2024-09-12T15:25:05+08:00" level=info msg="Connecting to broker" 
remote_addr="pulsar://opdpulsarretry.kgidc.cn:31002"
   time="2024-09-12T15:25:05+08:00" level=info msg="TCP connection established" 
local_addr="10.16.6.188:59891" 
remote_addr="pulsar://opdpulsarretry.kgidc.cn:31002"
   time="2024-09-12T15:25:05+08:00" level=warning msg="Failed to perform 
initial handshake" error="unable to read frame size: EOF" 
local_addr="10.16.6.188:59891" 
remote_addr="pulsar://opdpulsarretry.kgidc.cn:31002"
   time="2024-09-12T15:25:06+08:00" level=info msg="Connecting to broker" 
remote_addr="pulsar://opdpulsarretry.kgidc.cn:31002"
   time="2024-09-12T15:25:06+08:00" level=info msg="TCP connection established" 
local_addr="10.16.6.188:37623" 
remote_addr="pulsar://opdpulsarretry.kgidc.cn:31002"
   time="2024-09-12T15:25:06+08:00" level=warning msg="Failed to perform 
initial handshake" error="unable to read frame size: EOF" 
local_addr="10.16.6.188:37623" 
remote_addr="pulsar://opdpulsarretry.kgidc.cn:31002"
   time="2024-09-12T15:25:06+08:00" level=info msg="Connecting to broker" 
remote_addr="pulsar://opdpulsarretry.kgidc.cn:31002"
   time="2024-09-12T15:25:06+08:00" level=info msg="TCP connection established" 
local_addr="10.16.6.188:59893" 
remote_addr="pulsar://opdpulsarretry.kgidc.cn:31002"
   time="2024-09-12T15:25:06+08:00" level=warning msg="Failed to perform 
initial handshake" error="unable to read frame size: EOF" 
local_addr="10.16.6.188:59893" 
remote_addr="pulsar://opdpulsarretry.kgidc.cn:31002"
   time="2024-09-12T15:25:07+08:00" level=info msg="Connecting to broker" 
remote_addr="pulsar://opdpulsarretry.kgidc.cn:31002"
   time="2024-09-12T15:25:07+08:00" level=info msg="TCP connection established" 
local_addr="10.16.6.188:37625" 
remote_addr="pulsar://opdpulsarretry.kgidc.cn:31002"
   time="2024-09-12T15:25:07+08:00" level=warning msg="Failed to perform 
initial handshake" error="unable to read frame size: EOF" 
local_addr="10.16.6.188:37625" 
remote_addr="pulsar://opdpulsarretry.kgidc.cn:31002"
   time="2024-09-12T15:25:09+08:00" level=info msg="Connecting to broker" 
remote_addr="pulsar://opdpulsarretry.kgidc.cn:31002"
   time="2024-09-12T15:25:09+08:00" level=info msg="TCP connection established" 
local_addr="10.16.6.188:37626" 
remote_addr="pulsar://opdpulsarretry.kgidc.cn:31002"
   time="2024-09-12T15:25:09+08:00" level=warning msg="Failed to perform 
initial handshake" error="unable to read frame size: EOF" 
local_addr="10.16.6.188:37626" 
remote_addr="pulsar://opdpulsarretry.kgidc.cn:31002"
   time="2024-09-12T15:25:12+08:00" level=warning msg="Failed to lookup topic" 
error="connection error" producerID=17 producer_name=pulsar-tx-gz6-56-6493 
topic="persistent://oos/logCollector/cron_exec_desc-partition-3"
   time="2024-09-12T15:25:13+08:00" level=error msg="Failed to create producer 
at reconnect" error="connection error" producerID=17 
producer_name=pulsar-tx-gz6-56-6493 
topic="persistent://oos/logCollector/cron_exec_desc-partition-3"
   time="2024-09-12T15:25:13+08:00" level=info msg="Reconnecting to broker" 
assignedBrokerURL= delayReconnectTime=1m4.24464507s producerID=17 
producer_name=pulsar-tx-gz6-56-6493 
topic="persistent://oos/logCollector/cron_exec_desc-partition-3"
   time="2024-09-12T15:25:14+08:00" level=info msg="Broker notification of 
Closed producer: 12" local_addr="10.16.6.188:39596" 
remote_addr="pulsar://opdpulsarretry.kgidc.cn:31002"
   time="2024-09-12T15:25:14+08:00" level=warning msg="Connection was closed" 
cnx="10.16.6.188:39596 -> 10.16.2.243:31002" producerID=12 
producer_name=pulsar-tx-gz6-54-6753 
topic="persistent://oos/logCollector/cron_exec_desc-partition-0"
   time="2024-09-12T15:25:14+08:00" level=info msg="Broker notification of 
Closed producer: 19" local_addr="10.16.6.188:39596" 
remote_addr="pulsar://opdpulsarretry.kgidc.cn:31002"
   time="2024-09-12T15:25:14+08:00" level=info msg="runEventsLoop will 
reconnect in producer" producerID=12 producer_name=pulsar-tx-gz6-54-6753 
topic="persistent://oos/logCollector/cron_exec_desc-partition-0"
   time="2024-09-12T15:25:14+08:00" level=info msg="Reconnecting to broker" 
assignedBrokerURL= delayReconnectTime=103.872914ms producerID=12 
producer_name=pulsar-tx-gz6-54-6753 
topic="persistent://oos/logCollector/cron_exec_desc-partition-0"
   time="2024-09-12T15:25:14+08:00" level=warning msg="Connection was closed" 
cnx="10.16.6.188:39596 -> 10.16.2.243:31002" producerID=22 
producer_name=pulsar-tx-gz6-54-7183 
topic="persistent://oos/logCollector/cron_exec_desc-partition-0"
   time="2024-09-12T15:25:14+08:00" level=warning msg="Connection was closed" 
cnx="10.16.6.188:39596 -> 10.16.2.243:31002" producerID=19 
producer_name=pulsar-tx-gz6-54-7182 
topic="persistent://oos/logCollector/cron_exec_desc-partition-0"
   time="2024-09-12T15:25:14+08:00" level=info msg="runEventsLoop will 
reconnect in producer" producerID=22 producer_name=pulsar-tx-gz6-54-7183 
topic="persistent://oos/logCollector/cron_exec_desc-partition-0"
   time="2024-09-12T15:25:14+08:00" level=info msg="Reconnecting to broker" 
assignedBrokerURL= delayReconnectTime=106.471092ms producerID=22 
producer_name=pulsar-tx-gz6-54-7183 
topic="persistent://oos/logCollector/cron_exec_desc-partition-0"
   time="2024-09-12T15:25:14+08:00" level=info msg="Broker notification of 
Closed producer: 22" local_addr="10.16.6.188:39596" 
remote_addr="pulsar://opdpulsarretry.kgidc.cn:31002"
   time="2024-09-12T15:25:14+08:00" level=info msg="runEventsLoop will 
reconnect in producer" producerID=19 producer_name=pulsar-tx-gz6-54-7182 
topic="persistent://oos/logCollector/cron_exec_desc-partition-0"
   time="2024-09-12T15:25:14+08:00" level=info msg="Reconnecting to broker" 
assignedBrokerURL= delayReconnectTime=101.005913ms producerID=19 
producer_name=pulsar-tx-gz6-54-7182 
topic="persistent://oos/logCollector/cron_exec_desc-partition-0"
   time="2024-09-12T15:25:14+08:00" level=info msg="Connecting to broker" 
remote_addr="pulsar://opdpulsarretry.kgidc.cn:31002"
   time="2024-09-12T15:25:14+08:00" level=warning msg="Producer with ID not 
found while closing producer" local_addr="10.16.6.188:39596" producerID=22 
remote_addr="pulsar://opdpulsarretry.kgidc.cn:31002"
   time="2024-09-12T15:25:14+08:00" level=info msg="TCP connection established" 
local_addr="10.16.6.188:59896" 
remote_addr="pulsar://opdpulsarretry.kgidc.cn:31002"
   time="2024-09-12T15:25:29+08:00" level=warning msg="Failed to perform 
initial handshake" error="unable to read frame size: read tcp 
10.16.6.188:59896->10.16.2.243:31002: read: connection reset by peer" 
local_addr="10.16.6.188:59896" 
remote_addr="pulsar://opdpulsarretry.kgidc.cn:31002"
   time="2024-09-12T15:25:29+08:00" level=info msg="Connecting to broker" 
remote_addr="pulsar://opdpulsarretry.kgidc.cn:31002"
   time="2024-09-12T15:25:29+08:00" level=warning msg="Failed to lookup topic" 
error="connection error" producerID=20 producer_name=pulsar-tx-gz6-55-6606 
topic="persistent://oos/logCollector/cron_exec_desc-partition-1"
   time="2024-09-12T15:25:29+08:00" level=warning msg="Failed to lookup topic" 
error="connection error" producerID=19 producer_name=pulsar-tx-gz6-54-7182 
topic="persistent://oos/logCollector/cron_exec_desc-partition-0"
   time="2024-09-12T15:25:29+08:00" level=error msg="Failed to create producer 
at reconnect" error="connection error" producerID=19 
producer_name=pulsar-tx-gz6-54-7182 
topic="persistent://oos/logCollector/cron_exec_desc-partition-0"
   time="2024-09-12T15:25:29+08:00" level=error msg="Failed to create producer 
at reconnect" error="connection error" producerID=20 
producer_name=pulsar-tx-gz6-55-6606 
topic="persistent://oos/logCollector/cron_exec_desc-partition-1"
   time="2024-09-12T15:25:29+08:00" level=info msg="Reconnecting to broker" 
assignedBrokerURL= delayReconnectTime=1m6.623951777s producerID=20 
producer_name=pulsar-tx-gz6-55-6606 
topic="persistent://oos/logCollector/cron_exec_desc-partition-1"
   time="2024-09-12T15:25:29+08:00" level=warning msg="Failed to lookup topic" 
error="connection error" producerID=12 producer_name=pulsar-tx-gz6-54-6753 
topic="persistent://oos/logCollector/cron_exec_desc-partition-0"
   time="2024-09-12T15:25:29+08:00" level=info msg="TCP connection established" 
local_addr="10.16.6.188:37643" 
remote_addr="pulsar://opdpulsarretry.kgidc.cn:31002"
   time="2024-09-12T15:25:29+08:00" level=warning msg="Failed to lookup topic" 
error="connection error" producerID=13 producer_name=pulsar-tx-gz6-55-6298 
topic="persistent://oos/logCollector/cron_exec_desc-partition-1"
   time="2024-09-12T15:25:29+08:00" level=warning msg="Failed to lookup topic" 
error="connection error" producerID=22 producer_name=pulsar-tx-gz6-54-7183 
topic="persistent://oos/logCollector/cron_exec_desc-partition-0"
   time="2024-09-12T15:25:29+08:00" level=error msg="Failed to create producer 
at reconnect" error="connection error" producerID=13 
producer_name=pulsar-tx-gz6-55-6298 
topic="persistent://oos/logCollector/cron_exec_desc-partition-1"
   time="2024-09-12T15:25:29+08:00" level=info msg="Reconnecting to broker" 
assignedBrokerURL= delayReconnectTime=1m3.315534156s producerID=13 
producer_name=pulsar-tx-gz6-55-6298 
topic="persistent://oos/logCollector/cron_exec_desc-partition-1"
   time="2024-09-12T15:25:29+08:00" level=info msg="Reconnecting to broker" 
assignedBrokerURL= delayReconnectTime=233.208405ms producerID=19 
producer_name=pulsar-tx-gz6-54-7182 
topic="persistent://oos/logCollector/cron_exec_desc-partition-0"
   time="2024-09-12T15:25:29+08:00" level=warning msg="Failed to perform 
initial handshake" error="unable to read frame size: EOF" 
local_addr="10.16.6.188:37643" 
remote_addr="pulsar://opdpulsarretry.kgidc.cn:31002"
   time="2024-09-12T15:25:29+08:00" level=error msg="Failed to create producer 
at reconnect" error="connection error" producerID=22 
producer_name=pulsar-tx-gz6-54-7183 
topic="persistent://oos/logCollector/cron_exec_desc-partition-0"
   time="2024-09-12T15:25:29+08:00" level=error msg="Failed to create producer 
at reconnect" error="connection error" producerID=12 
producer_name=pulsar-tx-gz6-54-6753 
topic="persistent://oos/logCollector/cron_exec_desc-partition-0"
   time="2024-09-12T15:25:29+08:00" level=info msg="Reconnecting to broker" 
assignedBrokerURL= delayReconnectTime=225.229344ms producerID=12 
producer_name=pulsar-tx-gz6-54-6753 
topic="persistent://oos/logCollector/cron_exec_desc-partition-0"
   time="2024-09-12T15:25:29+08:00" level=info msg="Reconnecting to broker" 
assignedBrokerURL= delayReconnectTime=228.70635ms producerID=22 
producer_name=pulsar-tx-gz6-54-7183 
topic="persistent://oos/logCollector/cron_exec_desc-partition-0"
   time="2024-09-12T15:25:29+08:00" level=info msg="Connecting to broker" 
remote_addr="pulsar://opdpulsarretry.kgidc.cn:31002"
   
   
   
   
   [go 
stack.txt](https://github.com/user-attachments/files/17009230/go.stack.txt)
   
   
   


-- 
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]

Reply via email to