我正在尝试在运行Windows 10,jdk 8.0.191的VM上启动WSO2 IoT服务器3.3.0。
在启动过程中,几乎每个android API都存在多个错误。 像这样的错误:
[2018-12-11 15:11:27,156] [IoT-Core] ERROR - {org.wso2.carbon.apimgt.rest.api.publisher.impl.ApisApiServiceImpl} Error while adding new API : admin-Windows Binary Security Token Service-1.0.0 - Scope 'perm:windows:enroll' is already used by another API.
org.wso2.carbon.apimgt.api.APIManagementException: Scope 'perm:windows:enroll' is already used by another API.
at org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO.addScopes(ApiMgtDAO.java:7171)
at org.wso2.carbon.apimgt.impl.dao.ApiMgtDAO.addAPI(ApiMgtDAO.java:4876)
at org.wso2.carbon.apimgt.impl.APIProviderImpl.addAPI(APIProviderImpl.java:654)
at org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.addAPI(UserAwareAPIProvider.java:59)
at org.wso2.carbon.apimgt.rest.api.publisher.impl.ApisApiServiceImpl.apisPost(ApisApiServiceImpl.java:281)
at org.wso2.carbon.apimgt.rest.api.publisher.ApisApi.apisPost(ApisApi.java:574)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:179)
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:192)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:103)
at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)
at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267)
at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234)
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208)
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)
at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:191)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:301)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:220)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:276)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
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:219)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
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.webapp.authenticator.framework.WebappAuthenticationValve.invoke(WebappAuthenticationValve.java:46)
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:962)
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:445)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1115)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1775)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1734)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
[2018-12-11 15:11:27,203] [IoT-Core] ERROR - {org.wso2.carbon.apimgt.webapp.publisher.APIPublisherStartupHandler} failed to publish api.
org.wso2.carbon.apimgt.webapp.publisher.exception.APIManagerPublisherException: feign.FeignException: status 500 reading APIIndividualApi#apisPost(API,String,String); content:
{"code":500,"message":"Internal server error","description":"Error while adding new API : admin-Windows Binary Security Token Service-1.0.0 - Scope 'perm:windows:enroll' is already used by another API.","moreInfo":"","error":[]}
at org.wso2.carbon.apimgt.webapp.publisher.APIPublisherServiceImpl.publishAPI(APIPublisherServiceImpl.java:75)
at org.wso2.carbon.apimgt.webapp.publisher.APIPublisherStartupHandler.publishAPIs(APIPublisherStartupHandler.java:97)
at org.wso2.carbon.apimgt.webapp.publisher.APIPublisherStartupHandler.access$500(APIPublisherStartupHandler.java:30)
at org.wso2.carbon.apimgt.webapp.publisher.APIPublisherStartupHandler$1.run(APIPublisherStartupHandler.java:69)
at java.lang.Thread.run(Thread.java:748)
Caused by: feign.FeignException: status 500 reading APIIndividualApi#apisPost(API,String,String); content:
{"code":500,"message":"Internal server error","description":"Error while adding new API : admin-Windows Binary Security Token Service-1.0.0 - Scope 'perm:windows:enroll' is already used by another API.","moreInfo":"","error":[]}
at feign.FeignException.errorStatus(FeignException.java:62)
at feign.codec.ErrorDecoder$Default.decode(ErrorDecoder.java:91)
at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:138)
at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:76)
at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:103)
at com.sun.proxy.$Proxy44.apisPost(Unknown Source)
at org.wso2.carbon.apimgt.webapp.publisher.APIPublisherServiceImpl.publishAPI(APIPublisherServiceImpl.java:56)
... 4 more
启动后,我无法注册android设备,注册仍在检索wso2代理上的许可协议。
此外,当我尝试更改平台配置-Android配置时,出现“发生意外错误”。点击保存按钮后出现提示信息。
顺便说一句,版本3.2.0在相同的VM上启动没有问题 有什么解决方法吗?有没有人成功在Windows上启动IoT服务器3.3.0?
答案 0 :(得分:1)
分别运行WSO2 IoT工作者和管理者时,我遇到了相同的问题。我不确定您是否已解决此问题,但我只是分享了在阅读Github中的源代码后发现的解决方案。您需要做的就是将-Denable-api-scopes-sharing="true"
添加到wso2iot-3.3.0_device-manager\bin\iot-server.sh
中。如果您注意到,此参数将出现在原始bin\iot-server.sh
中。但是运行profile-creator.sh/bat
之后,它就消失了。
在iot-server.sh
中:
...
-Dmqtt.broker.https.port="9446" \
-Denable-api-scopes-sharing="true" \
org.wso2.carbon.bootstrap.Bootstrap $*
status=$?
...