我有一个带有WSO2 API Manager的2台服务器的集群环境。我创建了现有服务的副本并发布了它。
通过SoapUI调用此服务,一次运行,另一次则不运行。
STATUS = Message dispatched to the main sequence. Invalid URL., RESOURCE = /gm/services/aanvraag/MKE1
我配置了基于注册表的同步,主节点:
<DeploymentSynchronizer>
<Enabled>true</Enabled>
<AutoCommit>true</AutoCommit>
<AutoCheckout>true</AutoCheckout>
</DeploymentSynchronizer>
从属节点
<DeploymentSynchronizer>
<Enabled>true</Enabled>
<AutoCommit>false</AutoCommit>
<AutoCheckout>true</AutoCheckout>
</DeploymentSynchronizer>
这是我的wso2carbon.log日志
TID: [0] [AM] [2015-05-12 14:49:40,712] INFO {org.wso2.carbon.identity.application.mgt.internal.ApplicationManagementServiceComponent} - Identity ApplicationManagementComponent bundle is activated {org.wso2.carbon.identity.application.mgt.internal.ApplicationManagementServiceComponent}
TID: [0] [AM] [2015-05-12 14:49:40,774] INFO {org.wso2.carbon.idp.mgt.internal.IdPManagementServiceComponent} - Identity Application Management Database initialization not attempted since 'setup' variable was not provided during startup {org.wso2.carbon.idp.mgt.internal.IdPManagementServiceComponent}
TID: [0] [AM] [2015-05-12 14:49:41,235] INFO {org.wso2.carbon.security.internal.SecurityMgtServiceComponent} - POX Security Disabled {org.wso2.carbon.security.internal.SecurityMgtServiceComponent}
TID: [0] [AM] [2015-05-12 14:49:41,364] INFO {org.apache.synapse.transport.passthru.PassThroughHttpSSLListener} - Starting Pass-through HTTPS Listener... {org.apache.synapse.transport.passthru.PassThroughHttpSSLListener}
TID: [0] [AM] [2015-05-12 14:49:41,397] INFO {org.apache.synapse.transport.passthru.PassThroughHttpSSLListener} - Pass-through HTTPS Listener started on 0.0.0.0:8243 {org.apache.synapse.transport.passthru.PassThroughHttpSSLListener}
TID: [0] [AM] [2015-05-12 14:49:41,398] INFO {org.apache.synapse.transport.passthru.PassThroughHttpListener} - Starting Pass-through HTTP Listener... {org.apache.synapse.transport.passthru.PassThroughHttpListener}
TID: [0] [AM] [2015-05-12 14:49:41,401] INFO {org.apache.synapse.transport.passthru.PassThroughHttpListener} - Pass-through HTTP Listener started on 0.0.0.0:8280 {org.apache.synapse.transport.passthru.PassThroughHttpListener}
TID: [0] [AM] [2015-05-12 14:49:41,421] INFO {org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent} - Cluster domain: api.tac.ibridge.wso2.carbon.domain {org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent}
TID: [0] [AM] [2015-05-12 14:49:41,422] INFO {org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent} - Using multicast based membership management scheme {org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent}
TID: [0] [AM] [2015-05-12 14:49:48,881] INFO {org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent} - Hazelcast initialized in 7456ms {org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent}
TID: [0] [AM] [2015-05-12 14:49:48,890] INFO {org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent} - Local member: [69047182-e689-493e-baa0-f0c10f93b75c] - Host:172.26.4.167, Remote Host:null, Port: 4000, HTTP:8280, HTTPS:8243, Domain: api.tac.ibridge.wso2.carbon.domain, Sub-domain:worker, Active:true {org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent}
TID: [0] [AM] [2015-05-12 14:49:49,495] INFO {org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent} - Cluster initialization completed {org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent}
TID: [0] [AM] [2015-05-12 14:49:49,609] INFO {org.wso2.carbon.ntask.core.service.impl.TaskServiceImpl} - Task service starting in CLUSTERED mode... {org.wso2.carbon.ntask.core.service.impl.TaskServiceImpl}
TID: [0] [AM] [2015-05-12 14:49:49,628] INFO {org.wso2.carbon.registry.eventing.internal.RegistryEventingServiceComponent} - Successfully Initialized Eventing on Registry {org.wso2.carbon.registry.eventing.internal.RegistryEventingServiceComponent}
TID: [0] [AM] [2015-05-12 14:49:52,377] INFO {org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent} - Received replayed message: a1b9c70f-b66e-4996-9f74-a1c7c544a957 {org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent}
TID: [0] [AM] [2015-05-12 14:49:52,378] INFO {org.wso2.carbon.core.deployment.SynchronizeRepositoryRequest} - Received [SynchronizeRepositoryRequest{tenantId=-1234, tenantDomain='carbon.super', messageId=a1b9c70f-b66e-4996-9f74-a1c7c544a957}] {org.wso2.carbon.core.deployment.SynchronizeRepositoryRequest}
TID: [0] [AM] [2015-05-12 14:49:52,378] INFO {org.wso2.carbon.core.deployment.SynchronizeRepositoryRequest} - Updating repo update required parameter {org.wso2.carbon.core.deployment.SynchronizeRepositoryRequest}
TID: [0] [AM] [2015-05-12 14:49:53,054] INFO {org.wso2.carbon.ui.internal.CarbonUIServiceComponent} - Mgt Console URL : https://nxt-tac-app02.nl.rsg:9443/carbon/ {org.wso2.carbon.ui.internal.CarbonUIServiceComponent}
TID: [0] [AM] [2015-05-12 14:49:53,054] INFO {org.wso2.carbon.ui.internal.CarbonUIServiceComponent} - API Publisher Default Context : http://nxt-tac-app02.nl.rsg:9763/publisher {org.wso2.carbon.ui.internal.CarbonUIServiceComponent}
TID: [0] [AM] [2015-05-12 14:49:53,055] INFO {org.wso2.carbon.ui.internal.CarbonUIServiceComponent} - API Store Default Context : http://nxt-tac-app02.nl.rsg:9763/store {org.wso2.carbon.ui.internal.CarbonUIServiceComponent}
TID: [0] [AM] [2015-05-12 14:49:53,224] INFO {org.wso2.carbon.apimgt.keymgt.internal.APIKeyMgtServiceComponent} - Setting default carbon host for thrift key management service: nxt-tac-app02.nl.rsg {org.wso2.carbon.apimgt.keymgt.internal.APIKeyMgtServiceComponent}
TID: [0] [AM] [2015-05-12 14:49:53,239] INFO {org.wso2.carbon.apimgt.keymgt.internal.APIKeyMgtServiceComponent} - Started thrift key mgt service at port:10397 {org.wso2.carbon.apimgt.keymgt.internal.APIKeyMgtServiceComponent}
TID: [0] [AM] [2015-05-12 14:50:21,380] INFO {org.apache.synapse.mediators.builtin.LogMediator} - STATUS = Message dispatched to the main sequence. Invalid URL., RESOURCE = /gm/services/aanvraag/MKE1 {org.apache.synapse.mediators.builtin.LogMediator}
TID: [0] [AM] [2015-05-12 14:50:22,885] INFO {org.apache.synapse.mediators.builtin.LogMediator} - STATUS = Message dispatched to the main sequence. Invalid URL., RESOURCE = /gm/services/aanvraag/MKE1 {org.apache.synapse.mediators.builtin.LogMediator}
答案 0 :(得分:2)
我确实有这个错误。
如果您创建了负载平衡网关,请将所有publisher,store和keymanager产品中的服务器URL指向网关的管理器节点。管理器节点是唯一可以提交到Deployment Synchronizer的节点。
当这个错误发生时,我在api-manager上的配置是:
<Environment type="hybrid">
<Name>Production and Sandbox</Name>
<!--
Server URL of the API gateway.
<ServerURL>https://${carbon.local.ip}:${mgt.transport.https.port}${carbon.context}/services/</ServerURL>
-->
<ServerURL>https://gateway.server-wso2/services/</ServerURL>
<!--
Admin username for the API gateway.
-->
<Username>admin</Username>
<!--
Admin password for the API gateway.
-->
<Password>admin</Password>
<!--
Endpoint URLs for the APIs hosted in this API gateway.
<GatewayEndpoint>http://${carbon.local.ip}:${http.nio.port},https://${carbon.local.ip}:${https.nio.port}</GatewayEndpoint>
-->
<GatewayEndpoint>http://gateway.server-wso2:8280,https://gateway.server-wso2:8243</GatewayEndpoint>
</Environment>
现在工作结构已经:
<Environment type="hybrid">
<Name>Production and Sandbox</Name>
<!--
Server URL of the API gateway.
<ServerURL>https://${carbon.local.ip}:${mgt.transport.https.port}${carbon.context}/services/</ServerURL>
-->
<ServerURL>https://mgt.gateway.server-wso2/services/</ServerURL>
<!--
Admin username for the API gateway.
-->
<Username>admin</Username>
<!--
Admin password for the API gateway.
-->
<Password>admin</Password>
<!--
Endpoint URLs for the APIs hosted in this API gateway.
<GatewayEndpoint>http://${carbon.local.ip}:${http.nio.port},https://${carbon.local.ip}:${https.nio.port}</GatewayEndpoint>
-->
<GatewayEndpoint>http://gateway.server-wso2:8280,https://gateway.server-wso2:8243</GatewayEndpoint>
</Environment>
请注意,网关端点不会更改,因为最终用户将从那里访问API。
希望它有所帮助。
:)
答案 1 :(得分:0)
理想情况下,在部署API时,网关管理器会使用depsyc将其推送给网关工作人员。 所以这很可能与depsync有关,当API未在网关工作者和管理员之间同步时,会出现此错误。 检查您的depsync设置,检查svn。
您可以通过查看文件夹来检查工件是否在网关工作程序中同步 库/部署/服务器/突触CONFIGS默认的/ apis
作为一种解决方法,您可以删除两个网关工作节点上的/ repository / deplyment / server并重新启动它们。这将解决任何svn冲突,如果有的话。