From 6c27f8c9e0bd7790c737ab50f69ce4d7b11a9e49 Mon Sep 17 00:00:00 2001 From: Diego Date: Wed, 20 Oct 2021 10:15:02 +0200 Subject: [PATCH 1/3] Update deploy-bare-metal.md no details for NAT. It is useful for distributed cluster. --- site2/docs/deploy-bare-metal.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/site2/docs/deploy-bare-metal.md b/site2/docs/deploy-bare-metal.md index 7f56cbf4c1783..b05c5587b5597 100644 --- a/site2/docs/deploy-bare-metal.md +++ b/site2/docs/deploy-bare-metal.md @@ -202,9 +202,15 @@ server.1=zk1.us-west.example.com:2888:3888 server.2=zk2.us-west.example.com:2888:3888 server.3=zk3.us-west.example.com:2888:3888 ``` - > If you only have one machine on which to deploy Pulsar, you only need to add one server entry in the configuration file. +> If your machines are behind NAT use 0.0.0.0 as server entry for the local address. +```example for configuration on server #3 +server.1=zk1.us-west.example.com:2888:3888 +server.2=zk2.us-west.example.com:2888:3888 +server.3=0.0.0.0:2888:3888 +``` + On each host, you need to specify the ID of the node in the `myid` file, which is in the `data/zookeeper` folder of each server by default (you can change the file location via the [`dataDir`](reference-configuration.md#zookeeper-dataDir) parameter). > See the [Multi-server setup guide](https://zookeeper.apache.org/doc/r3.4.10/zookeeperAdmin.html#sc_zkMulitServerSetup) in the ZooKeeper documentation for detailed information on `myid` and more. From 1b40c7427554f5c656cbeb63d98784e05795bf95 Mon Sep 17 00:00:00 2001 From: Diego Date: Wed, 27 Oct 2021 09:00:50 +0200 Subject: [PATCH 2/3] Update site2/docs/deploy-bare-metal.md Co-authored-by: Anonymitaet <50226895+Anonymitaet@users.noreply.github.com> --- site2/docs/deploy-bare-metal.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site2/docs/deploy-bare-metal.md b/site2/docs/deploy-bare-metal.md index b05c5587b5597..f2af457941dcd 100644 --- a/site2/docs/deploy-bare-metal.md +++ b/site2/docs/deploy-bare-metal.md @@ -205,7 +205,7 @@ server.3=zk3.us-west.example.com:2888:3888 > If you only have one machine on which to deploy Pulsar, you only need to add one server entry in the configuration file. > If your machines are behind NAT use 0.0.0.0 as server entry for the local address. -```example for configuration on server #3 +Example of configuration on _server.3_ server.1=zk1.us-west.example.com:2888:3888 server.2=zk2.us-west.example.com:2888:3888 server.3=0.0.0.0:2888:3888 From 52203033b2d1b78a9c615894dc3e46cdbc03af19 Mon Sep 17 00:00:00 2001 From: Diego Date: Wed, 27 Oct 2021 11:06:58 +0200 Subject: [PATCH 3/3] Update deploy-bare-metal.md AS requested --- site2/docs/deploy-bare-metal.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/site2/docs/deploy-bare-metal.md b/site2/docs/deploy-bare-metal.md index f2af457941dcd..fd334746c88a5 100644 --- a/site2/docs/deploy-bare-metal.md +++ b/site2/docs/deploy-bare-metal.md @@ -204,8 +204,10 @@ server.3=zk3.us-west.example.com:2888:3888 ``` > If you only have one machine on which to deploy Pulsar, you only need to add one server entry in the configuration file. -> If your machines are behind NAT use 0.0.0.0 as server entry for the local address. +> If your machines are behind NAT use 0.0.0.0 as server entry for the local address. If the node use external IP in configuration for itself, behind NAT, zookeper service won't start because it tries to put a listener on an external ip that the linux box doesn't own. Using 0.0.0.0 start a listener on ALL ip, so that NAT network traffic can reach it. + Example of configuration on _server.3_ +```properties server.1=zk1.us-west.example.com:2888:3888 server.2=zk2.us-west.example.com:2888:3888 server.3=0.0.0.0:2888:3888