2016-08-11 1 views
0

Я получил эту ошибку раньше (That one связан с ошибкой аутентификации API APIAuthenticationHandler из-за недопустимых учетных данных) , но на этот раз сообщения об ошибках из журнала сервера отличаются. Когда я пытаюсь сгенерировать ключи на экране хранения/подписки, я получил сообщение «Ошибка при выполнении действия generateApplicationKey».wso2 am 1.10.0: Ошибка при выполнении действия generateApplicationKey

журнала сервера:

==> wso2carbon.log <== 
TID: [-1234] [] [2016-08-11 01:21:14,600] ERROR {org.wso2.carbon.apimgt.hostobjects.APIStoreHostObject} - **Error while obtaining the application access token for the application:…**  {org.wso2.carbon.apimgt.hostobjects.APIStoreHostObject} 
org.wso2.carbon.apimgt.api.APIManagementException: Could not execute Workflow 
    at org.wso2.carbon.apimgt.impl.APIConsumerImpl.requestApprovalForApplicationRegistration(APIConsumerImpl.java:2651) 
    at org.wso2.carbon.apimgt.impl.UserAwareAPIConsumer.requestApprovalForApplicationRegistration(UserAwareAPIConsumer.java:36) 
    at org.wso2.carbon.apimgt.hostobjects.APIStoreHostObject.jsFunction_getApplicationKey(APIStoreHostObject.java:380) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:606) 
    at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126) 
    at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:386) 
    at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52) 
    at org.jaggeryjs.rhino.store.modules.subscription.c2._c_anonymous_2(/store/modules/subscription/key.jag:39) 
    at org.jaggeryjs.rhino.store.modules.subscription.c2.call(/store/modules/subscription/key.jag) 
    at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430) 
    at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269) 
    at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97) 
    at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42) 
    at org.jaggeryjs.rhino.store.modules.subscription.c0._c_anonymous_9(/store/modules/subscription/module.jag:32) 
    at org.jaggeryjs.rhino.store.modules.subscription.c0.call(/store/modules/subscription/module.jag) 
    at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52) 
    at org.jaggeryjs.rhino.store.site.blocks.subscription.subscription_add.ajax.c0._c_anonymous_1(/store/site/blocks/subscription/subscription-add/ajax/subscription-add.jag:240) 
    at org.jaggeryjs.rhino.store.site.blocks.subscription.subscription_add.ajax.c0.call(/store/site/blocks/subscription/subscription-add/ajax/subscription-add.jag) 
    at org.mozilla.javascript.optimizer.OptRuntime.call0(OptRuntime.java:23) 
    at org.jaggeryjs.rhino.store.site.blocks.subscription.subscription_add.ajax.c0._c_script_0(/store/site/blocks/subscription/subscription-add/ajax/subscription-add.jag:3) 
    at org.jaggeryjs.rhino.store.site.blocks.subscription.subscription_add.ajax.c0.call(/store/site/blocks/subscription/subscription-add/ajax/subscription-add.jag) 
    at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394) 
    at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091) 
    at org.jaggeryjs.rhino.store.site.blocks.subscription.subscription_add.ajax.c0.call(/store/site/blocks/subscription/subscription-add/ajax/subscription-add.jag) 
    at org.jaggeryjs.rhino.store.site.blocks.subscription.subscription_add.ajax.c0.exec(/store/site/blocks/subscription/subscription-add/ajax/subscription-add.jag) 
    at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:567) 
    at org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:273) 
    at org.jaggeryjs.jaggery.core.manager.WebAppManager.exec(WebAppManager.java:587) 
    at org.jaggeryjs.jaggery.core.manager.WebAppManager.execute(WebAppManager.java:507) 
    at org.jaggeryjs.jaggery.core.JaggeryServlet.doPost(JaggeryServlet.java:29) 
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:646) 
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) 
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) 
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) 
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748) 
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:486) 
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:378) 
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:338) 
    at org.jaggeryjs.jaggery.core.JaggeryFilter.doFilter(JaggeryFilter.java:21) 
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) 
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) 
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) 
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) 
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504) 
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) 
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) 
    at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:99) 
    at org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47) 
    at org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:57) 
    at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47) 
    at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62) 
    at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:159) 
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) 
    at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57) 
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) 
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421) 
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074) 
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611) 
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1739) 
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1698) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) 
    at java.lang.Thread.run(Thread.java:745) 
Caused by: org.wso2.carbon.apimgt.impl.workflow.WorkflowException: Error occured when updating the status of the Application creation process 
    at org.wso2.carbon.apimgt.impl.workflow.ApplicationRegistrationSimpleWorkflowExecutor.complete(ApplicationRegistrationSimpleWorkflowExecutor.java:82) 
    at org.wso2.carbon.apimgt.impl.workflow.ApplicationRegistrationSimpleWorkflowExecutor.execute(ApplicationRegistrationSimpleWorkflowExecutor.java:54) 
    at org.wso2.carbon.apimgt.impl.APIConsumerImpl.requestApprovalForApplicationRegistration(APIConsumerImpl.java:2626) 
    ... 66 more 
Caused by: org.wso2.carbon.apimgt.api.APIManagementException: Error occurred while executing SubscriberKeyMgtClient. 
    at org.wso2.carbon.apimgt.impl.utils.APIUtil.handleException(APIUtil.java:1195) 
    at org.wso2.carbon.apimgt.impl.workflow.AbstractApplicationRegistrationWorkflowExecutor.dogenerateKeysForApplication(AbstractApplicationRegistrationWorkflowExecutor.java:186) 
    at org.wso2.carbon.apimgt.impl.workflow.AbstractApplicationRegistrationWorkflowExecutor.generateKeysForApplication(AbstractApplicationRegistrationWorkflowExecutor.java:121) 
    at org.wso2.carbon.apimgt.impl.workflow.ApplicationRegistrationSimpleWorkflowExecutor.complete(ApplicationRegistrationSimpleWorkflowExecutor.java:78) 
    ... 68 more 
Caused by: org.wso2.carbon.apimgt.api.APIManagementException: Can not create OAuth application : … 
    at org.wso2.carbon.apimgt.impl.AMDefaultKeyManagerImpl.handleException(AMDefaultKeyManagerImpl.java:592) 
    at org.wso2.carbon.apimgt.impl.AMDefaultKeyManagerImpl.createApplication(AMDefaultKeyManagerImpl.java:106) 
    at org.wso2.carbon.apimgt.impl.workflow.AbstractApplicationRegistrationWorkflowExecutor.dogenerateKeysForApplication(AbstractApplicationRegistrationWorkflowExecutor.java:150) 
    ... 70 more 
**Caused by: org.wso2.carbon.apimgt.keymgt.stub.subscriber.APIKeyMgtSubscriberServiceAPIManagementException: APIKeyMgtSubscriberServiceAPIManagementException** 
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) 
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526) 
    at java.lang.Class.newInstance(Class.java:383) 
    at org.wso2.carbon.apimgt.keymgt.stub.subscriber.APIKeyMgtSubscriberServiceStub.createOAuthApplicationByApplicationInfo(APIKeyMgtSubscriberServiceStub.java:2124) 
    at org.wso2.carbon.apimgt.keymgt.client.SubscriberKeyMgtClient.createOAuthApplicationbyApplicationInfo(SubscriberKeyMgtClient.java:62) 
    at org.wso2.carbon.apimgt.impl.AMDefaultKeyManagerImpl.createApplication(AMDefaultKeyManagerImpl.java:104) 
    ... 71 more 

База данных MSSQL, если это делает разницу.

Из журнала проблема связана с углеродным компонентом. WSO2 APIM 1.10.0 основан на WSO2 Carbon 4.4.3.

+0

Исходный код для org.wso2.carbon.apimgt.impl.APIConsumerImpl находится здесь: https://github.com/wso2/carbon-apimgt/blob/master/components/apimgt/org.wso2.carbon.apimgt .impl/src/main/java/org/wso2/carbon/apimgt/impl/APIConsumerImpl.java –

+0

APIKeyMgtSubscriberServiceStub (createOAuthApplicationByApplicationInfo (APIKeyMgtSubscriberServiceStub.java:2124): https://github.com/wso2/carbon-apimgt/blob/ 8e5b065f3149d75e9eea3d63fe3f68b24503e6b4/components/apimgt/org.wso2.carbon.apimgt.keymgt.client/src/main/java/org/wso2/carbon/apimgt/keymgt/client/SubscriberKeyMgtClient.java –

ответ

0

В моем случае я нашел в журнале, что бережливый сервер/менеджер ключей не может быть запущен из-за конфликтов портов. У меня есть два экземпляра wso, работающих в одном и том же поле. Смещение порта шлюза НЕ применялось к портам бережливого сервера/клиента. После того как я изменил его на другой порт, все работает как шарм.

+0

Значение ThriftServerPort по умолчанию - 10397. –