我部署了具有五个VM的Clustered API Manager 2.0.0安装:
VM1 共享密钥管理器+分析节点:
VM2
由/var/wso2am/bin/wso2server.sh -Dprofile = gateway-manager
以默认偏移量(+0)运行的专用网关节点VM3
专用存储节点使用默认偏移量(+0)运行/var/wso2am/var/wso2am/bin/wso2server.sh -Dprofile = api-store
VM4
由/var/wso2am/bin/wso2server.sh -Dprofile = traffic-manager
以默认偏移量(+0)运行的专用流量管理器节点VM5
由/var/wso2am/bin/wso2server.sh -Dprofile = api-publisher 运行的默认偏移量(+0)的专用发布者节点
我完成了Clustering API Manager 2.0.0
中的所有步骤我使用VM3和VM5设置了两个群集节点,我在商店和发布者节点上都看到了/ _system / governance / apimgt / applicationdata注册表。 我还可以在商店碳管理界面(元数据 - >列表> API)上浏览在发布商节点中创建的API
但是在VM3(“VM3 / store”)的专用商店端没有出现API。
同时如果我在发布者节点上打开“VM5 / store”页面,我可以看到发布的API就好了
我应该检查什么?
UPD:
API被推送到商店节点,其中“创建”生命周期状态错误,未相应更新。我尝试在商店节点上手动更改生命周期状态,并且API在商店模式下发布就好了。
所以似乎问题是对商店节点的生命周期状态实时更新。我该如何解决?
UPD2:
这是我在商店的ip2.xml配置(ip是x.x.x.15)
<clustering class="org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent"
enable="true">
<parameter name="membershipScheme">wka</parameter>
<parameter name="domain">wso2.carbon.domain</parameter>
<parameter name="localMemberHost">x.x.x.15</parameter>
<parameter name="localMemberPort">4000</parameter>
<members>
<member>
<hostName>x.x.x.17</hostName>
<port>4000</port>
</member>
<member>
<hostName>x.x.x.15</hostName>
<port>4000</port>
</member>
</members>
`
这是发布者的ip2.xml配置(ip是x.x.x.17)
<clustering class="org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent"
enable="true">
<parameter name="membershipScheme">wka</parameter>
<parameter name="domain">wso2.carbon.domain</parameter>
<parameter name="localMemberHost">x.x.x.17</parameter>
<parameter name="localMemberPort">4000</parameter>
<members>
<member>
<hostName>x.x.x.15</hostName>
<port>4000</port>
</member>
<member>
<hostName>x.x.x.17</hostName>
<port>4000</port>
</member>
</members>
商店日志文件中的消息
Cluster domain: wso2.carbon.domain
Loading hazelcast configuration from axis2 clustering configuration
Using wka based membership management scheme
Added member: Host:x.x.x.17, Remote Host:null, Port: 4000, HTTP:-1, HTTPS:-1, Domain: null, Sub-domain:null, Active:true
Added member: Host:x.x.x.15, Remote Host:null, Port: 4000, HTTP:-1, HTTPS:-1, Domain: null, Sub-domain:null, Active:true
Hazelcast initialized in 9167ms
Local member: [3c9c1b66-9ad9-4e4f-8d7e-de2864e8d56d] - Host:x.x.x.15, Remote Host:null, Port: 4000, HTTP:8280, HTTPS:8243, Domain: wso2.carbon.domain, Sub-domain:worker, Active:true
Cluster initialization completed
Task service starting in CLUSTERED mode...
Successfully Initialized Eventing on Registry
发布者日志文件中的消息
Cluster domain: wso2.carbon.domain
Loading hazelcast configuration from axis2 clustering configuration
Using wka based membership management scheme
Added member: Host:x.x.x.15, Remote Host:null, Port: 4000, HTTP:-1, HTTPS:-1, Domain: null, Sub-domain:null, Active:true
Added member: Host:x.x.x.17, Remote Host:null, Port: 4000, HTTP:-1, HTTPS:-1, Domain: null, Sub-domain:null, Active:true
Hazelcast initialized in 10380ms
Local member: [094f544b-1cfe-41b1-9a5f-0664aefc1ba5] - Host:x.x.x.17, Remote Host:null, Port: 4000, HTTP:8280, HTTPS:8243, Domain: wso2.carbon.domain, Sub-domain:worker, Active:true
Cluster initialization completed
Error in instantiating class : org.wso2.carbon.apimgt.usage.publisher.APIMgtThrottleUsageHandler
Sequence Deployment from the file : /var/wso2am/repository/deployment/server/synapse-configs/default/sequences/_throttle_out_handler_.xml : Failed.
Deployment of the Synapse Artifact from file : /var/wso2am/repository/deployment/server/synapse-configs/default/sequences/_throttle_out_handler_.xml : Failed!
The file has been backed up into : NO_BACKUP_ON_WORKER.INFO
Deployment of synapse artifact failed. Error reading /var/wso2am/repository/deployment/server/synapse-configs/default/sequences/_throttle_out_handler_.xml : Sequence Deployment from the file : /var/wso2am/repository/deployment/server/synapse-configs/default/sequences/_throttle_out_handler_.xml : Failed.
org.apache.axis2.deployment.DeploymentException: Sequence Deployment from the file : /var/wso2am/repository/deployment/server/synapse-configs/default/sequences/_throttle_out_handler_.xml : Failed.
Error in instantiating class : org.wso2.carbon.apimgt.usage.publisher.APIMgtFaultHandler
Sequence Deployment from the file : /var/wso2am/repository/deployment/server/synapse-configs/default/sequences/fault.xml : Failed.
Deployment of the Synapse Artifact from file : /var/wso2am/repository/deployment/server/synapse-configs/default/sequences/fault.xml : Failed!
The file has been backed up into : NO_BACKUP_ON_WORKER.INFO
Deployment of synapse artifact failed. Error reading /var/wso2am/repository/deployment/server/synapse-configs/default/sequences/fault.xml : Sequence Deployment from the file : /var/wso2am/repository/deployment/server/synapse-configs/default/sequences/fault.xml : Failed.
org.apache.axis2.deployment.DeploymentException: Sequence Deployment from the file : /var/wso2am/repository/deployment/server/synapse-configs/default/sequences/fault.xml : Failed.
Task service starting in CLUSTERED mode...
Successfully Initialized Eventing on Registry
答案 0 :(得分:0)
这可能有两个原因。
1)在axis2.xml中的<localMemberHost>
和<members>
部分中使用主机名。请改用IP。
2)在axis2.xml中的<parameter name="domain">wso2.carbon.domain</parameter>
的商店和发布商中没有相同的值
<强>更新强>: 附加配置看起来很好。另一种可能性是这是一个注册表索引问题。为此,您可以尝试重新索引。
像这样更新商店节点中<lastAccessTimeLocation>
的{{1}}值,然后重新启动服务器。
registry.xml