Technoboy- opened a new pull request #12345:
URL: https://github.com/apache/pulsar/pull/12345


   ## 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)
 
   ```


-- 
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: [email protected]

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


Reply via email to