zymap commented on issue #7824:
URL: https://github.com/apache/pulsar/issues/7824#issuecomment-690838465


   I tried using 2.6.0 test it, it looks good.
   I deployed a k8s cluster to test it.
   This is my testing value.yml 
https://github.com/zymap/charts/commit/a719980acc9295c33d1f96792386a893691a52a3
   This is my test program: 
    https://gist.github.com/zymap/98c2b7462a8d8432f452772af23862fb
   https://gist.github.com/zymap/801e45bc0b5be4440c35654efae5d8d3
   
   I was using pulsar-client 2.6.0 and the python version is 3.8.
   
   When the token is expired, pulsar will request the client re-authenticate 
and if the client gives a wrong token, pulsar will close the connection 
immediately and the client can not connect the Pulsar. 
   
   This is the producer log:
   
   ```
   Send messages Current time Sep-11-02:22:10 AM 2020
   Send messages Current time Sep-11-02:22:11 AM 2020
   Send messages Current time Sep-11-02:22:12 AM 2020
   Send messages Current time Sep-11-02:22:13 AM 2020
   Send messages Current time Sep-11-02:22:14 AM 2020
   Send messages Current time Sep-11-02:22:15 AM 2020
   Send messages Current time Sep-11-02:22:16 AM 2020
   Send messages Current time Sep-11-02:22:17 AM 2020
   Send messages Current time Sep-11-02:22:18 AM 2020
   Send messages Current time Sep-11-02:22:19 AM 2020
   Send messages Current time Sep-11-02:22:20 AM 2020
   Send messages Current time Sep-11-02:22:21 AM 2020
   2020-09-11 02:22:22.599 WARN  [139649724466944] ClientConnection:939 | 
[192.168.90.216:43770 -> 10.100.89.185:6650] Received error response from 
server: AuthenticationError -- req_id: 18446744073709551615
   2020-09-11 02:22:22.600 INFO  [139649724466944] ClientConnection:1372 | 
[192.168.90.216:43770 -> 10.100.89.185:6650] Connection closed
   2020-09-11 02:22:22.600 INFO  [139649724466944] HandlerBase:130 | 
[persistent://public/default/ttl_token_1, auth-test-pulsar-0-6] Schedule 
reconnection in 0.1 s
   2020-09-11 02:22:22.600 INFO  [139649724466944] ClientConnection:235 | 
[192.168.90.216:43770 -> 10.100.89.185:6650] Destroyed connection
   2020-09-11 02:22:22.700 INFO  [139649724466944] HandlerBase:53 | 
[persistent://public/default/ttl_token_1, auth-test-pulsar-0-6] Getting 
connection from pool
   2020-09-11 02:22:22.712 ERROR [139649724466944] ClientConnection:870 | 
[192.168.90.216:43764 -> 10.100.89.185:6650] Failed lookup req_id: 3 error: 6
   2020-09-11 02:22:22.712 INFO  [139649724466944] HandlerBase:130 | 
[persistent://public/default/ttl_token_1, auth-test-pulsar-0-6] Schedule 
reconnection in 0.194 s
   2020-09-11 02:22:22.907 INFO  [139649724466944] HandlerBase:53 | 
[persistent://public/default/ttl_token_1, auth-test-pulsar-0-6] Getting 
connection from pool
   2020-09-11 02:22:22.915 ERROR [139649724466944] ClientConnection:870 | 
[192.168.90.216:43764 -> 10.100.89.185:6650] Failed lookup req_id: 4 error: 6
   2020-09-11 02:22:22.915 INFO  [139649724466944] HandlerBase:130 | 
[persistent://public/default/ttl_token_1, auth-test-pulsar-0-6] Schedule 
reconnection in 0.372 s
   2020-09-11 02:22:23.287 INFO  [139649724466944] HandlerBase:53 | 
[persistent://public/default/ttl_token_1, auth-test-pulsar-0-6] Getting 
connection from pool
   2020-09-11 02:22:23.297 ERROR [139649724466944] ClientConnection:870 | 
[192.168.90.216:43764 -> 10.100.89.185:6650] Failed lookup req_id: 5 error: 6
   2020-09-11 02:22:23.297 INFO  [139649724466944] HandlerBase:130 | 
[persistent://public/default/ttl_token_1, auth-test-pulsar-0-6] Schedule 
reconnection in 0.776 s
   2020-09-11 02:22:24.074 INFO  [139649724466944] HandlerBase:53 | 
[persistent://public/default/ttl_token_1, auth-test-pulsar-0-6] Getting 
connection from pool
   2020-09-11 02:22:24.081 ERROR [139649724466944] ClientConnection:870 | 
[192.168.90.216:43764 -> 10.100.89.185:6650] Failed lookup req_id: 6 error: 6
   2020-09-11 02:22:24.081 INFO  [139649724466944] HandlerBase:130 | 
[persistent://public/default/ttl_token_1, auth-test-pulsar-0-6] Schedule 
reconnection in 1.472 s
   2020-09-11 02:22:25.553 INFO  [139649724466944] HandlerBase:53 | 
[persistent://public/default/ttl_token_1, auth-test-pulsar-0-6] Getting 
connection from pool
   2020-09-11 02:22:25.561 ERROR [139649724466944] ClientConnection:870 | 
[192.168.90.216:43764 -> 10.100.89.185:6650] Failed lookup req_id: 7 error: 6
   2020-09-11 02:22:25.561 INFO  [139649724466944] HandlerBase:130 | 
[persistent://public/default/ttl_token_1, auth-test-pulsar-0-6] Schedule 
reconnection in 3.04 s
   2020-09-11 02:22:28.603 INFO  [139649724466944] HandlerBase:53 | 
[persistent://public/default/ttl_token_1, auth-test-pulsar-0-6] Getting 
connection from pool
   2020-09-11 02:22:28.612 ERROR [139649724466944] ClientConnection:870 | 
[192.168.90.216:43764 -> 10.100.89.185:6650] Failed lookup req_id: 8 error: 6
   2020-09-11 02:22:28.612 INFO  [139649724466944] HandlerBase:130 | 
[persistent://public/default/ttl_token_1, auth-test-pulsar-0-6] Schedule 
reconnection in 5.824 s
   ^\Quit (core dumped)
   (.py38) root@auth-test-pulsar-toolset-0:/pulsar/python-test#
   ```
   
   And this is the consumer log:
   
   ```
   Receive msg Token messages tests Sep-11-02:22:11 AM 2020
   Receive msg Token messages tests Sep-11-02:22:12 AM 2020
   Receive msg Token messages tests Sep-11-02:22:13 AM 2020
   Receive msg Token messages tests Sep-11-02:22:14 AM 2020
   Receive msg Token messages tests Sep-11-02:22:15 AM 2020
   Receive msg Token messages tests Sep-11-02:22:16 AM 2020
   Receive msg Token messages tests Sep-11-02:22:17 AM 2020
   Receive msg Token messages tests Sep-11-02:22:18 AM 2020
   Receive msg Token messages tests Sep-11-02:22:19 AM 2020
   Receive msg Token messages tests Sep-11-02:22:20 AM 2020
   Receive msg Token messages tests Sep-11-02:22:21 AM 2020
   2020-09-11 02:22:22.600 WARN  [140386834253568] ClientConnection:939 | 
[192.168.90.216:43740 -> 10.100.89.185:6650] Received error response from 
server: AuthenticationError -- req_id: 18446744073709551615
   2020-09-11 02:22:22.600 INFO  [140386834253568] ClientConnection:1372 | 
[192.168.90.216:43740 -> 10.100.89.185:6650] Connection closed
   2020-09-11 02:22:22.600 INFO  [140386834253568] HandlerBase:130 | 
[persistent://public/default/ttl_token_1, tests, 0] Schedule reconnection in 
0.1 s
   2020-09-11 02:22:22.600 INFO  [140386834253568] ClientConnection:235 | 
[192.168.90.216:43740 -> 10.100.89.185:6650] Destroyed connection
   2020-09-11 02:22:22.644 WARN  [140386834253568] AckGroupingTrackerEnabled:99 
| Connection is not ready, grouping ACK failed.
   2020-09-11 02:22:22.701 INFO  [140386834253568] HandlerBase:53 | 
[persistent://public/default/ttl_token_1, tests, 0] Getting connection from pool
   2020-09-11 02:22:22.712 ERROR [140386834253568] ClientConnection:870 | 
[192.168.90.216:43734 -> 10.100.89.185:6650] Failed lookup req_id: 3 error: 6
   2020-09-11 02:22:22.713 INFO  [140386834253568] HandlerBase:130 | 
[persistent://public/default/ttl_token_1, tests, 0] Schedule reconnection in 
0.194 s
   2020-09-11 02:22:22.745 WARN  [140386834253568] AckGroupingTrackerEnabled:99 
| Connection is not ready, grouping ACK failed.
   2020-09-11 02:22:22.845 WARN  [140386834253568] AckGroupingTrackerEnabled:99 
| Connection is not ready, grouping ACK failed.
   2020-09-11 02:22:22.907 INFO  [140386834253568] HandlerBase:53 | 
[persistent://public/default/ttl_token_1, tests, 0] Getting connection from pool
   ```
   
   You can see the producer and consumer is no longer produce or consume 
messages.
   
   
   @cuzyoucant Do have more information about this issue?  


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to