You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/07/07 13:21:47 UTC

[GitHub] [pulsar] meleagle opened a new issue #7469: NPE when using multiple advertised listeners with openmessaging

meleagle opened a new issue #7469:
URL: https://github.com/apache/pulsar/issues/7469


   **Describe the bug**
   When using openmessaging (http://openmessaging.cloud) to benchmark a pulsar cluster that we are using in openstack a NPE is being produced. The pulsar version is 2.6.0 and there is two advertised listeners, one of the private ip and is set as the internalListenerName and the other is the external one that we want the consumer to use to connect and communicate with the brokers. The listenerName is specified in the client config and the communication starts out as successful as a tenant is created. After this a NPE is thrown and everything fails.
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. The implementation of openmessaging is fairly modified and does not have an easy setup, but the stacktrace for the error is shown below:
   
   ```
   08:03:48.036 [pulsar-1-12] INFO  org.apache.pulsar.broker.namespace.OwnershipCache - Trying to acquire ownership of benchmark/ns-Hxu5oLk/0x00000000_0x40000000
   08:03:48.022 [pulsar-ordered-OrderedExecutor-7-0-EventThread] WARN  org.apache.pulsar.broker.lookup.TopicLookupBase - Failed to lookup null for topic persistent://benchmark/ns-Hxu5oLk/test-0tRnnmQ-0000-partition-2 with error org.apache.pulsar.broker.PulsarServerException: Failed to acquire ownership for namespace bundle benchmark/ns-Hxu5oLk/0x40000000_0x80000000
   java.util.concurrent.CompletionException: org.apache.pulsar.broker.PulsarServerException: Failed to acquire ownership for namespace bundle benchmark/ns-Hxu5oLk/0x40000000_0x80000000
           at java.util.concurrent.CompletableFuture.encodeRelay(CompletableFuture.java:326) ~[?:1.8.0_222]
           at java.util.concurrent.CompletableFuture.completeRelay(CompletableFuture.java:338) ~[?:1.8.0_222]
           at java.util.concurrent.CompletableFuture.uniRelay(CompletableFuture.java:911) ~[?:1.8.0_222]
           at java.util.concurrent.CompletableFuture$UniRelay.tryFire(CompletableFuture.java:899) ~[?:1.8.0_222]
           at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474) ~[?:1.8.0_222]
           at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1977) ~[?:1.8.0_222]
           at org.apache.pulsar.broker.namespace.NamespaceService.lambda$searchForCandidateBroker$11(NamespaceService.java:510) ~[org.apache.pulsar-pulsar-broker-2.6.0.jar:2.6.0]
           at java.util.concurrent.CompletableFuture.uniExceptionally(CompletableFuture.java:870) ~[?:1.8.0_222]
           at java.util.concurrent.CompletableFuture$UniExceptionally.tryFire(CompletableFuture.java:852) ~[?:1.8.0_222]
           at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474) ~[?:1.8.0_222]
           at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1962) ~[?:1.8.0_222]
           at org.apache.pulsar.broker.namespace.OwnershipCache.lambda$tryAcquiringOwnership$1(OwnershipCache.java:231) ~[org.apache.pulsar-pulsar-broker-2.6.0.jar:2.6.0]
           at java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:656) ~[?:1.8.0_222]
           at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:632) ~[?:1.8.0_222]
           at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474) ~[?:1.8.0_222]
           at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1962) ~[?:1.8.0_222]
           at org.apache.pulsar.broker.namespace.OwnershipCache$OwnedServiceUnitCacheLoader.lambda$asyncLoad$0(OwnershipCache.java:141) ~[org.apache.pulsar-pulsar-broker-2.6.0.jar:2.6.0]
           at org.apache.bookkeeper.util.ZkUtils$1.processResult(ZkUtils.java:80) [org.apache.bookkeeper-bookkeeper-server-4.10.0.jar:4.10.0]
           at org.apache.bookkeeper.zookeeper.ZooKeeperClient$10$1.processResult(ZooKeeperClient.java:737) [org.apache.bookkeeper-bookkeeper-server-4.10.0.jar:4.10.0]
           at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:636) [org.apache.pulsar-pulsar-zookeeper-2.6.0.jar:2.6.0]
           at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:510) [org.apache.pulsar-pulsar-zookeeper-2.6.0.jar:2.6.0]
   Caused by: org.apache.pulsar.broker.PulsarServerException: Failed to acquire ownership for namespace bundle benchmark/ns-Hxu5oLk/0x40000000_0x80000000
           ... 15 more
   Caused by: java.util.concurrent.CompletionException: java.lang.NullPointerException
           at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273) ~[?:1.8.0_222]
           at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280) ~[?:1.8.0_222]
           at java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:659) ~[?:1.8.0_222]
           at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:632) ~[?:1.8.0_222]
           ... 12 more
   Caused by: java.lang.NullPointerException
           at org.apache.pulsar.broker.namespace.NamespaceService.lambda$searchForCandidateBroker$10(NamespaceService.java:500) ~[org.apache.pulsar-pulsar-broker-2.6.0.jar:2.6.0]
           at java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:656) ~[?:1.8.0_222]
           at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:632) ~[?:1.8.0_222]
           ... 12 more
   ```
   
   **Expected behavior**
   Client connects to the brokers successfully and the benchmarking can complete without error.
   
   **Desktop (please complete the following information):**
    - Windows 10 running with WSL 1
   
   **Additional context**
   After looking at the stacktrace, I was able to get the NPE to go away by modifying the NamespaceService.java class at line 500. It appears that the tls service url is getting a toString() call when it is null as security is not enabled on our clusters currently. Although the modification did fix the issue it is not a permanent fix and wasn't sure if any other issues could arise from this bug.
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] wolfstudy closed issue #7469: NPE when using multiple advertised listeners with openmessaging

Posted by GitBox <gi...@apache.org>.
wolfstudy closed issue #7469:
URL: https://github.com/apache/pulsar/issues/7469


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] wolfstudy commented on issue #7469: NPE when using multiple advertised listeners with openmessaging

Posted by GitBox <gi...@apache.org>.
wolfstudy commented on issue #7469:
URL: https://github.com/apache/pulsar/issues/7469#issuecomment-664803227


   Move the task to 2.6.1, and when #7620 is merged, will close 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:
users@infra.apache.org