You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/12/15 14:34:58 UTC

[GitHub] [pulsar] wenbingshen opened a new issue #13342: [BUG]

wenbingshen opened a new issue #13342:
URL: https://github.com/apache/pulsar/issues/13342


   **Describe the bug**
   Master issue: #13061 https://github.com/apache/pulsar-client-go/issues/676
   Pulsar version:2.8.1
   
   After our investigation, this problem occurs when the ping/pong between the client and the server gradually deviates, until the client senses that the connection is closed, and the connection close operation fails due to network reasons, and the underlying network is not disconnected, resulting in pulsar The broker is still waiting for the ping/pong to time out, but the client has already used the same PartitionProducer, reconnected via the network (changed the port), and started AddProducer to the pulsar broker.
   
   https://github.com/apache/pulsar/pull/11804, this PR rewrites the equals method of the Producer, resulting in that when different   `pulsar-client-go` uses different port to reconnect, the ` old producer` cannot be removed because the `remoteAddress` will be verified by equals:
   ``` java
   if (producers.remove(producer.getProducerName(), producer)) {
   ```
   
   https://github.com/apache/pulsar/pull/12846, this pr removes `equals` and will use `hashcode` for judgment. At this time, the 
    `old producer ` cannot be removed.
   
   This problem can be closed when the pulsar broker perceives ping/pong timeout, or the channel is abnormal, and the connection can be closed, and the producer state can be cleaned up. When the client AddProducer again, it can be restored; but during this period, the client reconnects and starts the add producer. The broker will always report an error: `Producer with name is already connect to topic`.
   
   Therefore, I feel that the current protocol cannot fully prove whether the producer client can overwrite itself. It may be necessary to add some fields to prove: I am me
   
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. Change broker keepAliveIntervalSeconds=100
   2. You can choose a pulsar client in any language, such as pulsar-client-go or java and other clients
   3. Use the client to send data to the pulsar server
   4. Use a firewall to disconnect the network between the client and the broker. The time is maintained in 60s. After waiting for 60 seconds, close the firewall
   5. Now, you can check the broker log, at this time you can see the error: `Producer with name is already connect to topic`
   
   **Expected behavior**
   A clear and concise description of what you expected to happen.
   
   


-- 
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-unsubscribe@pulsar.apache.org

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



[GitHub] [pulsar] wenbingshen commented on issue #13342: [BUG] Producer with name xxx is already connect to topic

Posted by GitBox <gi...@apache.org>.
wenbingshen commented on issue #13342:
URL: https://github.com/apache/pulsar/issues/13342#issuecomment-1000024148


   > Could you confirm whether #13428 fixed the problem?
   
   I don't think the problem is solved, because when the problem occurs, the `channelInactive` method is not entered, that is, after the producer reconnect, the old connection still does not trigger `channelInactive`.
   
   I just built a test with the master branch (including #13428 ), and the repeat steps described in the issue can still be reproduced stably.
   
   ![image](https://user-images.githubusercontent.com/35599757/147185572-cc7c8db2-eaf6-4645-b948-313196ceb5d6.png)
   
   ![image](https://user-images.githubusercontent.com/35599757/147185585-85ef9d36-6605-4331-bf45-4f103ee87676.png)
   
   


-- 
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-unsubscribe@pulsar.apache.org

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



[GitHub] [pulsar] wenbingshen commented on issue #13342: [BUG] Producer with name xxx is already connect to topic

Posted by GitBox <gi...@apache.org>.
wenbingshen commented on issue #13342:
URL: https://github.com/apache/pulsar/issues/13342#issuecomment-994852435


   @codelipenghui @BewareMyPower 


-- 
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-unsubscribe@pulsar.apache.org

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



[GitHub] [pulsar] BewareMyPower commented on issue #13342: [BUG] Producer with name xxx is already connect to topic

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on issue #13342:
URL: https://github.com/apache/pulsar/issues/13342#issuecomment-994858815


   It looks like the same issue with https://github.com/apache/pulsar/issues/13289. /cc @aloyszhang 


-- 
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-unsubscribe@pulsar.apache.org

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



[GitHub] [pulsar] BewareMyPower commented on issue #13342: [BUG] Producer with name xxx is already connect to topic

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on issue #13342:
URL: https://github.com/apache/pulsar/issues/13342#issuecomment-999359570


   Could you confirm whether https://github.com/apache/pulsar/pull/13428 fixed the problem?


-- 
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-unsubscribe@pulsar.apache.org

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



[GitHub] [pulsar] github-actions[bot] commented on issue #13342: [BUG] Producer with name xxx is already connect to topic

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #13342:
URL: https://github.com/apache/pulsar/issues/13342#issuecomment-1051438790


   The issue had no activity for 30 days, mark with Stale label.


-- 
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-unsubscribe@pulsar.apache.org

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