【问题标题】:"Could not add subscription" error when WSO2 API Manager startsWSO2 API 管理器启动时出现“无法添加订阅”错误
【发布时间】:2018-11-14 08:19:00
【问题描述】:

我有一个 WSO2 API Manager 2.5.0 安装,部署在两个节点中作为主动-主动。它还拥有 WSO2 Analytics 和 WSO2 Identity Server 作为密钥管理器。

每个节点启动时,会在日志中留下三倍相同的错误:

2018-11-14 07:56:50,989 [-] [DisruptorInboundEventThread-8] ERROR AndesSubscriptionManager Could not add subscription: subscriptionId=3091b9ba-867b-4539-bf25-fee511d1813d,storageQueue=AMQP_Topic_throttledata_NODE:OpenDataApiM1/10.0.0.101,protocolType=AMQP,isActive=true,subscriberConnection=Y29ubmVjdGVkSVA9LzEwLjAuMC40OjMzMTgyLzEsY29ubmVjdGVkTm9kZT1OT0RFOk9wZW5EYXRhQXBpTTEvMTAuMC4wLjQscHJvdG9jb2xDaGFubmVsSUQ9Y2Y3NDI4MDgtZGY3MS00NzJhLWFiMTEtOTY1Nzc2ZTBkNTZl
org.wso2.andes.kernel.subscription.SubscriptionException: StorageQueue: AMQP_Topic_throttledata_NODE:OpenDataApiM1/10.0.0.101 is not registered while creating subscription id=3091b9ba-867b-4539-bf25-fee511d1813d
    at org.wso2.andes.kernel.subscription.AndesSubscription.<init>(AndesSubscription.java:136)
    at org.wso2.andes.kernel.subscription.AndesSubscriptionManager.reloadSubscriptionsFromStorage(AndesSubscriptionManager.java:921)
    at org.wso2.andes.kernel.disruptor.inbound.InboundDBSyncRequestEvent.reloadSubscriptions(InboundDBSyncRequestEvent.java:208)
    at org.wso2.andes.kernel.disruptor.inbound.InboundDBSyncRequestEvent.updateState(InboundDBSyncRequestEvent.java:76)
    at org.wso2.andes.kernel.disruptor.inbound.InboundEventContainer.updateState(InboundEventContainer.java:268)
    at org.wso2.andes.kernel.disruptor.inbound.StateEventHandler.onEvent(StateEventHandler.java:70)
    at org.wso2.andes.kernel.disruptor.inbound.StateEventHandler.onEvent(StateEventHandler.java:40)
    at com.lmax.disruptor.BatchEventProcessor.run(BatchEventProcessor.java:128)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
2018-11-14 07:56:50,991 [-] [DisruptorInboundEventThread-8] ERROR AndesSubscriptionManager Could not add subscription: subscriptionId=c9a279eb-6c1f-447c-84bc-c077d33a06e1,storageQueue=AMQP_Topic_throttledata_NODE:OpenDataApiM1/10.0.0.101,protocolType=AMQP,isActive=true,subscriberConnection=Y29ubmVjdGVkSVA9LzEwLjAuMC40OjM0NTA0LzEsY29ubmVjdGVkTm9kZT1OT0RFOk9wZW5EYXRhQXBpTTEvMTAuMC4wLjQscHJvdG9jb2xDaGFubmVsSUQ9NGI5YmVmZmUtNjk1OC00M2Q4LTg3NGYtMzA5YmE5M2IyNzMw
org.wso2.andes.kernel.subscription.SubscriptionException: StorageQueue: AMQP_Topic_throttledata_NODE:OpenDataApiM1/10.0.0.101 is not registered while creating subscription id=c9a279eb-6c1f-447c-84bc-c077d33a06e1
    at org.wso2.andes.kernel.subscription.AndesSubscription.<init>(AndesSubscription.java:136)
    at org.wso2.andes.kernel.subscription.AndesSubscriptionManager.reloadSubscriptionsFromStorage(AndesSubscriptionManager.java:921)
    at org.wso2.andes.kernel.disruptor.inbound.InboundDBSyncRequestEvent.reloadSubscriptions(InboundDBSyncRequestEvent.java:208)
    at org.wso2.andes.kernel.disruptor.inbound.InboundDBSyncRequestEvent.updateState(InboundDBSyncRequestEvent.java:76)
    at org.wso2.andes.kernel.disruptor.inbound.InboundEventContainer.updateState(InboundEventContainer.java:268)
    at org.wso2.andes.kernel.disruptor.inbound.StateEventHandler.onEvent(StateEventHandler.java:70)
    at org.wso2.andes.kernel.disruptor.inbound.StateEventHandler.onEvent(StateEventHandler.java:40)
    at com.lmax.disruptor.BatchEventProcessor.run(BatchEventProcessor.java:128)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
2018-11-14 07:56:50,992 [-] [DisruptorInboundEventThread-8] ERROR AndesSubscriptionManager Could not add subscription: subscriptionId=3091b9ba-867b-4539-bf25-fee511d1813d,storageQueue=AMQP_Topic_throttledata_NODE:OpenDataApiM1/10.0.0.101,protocolType=AMQP,isActive=true,subscriberConnection=Y29ubmVjdGVkSVA9LzEwLjAuMC40OjMzMTgyLzEsY29ubmVjdGVkTm9kZT1OT0RFOk9wZW5EYXRhQXBpTTEvMTAuMC4wLjQscHJvdG9jb2xDaGFubmVsSUQ9Y2Y3NDI4MDgtZGY3MS00NzJhLWFiMTEtOTY1Nzc2ZTBkNTZl
org.wso2.andes.kernel.subscription.SubscriptionException: StorageQueue: AMQP_Topic_throttledata_NODE:OpenDataApiM1/10.0.0.101 is not registered while creating subscription id=3091b9ba-867b-4539-bf25-fee511d1813d
    at org.wso2.andes.kernel.subscription.AndesSubscription.<init>(AndesSubscription.java:136)
    at org.wso2.andes.kernel.subscription.AndesSubscriptionManager.reloadSubscriptionsFromStorage(AndesSubscriptionManager.java:972)
    at org.wso2.andes.kernel.disruptor.inbound.InboundDBSyncRequestEvent.reloadSubscriptions(InboundDBSyncRequestEvent.java:208)
    at org.wso2.andes.kernel.disruptor.inbound.InboundDBSyncRequestEvent.updateState(InboundDBSyncRequestEvent.java:76)
    at org.wso2.andes.kernel.disruptor.inbound.InboundEventContainer.updateState(InboundEventContainer.java:268)
    at org.wso2.andes.kernel.disruptor.inbound.StateEventHandler.onEvent(StateEventHandler.java:70)
    at org.wso2.andes.kernel.disruptor.inbound.StateEventHandler.onEvent(StateEventHandler.java:40)
    at com.lmax.disruptor.BatchEventProcessor.run(BatchEventProcessor.java:128)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

我不知道这个问题。我在网上找过错误,但没有类似的情况。 有人有什么想法吗?

【问题讨论】:

    标签: wso2 wso2-am


    【解决方案1】:
    2018-11-14 07:56:50,989 [-] [DisruptorInboundEventThread-8] ERROR AndesSubscriptionManager Could not add subscription: subscriptionId=3091b9ba-867b-4539-bf25-fee511d1813d,storageQueue=AMQP_Topic_throttledata_NODE:OpenDataApiM1/10.0.0.101,protocolType=AMQP,isActive=true,subscriberConnection=Y29ubmVjdGVkSVA9LzEwLjAuMC40OjMzMTgyLzEsY29ubmVjdGVkTm9kZT1OT0RFOk9wZW5EYXRhQXBpTTEvMTAuMC4wLjQscHJvdG9jb2xDaGFubmVsSUQ9Y2Y3NDI4MDgtZGY3MS00NzJhLWFiMTEtOTY1Nzc2ZTBkNTZl
    org.wso2.andes.kernel.subscription.SubscriptionException: StorageQueue: AMQP_Topic_throttledata_NODE:OpenDataApiM1/10.0.0.101 is not registered while creating subscription id=3091b9ba-867b-4539-bf25-fee511d1813d
    

    您可能已经找到了这个错误的答案。但问题的可能原因是当APIM由于节点之间共享'WSO2_MB_STORE_DB'而无法识别与其自身节点相关的正确主题连接工厂时。

    如果您参考他们的Installing and configuring databases 文档,其中提到每个流量管理器节点必须有自己的消息代理数据库(WSO2_MB_STORE_DB)

    因此,请检查两个节点的&lt;APIM_Home&gt;/repository/conf/master-datasource.xml文件下的数据库配置是否在节点之间共享了'WSO2_MB_STORE_DB'。如果是这种情况,您可以将它们指向两个单独的新数据库以消除此错误。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-06-13
      • 2021-05-13
      相关资源
      最近更新 更多