question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot set topic retention policy (error 500)

See original GitHub issue

Describe the bug I have a namespace with 4 day retention policy:

pulsar-admin namespaces create tenant/ns
pulsar-admin namespaces set-retention --size -1 --time 4d tenant/ns

I also have topic-level policy enabled:

# Enable or disable system topic
systemTopicEnabled=true

# The schema compatibility strategy to use for system topics
systemTopicSchemaCompatibilityStrategy=ALWAYS_COMPATIBLE

# Enable or disable topic level policies, topic level policies depends on the system topic
# Please enable the system topic first.
topicLevelPoliciesEnabled=true

When I attempt to turn off the retention policy for a single topic, I get either an error 504(Bad gateway) when going through pulsar-proxy or an error 500 if issuing the command from the broker with pulsar-admin:

./pulsar-admin topics set-retention -s 0 -t 0 tenant/ns/mytopic
00:20:36.472 [AsyncHttpClient-7-1] WARN  org.apache.pulsar.client.admin.internal.BaseResource - [http://localhost:8080/admin/v2/persistent/tenant/ns/mytopic/retention] Failed to perform http post request: javax.ws.rs.InternalServerErrorException: HTTP 500 Internal Server Error
HTTP 500 Internal Server Error

The result is the same when attempting to change size or time to any value, not just 0. There is nothing in the broker or pulsar-proxy logs to indicate the nature of this failure. get-retention for the topic appears to work (returns null), and delete-retention appears to succeed, even though no retention policy is set for the topic, but I cannot be sure, since I cannot set the policy for the topic.

Expected behavior Topic policy changed

Desktop (please complete the following information):

  • OS: n/a

Additional context The build is at current HEAD for 2.7 branch, so 2.7.5-SNAPSHOT

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
flowchartsmancommented, Feb 10, 2022
maxConcurrentLookupRequest=50000

There are multiple brokers, and this is going through the proxy and it never succeeds, so does it make sense that all brokers are overloaded all the time?

0reactions
flowchartsmancommented, Mar 16, 2022

This appears to have been resolved by an update.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix "List cannot be deleted while on hold or retention policy ...
This error is due to the site being under hold or retention policy. So, to delete the list, you must delete all its...
Read more >
Error when creating a retention policy in Security & Compliance
I'm trying to create a retention policy to retain the data on OneDrive for Business, but when I click on "create this policy"...
Read more >
Message retention and expiry - Apache Pulsar
Set retention policy ​ · When the size of messages reaches 10 GB on a topic within 3 hours, the acknowledged messages will...
Read more >
PutRetentionPolicy - Amazon CloudWatch Logs
The service cannot complete the request. HTTP Status Code: 500. Examples. To create or update a retention policy for a log group. The...
Read more >
500 server error trying to view traffic stats - Ubiquiti Community
Cannot view stats sometimes it gives me error 500. ... Any update on this issue? ... I set data retention policy based on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found