我们的api会不时抛出500个Http代码。我试图找出问题并在wso2carbon.log中发现了这种错误:
TID: [0] [AM] [2017-03-05 20:06:11,687] INFO {org.wso2.carbon.core.multitenancy.TenantAxisConfigurator} - Creating tenant AxisConfiguration for tenant: aTenant[2] {org.wso2.carbon.core.multitenancy.TenantAxisConfigurator}
TID: [0] [AM] [2017-03-05 20:06:11,726] INFO {org.wso2.carbon.identity.user.store.configuration.deployer.UserStoreConfigurationDeployer} - User Store Configuration Deployer initiated. {org.wso2.carbon.identity.user.store.configuration.deployer.UserStoreConfigurationDeployer}
TID: [0] [AM] [2017-03-05 20:06:11,730] ERROR {org.apache.axis2.engine.AxisEngine} - The service cannot be found for the endpoint reference (EPR) local://axis2services/some/api/path {org.apache.axis2.engine.AxisEngine}
org.apache.axis2.AxisFault: The service cannot be found for the endpoint reference (EPR) local://axis2services/some/api/path
at org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPhase.java:78)
at org.apache.axis2.engine.Phase.invoke(Phase.java:329)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:167)
at org.wso2.carbon.core.multitenancy.MultitenantMessageReceiver.processRESTRequest(MultitenantMessageReceiver.java:594)
at org.wso2.carbon.core.multitenancy.MultitenantMessageReceiver.doNhttpREST(MultitenantMessageReceiver.java:534)
at org.wso2.carbon.core.multitenancy.MultitenantMessageReceiver.doREST(MultitenantMessageReceiver.java:353)
at org.wso2.carbon.core.multitenancy.MultitenantMessageReceiver.processRequest(MultitenantMessageReceiver.java:212)
at org.wso2.carbon.core.multitenancy.MultitenantMessageReceiver.receive(MultitenantMessageReceiver.java:79)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:344)
at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:168)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
TID: [0] [AM] [2017-03-05 20:06:11,803] INFO {org.wso2.carbon.core.deployment.DeploymentInterceptor} - Deploying Axis2 service: wso2carbon-sts {aTenant[2]} {org.wso2.carbon.core.deployment.DeploymentInterceptor}
TID: [0] [AM] [2017-03-05 20:06:11,856] INFO {org.apache.axis2.deployment.DeploymentEngine} - Deploying Web service: org.wso2.carbon.sts - {org.apache.axis2.deployment.DeploymentEngine}
TID: [0] [AM] [2017-03-05 20:06:11,860] INFO {org.wso2.carbon.core.deployment.DeploymentInterceptor} - Deploying Axis2 service: wso2carbon-sts {aTenant[2]} {org.wso2.carbon.core.deployment.DeploymentInterceptor}
TID: [0] [AM] [2017-03-05 20:06:11,926] INFO {org.wso2.carbon.mediation.initializer.multitenancy.TenantServiceBusInitializer} - Intializing the ESB Configuration for the tenant domain : aTenant {org.wso2.carbon.mediation.initializer.multitenancy.TenantServiceBusInitializer}
Deploying Axis2 service:...
之后一切正常。
所以似乎在UserStoreConfigurationDeployer运行时无法处理api调用。但这种情况每天发生10到20次,造成一些错误。
javadoc说:
/**
* This is to deploy a new User Store Management Configuration file dropped or created at repository/deployment/server/userstores
* or repository/tenant/<>tenantId</>/userstores. Whenever a new file with .xml extension is added/deleted or a modification is done to
* an existing file, deployer will automatically update the existing realm configuration org.wso2.carbon.identity.user.store.configuration
* according to the new file.
*/
但这些文件永远不会被触及。 我不是wso2的专家,所以有人能指出我在哪里搜索? UserStoreConfigurationDeployer是否可以配置为仅在开始时运行或每天只运行一次(凌晨2:00或其他什么)?
我们目前正在使用wso2am-1.8.0,计划升级到2.something。