Has anyone setup a geo-replicated cluster? I’ve g...
# general
p
Has anyone setup a geo-replicated cluster? I’ve got two servers and when I go through the instructions from the docs. When I try to confirm that it’s setup, I get:
Copy code
Reason: Namespace missing local cluster name in clusters list: local_cluster=standalone ns=my-tenant/my-namespace clusters=[west]
this is my setup:
Copy code
server 1 - 10.211.55.9 - east
server 2 - 10.211.55.10 - west

west - server 2:
bin/pulsar standalone
bin/pulsar-admin clusters create --broker-url <pulsar://10.211.55.9:6650> --url <http://10.211.55.9:8080> east
bin/pulsar-admin tenants create my-tenant
bin/pulsar-admin namespaces create my-tenant/my-namespace

east - server 1:
bin/pulsar standalone
bin/pulsar-admin clusters create --broker-url <pulsar://10.211.55.10:6650> --url <http://10.211.55.10:8080> west
bin/pulsar-admin tenants create my-tenant
bin/pulsar-admin namespaces create my-tenant/my-namespace
When I try to do something like
Copy code
bin/pulsar-admin namespaces set-clusters my-tenant/my-namespace --clusters east,west
It says the cluster is not found From server 2.
Copy code
bin/pulsar-admin namespaces set-clusters my-tenant/my-namespace --clusters west
2024-03-08T21:17:18,024+0000 [AsyncHttpClient-7-1] WARN  org.apache.pulsar.client.admin.internal.BaseResource - [<http://localhost:8080/admin/v2/namespaces/my-tenant/my-namespace/replication>] Failed to perform http post request: javax.ws.rs.ForbiddenException: HTTP 403 {"reason":"Invalid cluster id: west"}
Invalid cluster id: west

Reason: Invalid cluster id: west
So I can only run the set-clusters command for the cluster on that server Can the standalone be used in this way? Thanks
d
It is worth asking questions on GitHub Discussion https://github.com/apache/pulsar/discussions/new?category=q-a , after doing this, you can promote the question here on Slack too, but it would be preferred if the answers also get recorded so that others with similar questions would later benefit from the already answered questions. This will help us build out the knowledge base for Pulsar
👍 1
p
Tbh, a quick yes or no would be more helpful. I’m going to try instead individual zookeeper, bookie and broker in a server and determine if both clusters then talk to each other.
d
Did you setup a global configuration store that both clusters have access to?
From what I can see, you only define one cluster inside each “standalone” cluster. Then you try to reference two clusters in the
bin/pulsar-admin namespaces set-clusters my-tenant/my-namespace --clusters east,west
command.
Yes, geo-replication works, even between 2 standalone clusters.
🙌 1
p
finally got this to work. sed -i ‘s/clusterName=standalone/clusterName=[clusterName]/’ standalone.conf I was simply missing this step. I found another guide on the net which had this included.
🙌 1