[Bug] Pulsar standalone does not read the Zookeeper port form zookeeper.conf
Search before asking
- [X] I searched in the issues and found nothing similar.
Version
Docker version 20.10.23, build 7155243 Docker Compose version v2.15.1 Apache Pulsar 2.9.3 Ubuntu 22.04
Minimal reproduce step
Change the port for Zookeeper in zookeeper.conf
https://github.com/apache/pulsar/blob/master/conf/zookeeper.conf#L31
and then start up the Pulsar in standalone mode:
entrypoint: ["bin/pulsar", "standalone"]
What did you expect to see?
Zookeeper listening at port 2182.
What did you see instead?
Zookeeper still listening at port 2181.
The zookeeper.conf in the docker container did have the new port, 2182.
Anything else?
No response
Are you willing to submit a PR?
- [X] I'm willing to submit a PR!
In Pulsar standalone you can configure the zookeeper port by passing the arg --zookeeper-port:
PULSAR_STANDALONE_USE_ZOOKEEPER=1 bin/pulsar standalone --zookeeper-port 2182
In Pulsar standalone you can configure the zookeeper port by passing the arg
--zookeeper-port:PULSAR_STANDALONE_USE_ZOOKEEPER=1 bin/pulsar standalone --zookeeper-port 2182
Sure, but this is not about that argument. It's about the configuration file.
@lk-1984 It's by design. Standalone server doesn't act as prod server.
It reads only conf/standalone.conf and for configuring zookeeper's port, the priority is:
https://github.com/apache/pulsar/blob/cda2827acbe62ba6c5a4dd98dbee7c9a82548339/pulsar-broker/src/main/java/org/apache/pulsar/PulsarStandaloneStarter.java#L94-L110