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 2022/03/16 03:55:44 UTC

[GitHub] [pulsar] kwenZh opened a new issue #14707: Advertised multiple addresses,pulasr client acess broker from broker's service NodePort , accidental error: Namespace is being unloaded

kwenZh opened a new issue #14707:
URL: https://github.com/apache/pulsar/issues/14707


   **Describe the bug**
   
   i am deploying a Pulsar cluster in k8s and want other clients which are not in the same k8s cluster with the Pulsar cluster can connect to the Pulsar cluster,   i want to configurations broker service nodePort in `advertisedListeners` to implement 。and client use broke service nodePort, but it  accidental seems error:  12:10:37.036 [pulsar-io-4-3] WARN org.apache.pulsar.broker.namespace.NamespaceService - Unable to find OwnedBundle for topic - ,   Namespace is being unloaded, 
   
   such as i want to use   following config --listener-name external to access
   
   pulsar version: 2.8.1
   
   broker statefulset replices count: 3
   
   broker service info:
   ```
   pulsar-cluster-broker LoadBalancer x.x.x.x <pending> 8080:32696/TCP,6650:31024/TCP 22h
   ```
   
   config `advertisedListeners` in broker.conf 
   
   ```
   advertisedListeners: "internal:pulsar://pulsar-cluster-broker-0.pulsar-cluster-broker.pulsar.svc.cluster.local:6650,external:pulsar://k8s-vip:31024"
   ```
     
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. Go to     'configurations  broker.conf‘s advertisedListeners, add broker service nodePort'
   2. Click on '....  other clients which are not in the same k8s cluster with the Pulsar cluster , to access external listener-name , 
   command is 
   ```
   bin/pulsar-client --listener-name external --url pulsar://k8s-vip:31024 consume persistent://public/default/test-zyk-1 -n 0 -s "zyk-sub"
   ```
   3. . Scroll down to '....'
   4. See error:
   
   There are occasional errors when using the client
   
   client error:
   ```
   09:47:59.110 [pulsar-client-io-1-1] WARN org.apache.pulsar.client.impl.ClientCnx - [id: 0x0c64a320, L:/x.x.x.x:33112 - R:k8s-vip/k8s-vip:31024] Received error from server: Namespace is being unloaded, cannot add topic persistent://public/default/test-zyk-1-partition-0
   09:47:59.110 [pulsar-client-io-1-1] WARN org.apache.pulsar.client.impl.ConsumerImpl - [persistent://public/default/test-zyk-1-partition-0][zyk-sub] Failed to subscribe to topic on k8s-vip/k8s-vip:31024
   09:47:59.110 [pulsar-client-io-1-1] WARN org.apache.pulsar.client.impl.ConnectionHandler - [persistent://public/default/test-zyk-1-partition-0] [zyk-sub] Could not get connection to broker: Namespace is being unloaded, cannot add topic persistent://public/default/test-zyk-1-partition-0 -- Will try again in 11.667 s
   09:47:59.435 [pulsar-timer-5-1] INFO org.apache.pulsar.client.impl.ConnectionHandler - [persistent://public/default/test-zyk-1-partition-2] [zyk-sub] Reconnecting after connection was closed
   ```
   
   broker error: broker-0
   ```
   12:10:37.036 [pulsar-io-4-3] WARN org.apache.pulsar.broker.namespace.NamespaceService - Unable to find OwnedBundle for topic - [persistent://public/default/test-zyk-1-partition-1]
   12:10:37.036 [pulsar-io-4-3] WARN org.apache.pulsar.broker.service.BrokerService - Namespace is being unloaded, cannot add topic persistent://public/default/test-zyk-1-partition-1
   12:10:37.036 [pulsar-io-4-3] WARN org.apache.pulsar.broker.service.ServerCnx - [/x.x.x.x:50478][persistent://public/default/test-zyk-1-partition-1][zyk-sub] Failed to create consumer: consumerId=1, Namespace is being unloaded, cannot add topic persistent://public/default/test-zyk-1-partition-1
   ```
   
   sometims normaly broker log info, broker-2
   ```
   12:12:39.101 [pulsar-io-4-3] INFO org.apache.pulsar.broker.service.ServerCnx - [/x.x.81.52:38242] Subscribing on topic persistent://public/default/test-zyk-1-partition-2 / zyk-sub
   12:12:39.102 [pulsar-io-4-3] INFO org.apache.bookkeeper.mledger.impl.ManagedCursorImpl - [public/default/persistent/test-zyk-1-partition-2-zyk-sub] Rewind from 168:15 to 168:15
   12:12:39.102 [pulsar-io-4-3] INFO org.apache.pulsar.broker.service.persistent.PersistentTopic - [persistent://public/default/test-zyk-1-partition-2] There are no replicated subscriptions on the topic
   12:12:39.102 [pulsar-io-4-3] INFO org.apache.pulsar.broker.service.persistent.PersistentTopic - [persistent://public/default/test-zyk-1-partition-2][zyk-sub] Created new subscription for 2
   12:12:39.102 [pulsar-io-4-3] INFO org.apache.pulsar.broker.service.ServerCnx - [/x.x.81.52:38242] Created subscription on topic persistent://public/default/test-zyk-1-partition-2 / zyk-sub
   12:12:39.105 [pulsar-io-4-3] INFO org.apache.pulsar.broker.service.ServerCnx - [/x.x.81.52:38242] Subscribing on topic persistent://public/default/test-zyk-1-partition-1 / zyk-sub
   12:12:39.105 [pulsar-io-4-3] INFO org.apache.bookkeeper.mledger.impl.ManagedCursorImpl - [public/default/persistent/test-zyk-1-partition-1-zyk-sub] Rewind from 170:12 to 170:12
   12:12:39.105 [pulsar-io-4-3] INFO org.apache.pulsar.broker.service.persistent.PersistentTopic - [persistent://public/default/test-zyk-1-partition-1] There are no replicated subscriptions on the topic
   12:12:39.106 [pulsar-io-4-3] INFO org.apache.pulsar.broker.service.persistent.PersistentTopic - [persistent://public/default/test-zyk-1-partition-1][zyk-sub] Created new subscription for 1
   12:12:39.106 [pulsar-io-4-3] INFO org.apache.pulsar.broker.service.ServerCnx - [/x.x.81.52:38242] Created subscription on topic persistent://public/default/test-zyk-1-partition-1 / zyk-sub
   12:12:39.106 [pulsar-io-4-3] INFO org.apache.pulsar.broker.service.ServerCnx - [/x.x.81.52:38242] Subscribing on topic persistent://public/default/test-zyk-1-partition-0 / zyk-sub
   12:12:39.106 [pulsar-io-4-3] INFO org.apache.bookkeeper.mledger.impl.ManagedCursorImpl - [public/default/persistent/test-zyk-1-partition-0-zyk-sub] Rewind from 169:13 to 169:13
   12:12:39.108 [pulsar-io-4-3] INFO org.apache.pulsar.broker.service.persistent.PersistentTopic - [persistent://public/default/test-zyk-1-partition-0] There are no replicated subscriptions on the topic
   12:12:39.108 [pulsar-io-4-3] INFO org.apache.pulsar.broker.service.persistent.PersistentTopic - [persistent://public/default/test-zyk-1-partition-0][zyk-sub] Created new subscription for 0
   12:12:39.108 [pulsar-io-4-3] INFO org.apache.pulsar.broker.service.ServerCnx - [/x.x.81.52:38242] Created subscription on topic persistent://public/default/test-zyk-1-partition-0 / zyk-sub
   12:13:20.724 [pulsar-io-4-3] INFO org.apache.pulsar.broker.service.AbstractDispatcherSingleActiveConsumer - Removing consumer Consumer{subscription=PersistentSubscription{topic=persistent://public/default/test-zyk-1-partition-0, name=zyk-sub}, consumerId=0, consumerName=126dc, address=/x.x.81.52:38242}
   12:13:20.724 [pulsar-io-4-3] INFO org.apache.pulsar.broker.service.AbstractDispatcherSingleActiveConsumer - Removing consumer Consumer{subscription=PersistentSubscription{topic=persistent://public/default/test-zyk-1-partition-2, name=zyk-sub}, consumerId=2, consumerName=126dc, address=/x.x.81.52:38242}
   12:13:20.724 [pulsar-io-4-3] INFO org.apache.pulsar.broker.service.AbstractDispatcherSingleActiveConsumer - Removing consumer Consumer{subscription=PersistentSubscription{topic=persistent://public/default/test-zyk-1-partition-1, name=zyk-sub}, consumerId=1, consumerName=126dc, address=/x.x.81.52:38242}
   ```
   
   i think it is broker service in k8s , choice  one of broker cluster, and topic do not below with bundle in this broker pod  ?
   
   
   
   
   **Expected behavior**
   A
   **Screenshots**
   If applicable, add screenshots to help explain your problem.
   
   
   **Desktop (please complete the following information):**
    - OS: centos
    - pulsar version: 2.8.1
   
   **Additional context**
   
   other clients which are not in the same k8s cluster with the Pulsar cluster , access by pulsar-proxy’s nodePort is normally


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] kwenZh edited a comment on issue #14707: Advertised multiple addresses,pulasr client acess broker from broker's service NodePort , accidental error: Namespace is being unloaded

Posted by GitBox <gi...@apache.org>.
kwenZh edited a comment on issue #14707:
URL: https://github.com/apache/pulsar/issues/14707#issuecomment-1069157361


   > > set external url is broker pod in k8s node ip? not a Virtual IP?
   > 
   > Yes, it should be a broker external IP:PORT
   
   thanks a lot , i had verify and test this problem in afternoon,
   
    i think the main reason is that one broker service nat many broker pod is random, not one to one,  Broker addresses that are not returned by the lookup may be accessed。so the corresponding 
    bundle  is not belong to this broker ,  so it seems error: namespace is unload 
   
   it should use  create each service for mapping each broker pod, this issue can close。


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] kwenZh commented on issue #14707: Advertised multiple addresses,pulasr client acess broker from broker's service NodePort , accidental error: Namespace is being unloaded

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


   > > set external url is broker pod in k8s node ip? not a Virtual IP?
   > 
   > Yes, it should be a broker external IP:PORT
   
   thanks a lot , i had verify and test this problem in afternoon, it should use be K8s worker node ip + port,  not a vip, then create each service for mapping each broker pod, this issue can close。


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] kwenZh commented on issue #14707: Advertised multiple addresses,pulasr client acess broker from broker's service NodePort , accidental error: Namespace is being unloaded

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


    set external   url  is broker pod in k8s node ip?  not a Virtual IP?


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] kwenZh closed issue #14707: Advertised multiple addresses,pulasr client acess broker from broker's service NodePort , accidental error: Namespace is being unloaded

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


   


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] kwenZh commented on issue #14707: Advertised multiple addresses,pulasr client acess broker from broker's service NodePort , accidental error: Namespace is being unloaded

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


   Is this a normal phenomenon? Just retry?


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] codelipenghui commented on issue #14707: Advertised multiple addresses,pulasr client acess broker from broker's service NodePort , accidental error: Namespace is being unloaded

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


   > set external url is broker pod in k8s node ip? not a Virtual IP?
   
   Yes, it should be a broker external IP:PORT


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org