Skip to content

Conversation

@Technoboy-
Copy link
Contributor

Motivation

PersistentTopic#subscribe doesn't print other exceptions such as NPE. which could not help us to locate the cause of the problem.

Example stack

21:58:30.785 [pulsar-io-4-3] INFO  org.apache.pulsar.broker.service.ServerCnx - [/10.28.2.2:54474] Subscribing on topic persistent://public/product-full-prod/6827 / maestro-marek2
21:58:30.786 [pulsar-io-4-3] INFO  org.apache.pulsar.broker.service.persistent.PersistentTopic - [persistent://public/product-full-prod/6827][maestro-marek2] Creating non-durable subscription at msg id -1:-1:-1:-1
21:58:30.786 [pulsar-io-4-3] INFO  org.apache.bookkeeper.mledger.impl.NonDurableCursorImpl - [public/product-full-prod/persistent/6827] Created non-durable cursor read-position=88853:0 mark-delete-position=88853:-1
21:58:30.786 [pulsar-io-4-3] INFO  org.apache.bookkeeper.mledger.impl.ManagedLedgerImpl - [public/product-full-prod/persistent/6827] Opened new cursor: NonDurableCursorImpl{ledger=public/product-full-prod/persistent/6827, ackPos=88853:-1, readPos=88853:0}
21:58:30.786 [pulsar-io-4-3] INFO  org.apache.bookkeeper.mledger.impl.ManagedCursorImpl - [public/product-full-prod/persistent/6827-maestro-marek2] Rewind from 88853:0 to 88853:0
21:58:30.786 [pulsar-io-4-3] WARN  org.apache.pulsar.broker.service.ServerCnx - [/10.28.2.2:54474][persistent://public/product-full-prod/6827][maestro-marek2] Failed to create consumer: consumerId=1, null
java.util.concurrent.CompletionException: java.lang.NullPointerException
	at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314) ~[?:?]
	at java.util.concurrent.CompletableFuture.uniAcceptNow(CompletableFuture.java:757) ~[?:?]
	at java.util.concurrent.CompletableFuture.uniAcceptStage(CompletableFuture.java:731) ~[?:?]
	at java.util.concurrent.CompletableFuture.thenAccept(CompletableFuture.java:2108) ~[?:?]
	at org.apache.pulsar.broker.service.persistent.PersistentTopic.lambda$subscribe$14(PersistentTopic.java:762)
	at java.util.concurrent.CompletableFuture.uniAcceptNow(CompletableFuture.java:753) ~[?:?]
	at java.util.concurrent.CompletableFuture.uniAcceptStage(CompletableFuture.java:731) ~[?:?]
	at java.util.concurrent.CompletableFuture.thenAccept(CompletableFuture.java:2108) ~[?:?]
	at org.apache.pulsar.broker.service.persistent.PersistentTopic.subscribe(PersistentTopic.java:758) 
	at org.apache.pulsar.broker.service.ServerCnx.lambda$null$13(ServerCnx.java:1017) 
	at java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:1106) ~[?:?]
	at java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2235) ~[?:?]
	at org.apache.pulsar.broker.service.ServerCnx.lambda$handleSubscribe$16(ServerCnx.java:988) 

@Technoboy- Technoboy- changed the title Add log to print exception stack. [Branch-2.8] Add log to print exception stack. Oct 13, 2021
@Anonymitaet Anonymitaet added the doc-not-needed Your PR changes do not impact docs label Oct 14, 2021
@BewareMyPower
Copy link
Contributor

I've fixed the broken branch-2.8 by cherry-picking #11668 and revert some wrong cherry-pick operations before. Please rebase to branch-2.8.

@codelipenghui codelipenghui merged commit a5ae0cf into apache:branch-2.8 Oct 15, 2021
@codelipenghui codelipenghui added the cherry-picked/branch-2.8 Archived: 2.8 is end of life label Oct 21, 2021
@Technoboy- Technoboy- deleted the add-log-2 branch August 10, 2022 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-picked/branch-2.8 Archived: 2.8 is end of life doc-not-needed Your PR changes do not impact docs release/2.8.2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants