【问题标题】:No APIs published on the store in clustered mode - wso2 api manager 2.0.0没有以集群模式在商店发布 API - wso2 api manager 2.0.0
【发布时间】:2016-08-23 07:41:25
【问题描述】:

我部署了带有五个 VM 的 Clustered API Manager 2.0.0 安装:

VM1 共享密钥管理器 + 分析节点:

  • 使用 /var/wso2am/bin/wso2server.sh -Dprofile=api-key-manager 运行的专用密钥管理器
  • wso2am 分析通过 /var/wso2am-analytics/bin/wso2server.sh 以默认端口偏移 (+1) 运行

VM2

由 /var/wso2am/bin/wso2server.sh -Dprofile=gateway-manager 以默认偏移量 (+0) 运行的专用网关节点

VM3

由 /var/wso2am/var/wso2am/bin/wso2server.sh -Dprofile=api-store 以默认偏移量 (+0) 运行的专用存储节点

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 注册表。 我还可以浏览在 store carbon 管理界面上的发布者节点中创建的 API (metadata->list>APIs)

但在 VM3 的专用存储前端(“VM3/存储”)中没有出现 API。

同时,如果我在发布者节点上打开“VM5/store”页面,我可以看到发布的 API 就好了

我应该检查什么?

UPD:

API 被推送到存储节点,但生命周期状态“已创建”错误且未相应更新。我尝试在商店节点上手动更改生命周期状态,并且 API 在商店模式下发布就好了。

看来问题在于存储节点的生命周期状态实时更新。我该如何解决?

UPD2:

这是我在 store 上的 axis2.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>

`

这是我在发布者上的axis2.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

【问题讨论】:

    标签: wso2 wso2carbon wso2-am


    【解决方案1】:

    这可能有两个原因。

    1) 在axis2.xml 的&lt;localMemberHost&gt;&lt;members&gt; 部分中使用主机名。请改用 IP。

    2) 在 axis2.xml 中 &lt;parameter name="domain"&gt;wso2.carbon.domain&lt;/parameter&gt; 在 store 和 publisher 中的值不同

    更新: 附加配置看起来不错。所以另一种可能性是这是一个注册表索引问题。为此,您可以尝试重新索引。

    像这样更新存储节点中registry.xml&lt;lastAccessTimeLocation&gt;值,然后重启服务器。

    <lastAccessTimeLocation>/_system/local/repository/components/org.wso2.carbon.registry/indexing/lastaccesstime2</lastAccessTimeLocation> 
    

    【讨论】:

    • 我用配置和日志更新了主题,你能指出一个可能的错误吗?
    • `registry.xml' 中的设置在哪里 这个 url 应该指向什么?我应该将本地 IP 与 9443 端口放在一起,还是将公共 dns 名称与 443 端口放在一起(我前面有反向 NGINX)?
    • 在您的情况下,remoteInstance 值未使用。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-02-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多