WSO2 API Manager(wso2am-4.0.0) - API 未部署到集群设置中的第二个节点

发布于 2025-01-12 18:18:46 字数 610 浏览 2 评论 0原文

我正在使用最新的 API Manager(wso2am-4.0.0),并且我正在尝试在 2 个独立的服务器中实现 2 个节点的集群。我正在尝试根据以下文档同步 API,并相应地在两个节点中设置部署.toml 文件。

https://apim.docs.wso2.com/en/3.2.0/install-and-setup/setup/distributed-deployment/synchronizing-artifacts-in-a-gateway-cluster/#inbuilt-artifact-同步

目前,一旦从第一个节点部署,API 就会出现在两个节点中。但是,当我尝试访问第二个节点中的 API(通过使用 Postman 请求)时,会导致找不到 404 资源。有趣的是,如果我重新启动第二个节点,API 也会开始在第二个节点中工作。

对此的任何解决方案都是最受欢迎的。 提前致谢。

I'm using the latest API Manager(wso2am-4.0.0) and I am trying to implement the clustering of 2 nodes in 2 separate servers. I am trying to sync the APIs according to the below documentation, setting up deployment.toml files in both nodes accordingly.

https://apim.docs.wso2.com/en/3.2.0/install-and-setup/setup/distributed-deployment/synchronizing-artifacts-in-a-gateway-cluster/#inbuilt-artifact-synchronization

Currently, the APIs appear in both the nodes once deployed from the 1st node. But, when I try to access the API in the 2nd node(by requesting using Postman), it results in a 404 resource not being found. Interestingly, if I restart the 2nd node, the API starts working in the 2nd node as well.

Any solution for this is most welcome.
Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

挽清梦 2025-01-19 18:18:46

以下配置适用于 API 在节点之间同步。

节点 1

[apim.throttling]
event_duplicate_url = ["tcp://127.0.0.1:5673"]

[[apim.throttling.url_group]]
traffic_manager_urls = ["tcp://127.0.0.1:9611"]
traffic_manager_auth_urls = ["ssl://127.0.0.1:9711"]
type = "loadbalance"

[[apim.throttling.url_group]]
traffic_manager_urls = ["tcp://<Node2_IP>:9611"]
traffic_manager_auth_urls = ["ssl://<Node2_IP>:9711"]
type = "loadbalance"

节点 2

[apim.throttling]
event_duplicate_url = ["tcp://127.0.0.1:5672"]

[[apim.throttling.url_group]]
traffic_manager_urls = ["tcp://127.0.0.1:9611"]
traffic_manager_auth_urls = ["ssl://127.0.0.1:9711"]
type = "loadbalance"

[[apim.throttling.url_group]]
traffic_manager_urls = ["tcp://<Node1_IP>:9611"]
traffic_manager_auth_urls = ["ssl://<Node1_IP>:9711"]
type = "loadbalance"

PS:在文档中,第二个配置的 IP 与本地主机 IP 一起提及,需要如上所述进行更正。

https://apim.docs.wso2.com/en/latest/install-and-setup/setup/single-node/configuring-an-active-active-deployment/

步骤8号。

The below configuration worked for the APIs to sync between the nodes.

Node 1

[apim.throttling]
event_duplicate_url = ["tcp://127.0.0.1:5673"]

[[apim.throttling.url_group]]
traffic_manager_urls = ["tcp://127.0.0.1:9611"]
traffic_manager_auth_urls = ["ssl://127.0.0.1:9711"]
type = "loadbalance"

[[apim.throttling.url_group]]
traffic_manager_urls = ["tcp://<Node2_IP>:9611"]
traffic_manager_auth_urls = ["ssl://<Node2_IP>:9711"]
type = "loadbalance"

Node 2

[apim.throttling]
event_duplicate_url = ["tcp://127.0.0.1:5672"]

[[apim.throttling.url_group]]
traffic_manager_urls = ["tcp://127.0.0.1:9611"]
traffic_manager_auth_urls = ["ssl://127.0.0.1:9711"]
type = "loadbalance"

[[apim.throttling.url_group]]
traffic_manager_urls = ["tcp://<Node1_IP>:9611"]
traffic_manager_auth_urls = ["ssl://<Node1_IP>:9711"]
type = "loadbalance"

PS: In the documentation, the 2nd configuration's IP is mentioned with the localhost IP which needs to be corrected as above.

https://apim.docs.wso2.com/en/latest/install-and-setup/setup/single-node/configuring-an-active-active-deployment/

Step number 8.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文