trynocoding commented on issue #601: URL: https://github.com/apache/pulsar-helm-chart/issues/601#issuecomment-2804889118
> [@trynocoding](https://github.com/trynocoding) Unfortunately, the pulsar-helm-chart issue tracker is not suitable for support questions as it has virtually no audience. Your question more or less duplicates [#423](https://github.com/apache/pulsar-helm-chart/issues/423), which is also an unanswered question in the pulsar-helm-chart issue tracker. The correct place to ask questions is https://github.com/apache/pulsar/discussions/categories/q-a. > > I'd like to inquire whether it's possible to access the broker from outside the cluster without enabling pulsar-proxy. Thank you in advance for your assistance. > > It is possible, but there's no proof-of-concept in any documentation. It will most likely require changes to the Apache Pulsar Helm chart as well. > > One part missing from your configuration is the use of the `bindAddresses` setting. https://github.com/apache/pulsar/blob/066a20c33fe28ed0bb5ec9b3846ed67560877302/conf/broker.conf#L68-L69 > > Each advertised listener should have a unique `bindAddress` & `port` in `bindAddresses` so that the solution could work. > > let's say something like > > ``` > bindAddresses=internal:pulsar://0.0.0.0:6650,external:pulsar://0.0.0.0:16650 > ``` > >The node port would have to map to port 16650 in the above example. In the aforementioned example, the node port needs to be mapped to port 16650. It doesn't seem to work. Did I configure something incorrectly? One question: why is it necessary to set port 16650 (the port on the host)? ``` [root@master ~]# for i in `seq 0 2`; do kubectl -n pulsar-operator-system exec -it pulsarcluster-sample-broker-$i -- cat /pulsar/conf/broker.conf |egrep 'advertisedListeners|advertisedAddress|internalListenerName|bindAddresses'|grep -v "#";done Defaulted container "broker" out of: broker, wait-bookkeeper-ready (init) bindAddresses=internal:pulsar://0.0.0.0:6655,external:pulsar://0.0.0.0:30650 advertisedAddress=pulsarcluster-sample-broker-0.pulsarcluster-sample-broker.pulsar-operator-system.svc.cluster.local advertisedListeners=internal:pulsar://10.0.0.34:6655,external:pulsar://192.66.111.120:30650 internalListenerName=internal Defaulted container "broker" out of: broker, wait-bookkeeper-ready (init) bindAddresses=internal:pulsar://0.0.0.0:6655,external:pulsar://0.0.0.0:30650 advertisedAddress=pulsarcluster-sample-broker-1.pulsarcluster-sample-broker.pulsar-operator-system.svc.cluster.local advertisedListeners=internal:pulsar://10.0.1.208:6655,external:pulsar://192.66.111.148:30650 internalListenerName=internal Defaulted container "broker" out of: broker, wait-bookkeeper-ready (init) bindAddresses=internal:pulsar://0.0.0.0:6655,external:pulsar://0.0.0.0:30650 advertisedAddress=pulsarcluster-sample-broker-2.pulsarcluster-sample-broker.pulsar-operator-system.svc.cluster.local advertisedListeners=internal:pulsar://10.0.2.186:6655,external:pulsar://192.66.111.166:30650 internalListenerName=internal [root@master ~]# ``` ``` [root@crazy producer]# go run producer.go INFO[0000] Connecting to broker remote_addr="pulsar://100.100.3.198:30650" INFO[0000] TCP connection established local_addr="192.66.111.72:60006" remote_addr="pulsar://100.100.3.198:30650" INFO[0000] Connection is ready local_addr="192.66.111.72:60006" remote_addr="pulsar://100.100.3.198:30650" INFO[0000] Connecting to broker remote_addr="pulsar://192.66.111.166:30650" INFO[0000] TCP connection established local_addr="192.66.111.72:5498" remote_addr="pulsar://192.66.111.166:30650" INFO[0000] Connection is ready local_addr="192.66.111.72:5498" remote_addr="pulsar://192.66.111.166:30650" INFO[0000] Connected producer cnx="192.66.111.72:5498 -> 192.66.111.166:30650" epoch=0 topic="persistent://public/default/test-topic" INFO[0000] Created producer cnx="192.66.111.72:5498 -> 192.66.111.166:30650" producerID=1 producer_name=pulsarcluster-sample-61-6 topic="persistent://public/default/test-topic" 2025/04/15 20:27:36 Published message: 33:6:0 INFO[0000] Closing producer producerID=1 producer_name=pulsarcluster-sample-61-6 topic="persistent://public/default/test-topic" INFO[0000] Closed producer producerID=1 producer_name=pulsarcluster-sample-61-6 topic="persistent://public/default/test-topic" [root@crazy producer]# go run producer.go INFO[0000] Connecting to broker remote_addr="pulsar://100.100.3.198:30650" INFO[0000] TCP connection established local_addr="192.66.111.72:60014" remote_addr="pulsar://100.100.3.198:30650" INFO[0000] Connection is ready local_addr="192.66.111.72:60014" remote_addr="pulsar://100.100.3.198:30650" INFO[0000] Connecting to broker remote_addr="pulsar://192.66.111.166:30650" INFO[0000] TCP connection established local_addr="192.66.111.72:5512" remote_addr="pulsar://192.66.111.166:30650" INFO[0000] Connection is ready local_addr="192.66.111.72:5512" remote_addr="pulsar://192.66.111.166:30650" ERRO[0000] Failed to create producer at send PRODUCER request error="server error: ServiceNotReady: Namespace bundle for topic (persistent://public/default/test-topic) not served by this instance:pulsarcluster-sample-broker-0.pulsarcluster-sample-broker.pulsar-operator-system.svc.cluster.local:8080. Please redo the lookup. Request is denied: namespace=public/default" topic="persistent://public/default/test-topic" ERRO[0000] Failed to create producer at newPartitionProducer error="server error: ServiceNotReady: Namespace bundle for topic (persistent://public/default/test-topic) not served by this instance:pulsarcluster-sample-broker-0.pulsarcluster-sample-broker.pulsar-operator-system.svc.cluster.local:8080. Please redo the lookup. Request is denied: namespace=public/default" topic="persistent://public/default/test-topic" 2025/04/15 20:27:38 server error: ServiceNotReady: Namespace bundle for topic (persistent://public/default/test-topic) not served by this instance:pulsarcluster-sample-broker-0.pulsarcluster-sample-broker.pulsar-operator-system.svc.cluster.local:8080. Please redo the lookup. Request is denied: namespace=public/default exit status 1 [root@crazy producer]# ``` -- 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]
