Skip to content

Endless Topic HTTP Request Redirects #13946

@rfmyuk

Description

@rfmyuk

Describe the bug
Admin REST HTTP Request on topic may redirect multiple times to different broker endlessly.

This bug occurs randomly and at inconsistent times.

(The HTTP request must be related to topic ownership, e.g. get topic subscription, stats, etc...)

To Reproduce
Steps to reproduce the behavior:

  1. Setup a Pulsar Cluster with 3 BookKeepers, 3 Global ZooKeepers, 3 ZooKeepers and 3 Brokers, and add JWT Authentication.
  2. Open Postman (or any HTTP Client) and disable "Automatically follow redirects" in Settings.
  3. Have the cluster up for a while (can be hours/days).
  4. Send an HTTP request to create a topic.
  5. If you get a redirect, follow the redirect (send the request to the IP in the "Location" header).
  6. Keep following the redirects and you never get a response.

I used this broker.conf.

If you enable automatically follow redirects, the request will eventually return unauthorized 401 even though I provide a valid JWT that works with other non-topic related requests.

Shutting down 2 brokers (out of 3), inevitbly resolves the issue since there would be only one topic owner.

Expected behavior
I expect the redirects to eventually give me a broker that has the response for my request.

Desktop (please complete the following information):

  • OS: CentOS 7

Additional context
Pulsar Version: 2.8.2 - 2.8.3 (may affect more versions, not tested)

As requested by @lhotari
jstack dumps:
Bugged when 3 brokers are up:

Not bugged when 1 broker is up:

Metadata

Metadata

Assignees

Labels

area/admintype/bugThe PR fixed a bug or issue reported a bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions