无法使用membershipScheme=AWS使WSO2正常工作

无法使用membershipScheme=AWS使WSO2正常工作,wso2,wso2-am,wso2carbon,Wso2,Wso2 Am,Wso2carbon,我在同一地区/区域的Amazon EC2节点上运行WSO2 AM 1.10.0。其中一个是管理器节点,另一个是工作节点 使用membershipScheme=WKA运行它们时,一切正常。当尝试membershipScheme=AWS时,两个服务器都正确注册到云,但不相互交互。我验证了axis2.xml中的AWS参数是否正确,并向所有人打开了端口5700-5800 我的WKA配置如下: 管理器节点(WKA) 现在切换到AWS模式: 管理者和工作者节点(AWS) 从日志中可以看到,没有工人的迹象 此

我在同一地区/区域的Amazon EC2节点上运行WSO2 AM 1.10.0。其中一个是管理器节点,另一个是工作节点

使用membershipScheme=WKA运行它们时,一切正常。当尝试membershipScheme=AWS时,两个服务器都正确注册到云,但不相互交互。我验证了axis2.xml中的AWS参数是否正确,并向所有人打开了端口5700-5800

我的WKA配置如下:

管理器节点(WKA)

现在切换到AWS模式:

管理者和工作者节点(AWS)

从日志中可以看到,没有工人的迹象

此外,管理器中所做的更改不会被工作人员使用

在工作节点中:

Managing group application domain:wso2.apim.domain, sub-domain:worker using agent class org.wso2.carbon.core.clustering.hazelcast.HazelcastGroupManagementAgent
Cluster domain: wso2.am.domain
Using aws based membership management scheme

Group management local member for domain [wso2.apim.domain],sub-domain [worker] UUID: d034e9b0-b101-4d78-af44-d3e4a28ba0fd. Host:ec2-GW, Remote Host:null, Port: 5757, HTTP:8280, HTTPS:8243, Domain: wso2.apim.domain, Sub-domain:worker, Active:true

Application member Host:ec2-GW, Remote Host:null, Port: 5757, HTTP:8280, HTTPS:8243, Domain: wso2.apim.domain, Sub-domain:worker, Active:true joined application cluster

Local member: [50961848-8d78-412f-b83f-01dc8c7ad3bf] - Host:10.1.0.193, Remote Host:null, Port: 5702, HTTP:8280, HTTPS:8243, Domain: wso2.am.domain, Sub-domain:worker, Active:true
Elected this member [50961848-8d78-412f-b83f-01dc8c7ad3bf] as the Coordinator node
我与telnet进行了检查:端口5757、5701和5702可通过两个节点访问

知道这两个节点为什么不通信吗


根据评论进行跟进#1

将标记添加到两个节点

$aws ec2创建标记--资源ec2-M ec2 GW--标记键=组件,值=网关

使用描述实例进行验证:

$aws ec2描述实例

修改的axis2.xml,适用于ec2-M和ec2 GW:

    <parameter name="localMemberPort">5701</parameter>
    ...
    <parameter name="accessKey">...</parameter>
    <parameter name="secretKey">...</parameter>
    <parameter name="securityGroup">...</parameter>
    <parameter name="region">eu-west-1</parameter>
    <parameter name="tagKey">component</parameter> 
    <parameter name="tagValue">gateway</parameter>
在worker上,正在运行:

在AWS模式下,每个节点只能看到自己

在manager上,运行:

在worker上,正在运行:


再次阅读文档,似乎我必须为两个节点指定端口5701,而不是像我在这里所做的那样指定5701/5702。这是导致问题的原因吗?您可以在服务器中使用不同的端口作为localMemberPort。在您的配置中,我发现缺少tagKey和tagValue参数。我们要加上这些吗?对于网关群集,您可以使用键作为组件,使用值作为网关。官方文档-尝试添加标签,但没有帮助。除了我的原始问题之外,请参见“基于评论的后续行动1”。请在后续行动2中添加一些进一步的hazelcast信息。您可以尝试禁用groupManagement吗?
Managing group application domain:wso2.apim.domain, sub-domain:mgt using agent class org.wso2.carbon.core.clustering.hazelcast.HazelcastGroupManagementAgent
Cluster domain: wso2.am.domain
Using wka based membership management scheme

Added member: Host:127.0.0.1, Remote Host:null, Port: 5701, HTTP:-1, HTTPS:-1, Domain: null, Sub-domain:null, Active:true
Added member: Host:ec2-GW,    Remote Host:null, Port: 5702, HTTP:-1, HTTPS:-1, Domain: null, Sub-domain:null, Active:true

Local member: [cf971938-ae01-42f7-84c1-563943ea1570] - Host:10.1.0.87, Remote Host:null, Port: 5701, HTTP:8281, HTTPS:8244, Domain: wso2.am.domain, Sub-domain:mgt, Active:true
Elected this member [cf971938-ae01-42f7-84c1-563943ea1570] as the Coordinator node

Added member: Host:10.1.0.87, Remote Host:null, Port: 5701, HTTP:8281, HTTPS:8244, Domain: wso2.am.domain, Sub-domain:mgt, Active:true
Application member Host:ec2-M, Remote Host:null, Port: 5757, HTTP:8281, HTTPS:8244, Domain: wso2.apim.domain, Sub-domain:mgt, Active:true joined application cluster

Member joined [a9268bd0-de59-47eb-bd90-69e6e3ef82c8]: ec2-GW/10.1.0.193:5702
Added member: Host:10.1.0.193, Remote Host:null, Port: 5702, HTTP:8280, HTTPS:8243, Domain: wso2.am.domain, Sub-domain:worker, Active:true
<parameter name="membershipScheme">aws</parameter>
<parameter name="accessKey">...</parameter>
<parameter name="secretKey">...</parameter>
<parameter name="securityGroup">...</parameter>
<parameter name="region">eu-west-1</parameter>
Managing group application domain:wso2.apim.domain, sub-domain:mgt using agent class org.wso2.carbon.core.clustering.hazelcast.HazelcastGroupManagementAgent
Cluster domain: wso2.am.domain
Using aws based membership management scheme

Group management local member for domain [wso2.apim.domain],sub-domain [mgt] UUID: e8847f8c-b6c4-434d-9c3c-7eb8ceca59f2. Host:ec2-M, Remote Host:null, Port: 5757, HTTP:8281, HTTPS:8244, Domain: wso2.apim.domain, Sub-domain:mgt, Active:true

Local member: [2740f020-ca36-4e41-a94c-996d4c1a4fee] - Host:10.1.0.87, Remote Host:null, Port: 5701, HTTP:8281, HTTPS:8244, Domain: wso2.am.domain, Sub-domain:mgt, Active:true
Elected this member [2740f020-ca36-4e41-a94c-996d4c1a4fee] as the Coordinator node

Application member Host:ec2-M, Remote Host:null, Port: 5757, HTTP:8281, HTTPS:8244, Domain: wso2.apim.domain, Sub-domain:mgt, Active:true joined application cluster
Managing group application domain:wso2.apim.domain, sub-domain:worker using agent class org.wso2.carbon.core.clustering.hazelcast.HazelcastGroupManagementAgent
Cluster domain: wso2.am.domain
Using aws based membership management scheme

Group management local member for domain [wso2.apim.domain],sub-domain [worker] UUID: d034e9b0-b101-4d78-af44-d3e4a28ba0fd. Host:ec2-GW, Remote Host:null, Port: 5757, HTTP:8280, HTTPS:8243, Domain: wso2.apim.domain, Sub-domain:worker, Active:true

Application member Host:ec2-GW, Remote Host:null, Port: 5757, HTTP:8280, HTTPS:8243, Domain: wso2.apim.domain, Sub-domain:worker, Active:true joined application cluster

Local member: [50961848-8d78-412f-b83f-01dc8c7ad3bf] - Host:10.1.0.193, Remote Host:null, Port: 5702, HTTP:8280, HTTPS:8243, Domain: wso2.am.domain, Sub-domain:worker, Active:true
Elected this member [50961848-8d78-412f-b83f-01dc8c7ad3bf] as the Coordinator node
...
"Tags": [
                    {
                        "Value": "gateway", 
                        "Key": "component"
                    }
]
...
    <parameter name="localMemberPort">5701</parameter>
    ...
    <parameter name="accessKey">...</parameter>
    <parameter name="secretKey">...</parameter>
    <parameter name="securityGroup">...</parameter>
    <parameter name="region">eu-west-1</parameter>
    <parameter name="tagKey">component</parameter> 
    <parameter name="tagValue">gateway</parameter>
Members [2] {
    Member [ec2-M]:5701 this
    Member [ec2-GW]:5702
}
Members [2] {
    Member [ec2-M]:5701 
    Member [ec2-GW]:5702 this
}
Members [1] {
    Member [ec2-M]:5701 this
}
Members [1] {
    Member [ec2-GW]:5701 this
}