首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >WSO2 iOT iOS代理无法登录

WSO2 iOT iOS代理无法登录
EN

Stack Overflow用户
提问于 2018-08-29 03:13:17
回答 1查看 221关注 0票数 0

我们在wso2 IoT服务器3.3.0的IOS设备注册方面面临一个问题。通过遵循这个文档https://docs.wso2.com/display/IOTS330/iOS+Configurations,我们安装了IOS功能和MDM证书。但是,在没有使用safari代理的情况下从IOS注册时,它会抛出500错误

代码语言:javascript
复制
HTTP Status 500 - org.mozilla.javascript.JavaScriptException: Error: {/app/modules/oauth/token-handlers.js} Could not set up access token pair by password grant type. Encoded client credentials are missing - setupTokenPairByPasswordGrantType(x, y) (/ios-web-agent/app/modules/oauth/token-handlers.js#44)
Status report
org.mozilla.javascript.JavaScriptException: Error: {/app/modules/oauth/token-handlers.js} Could not set up access token pair by password grant type. Encoded client credentials are missing - setupTokenPairByPasswordGrantType(x, y) (/ios-web-agent/app/modules/oauth/token-handlers.js#44)
description
The server encountered an internal error that prevented it from fulfilling this request.
Apache Tomcat/7.0.85

我们尝试了创建新的租户和用户,但没有成功。请看下面的wso2carbon.log。似乎API调用https://IOT-SERVER:9443/api-application-registration/register/tenants?tenantDomain=carbon.super&applicationName=ios-webapp-carbon.super的401失败了。你能帮我们解决这个问题吗?

代码语言:javascript
复制
0 bytes written {org.apache.http.nio.reactor.ssl.SSLIOSession}

[2018-08-28 00:34:45,784] DEBUG -  http-outgoing-397: Produce output {org.apache.synapse.transport.http.conn.LoggingNHttpClientConnection}

[2018-08-28 00:34:45,784] DEBUG -  I/O session http-outgoing-397-250 192.168.3.216:54504<->192.168.3.216:9443[ACTIVE][rw:w][ACTIVE][rw][NOT_HANDSHAKING][0][0][1189][0]: 1105 bytes written {org.apache.http.nio.reactor.ssl.SSLIOSession}

[2018-08-28 00:34:45,785] DEBUG -  HTTPS-Sender I/O dispatcher-4 << "POST /api-application-registration/register/tenants?tenantDomain=carbon.super&applicationName=ios-webapp-carbon.super HTTP/1.1[\r][\n]" {org.apache.synapse.transport.http.wire}

[2018-08-28 00:34:45,785] DEBUG -  HTTPS-Sender I/O dispatcher-4 << "X-JWT-Assertion: eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOi************************************kbWluQGNhcmJvbi5zdXBlciIsImV4cCI6MTUzNTUwMTY4NSwiaWF0IjoxNTM1NDQxNjg1LCJqdGkiOiIxNTM1NDQxNjg1NjkwMTQ5NTMwODMxNyJ9.jvxyzu4CwQKKJy2HL-H48PxP-9jOR1qC_ca_I3WbU3EuBe4yYw6RxYuWZOsNLJWsy77S_KPl3WlV4gUGnd4IsQHEnMARv_dYCtsEqpxAcT6Ga2ysfwCCtsuitgb_va65QmbYsBiMz2TOS-dVzzrdcbmljnTwUybvkAvCRY-R-ym16WgY7LY-mV2P5q-2q-DTeor6uGHFYrbuWaYIP3WlcoWByzIlsKbKnMGRTfal5bEIMmDg77Ah73CKj1V2NX0PugywEUmplEXAICBzvGlw4Ee5NuvllqDiNtER1fKkWnGgrZt561bi2D1436MQi4Tpy1dm_Qh2P0wMKQD6-FmNtw[\r][\n]" {org.apache.synapse.transport.http.wire}

[2018-08-28 00:34:45,785] DEBUG -  HTTPS-Sender I/O dispatcher-4 << "Content-Type: application/json; charset=UTF-8[\r][\n]" {org.apache.synapse.transport.http.wire}

[2018-08-28 00:34:45,785] DEBUG -  HTTPS-Sender I/O dispatcher-4 << "Transfer-Encoding: chunked[\r][\n]" {org.apache.synapse.transport.http.wire}

[2018-08-28 00:34:45,785] DEBUG -  HTTPS-Sender I/O dispatcher-4 << "Host: IOT server:9443[\r][\n]" {org.apache.synapse.transport.http.wire}

[2018-08-28 00:34:45,785] DEBUG -  HTTPS-Sender I/O dispatcher-4 << "Connection: Keep-Alive[\r][\n]" {org.apache.synapse.transport.http.wire}

[2018-08-28 00:34:45,785] DEBUG -  HTTPS-Sender I/O dispatcher-4 << "User-Agent: Synapse-PT-HttpComponents-NIO[\r][\n]" {org.apache.synapse.transport.http.wire}

[2018-08-28 00:34:45,785] DEBUG -  HTTPS-Sender I/O dispatcher-4 << "[\r][\n]" {org.apache.synapse.transport.http.wire}

[2018-08-28 00:34:45,785] DEBUG -  HTTPS-Sender I/O dispatcher-4 << "0[\r][\n]" {org.apache.synapse.transport.http.wire}

[2018-08-28 00:34:45,785] DEBUG -  HTTPS-Sender I/O dispatcher-4 << "[\r][\n]" {org.apache.synapse.transport.http.wire}

[2018-08-28 00:34:45,786] DEBUG -  I/O session http-outgoing-397-250 192.168.3.216:54504<->192.168.3.216:9443[ACTIVE][rw:w][ACTIVE][rw][NOT_HANDSHAKING][0][0][1189][0]: Clear event [w] {org.apache.http.nio.reactor.ssl.SSLIOSession}

[2018-08-28 00:34:45,786] DEBUG -  Adding tenant: -1234, isTenantLoaded: false {org.wso2.carbon.registry.indexing.internal.IndexingServiceComponent}

[2018-08-28 00:34:45,786] DEBUG -  Size of initializedTenants after adding tenant -1234: 1 {org.wso2.carbon.registry.indexing.internal.IndexingServiceComponent}

[2018-08-28 00:34:45,788] DEBUG -  Failed to authorize incoming request , API : %2Fapi-application-registration%2Fregister%2Ftenants {org.wso2.carbon.webapp.authenticator.framework.WebappAuthenticationValve}

[2018-08-28 00:34:45,788] DEBUG -  http-outgoing-397: Consume input {org.apache.synapse.transport.http.conn.LoggingNHttpClientConnection}

[2018-08-28 00:34:45,788] DEBUG -  I/O session http-outgoing-397-250 192.168.3.216:54504<->192.168.3.216:9443[ACTIVE][r:r][ACTIVE][r][NOT_HANDSHAKING][0][0][0][0]: 195 bytes read {org.apache.http.nio.reactor.ssl.SSLIOSession}

[2018-08-28 00:34:45,789] DEBUG -  HTTPS-Sender I/O dispatcher-4 >> "HTTP/1.1 401 Unauthorized[\r][\n]" {org.apache.synapse.transport.http.wire}

[2018-08-28 00:34:45,789] DEBUG -  HTTPS-Sender I/O dispatcher-4 >> "Content-Type: application/xml;charset=UTF-8[\r][\n]" {org.apache.synapse.transport.http.wire}

[2018-08-28 00:34:45,789] DEBUG -  HTTPS-Sender I/O dispatcher-4 >> "Content-Length: 36[\r][\n]" {org.apache.synapse.transport.http.wire}

[2018-08-28 00:34:45,789] DEBUG -  HTTPS-Sender I/O dispatcher-4 >> "Date: Tue, 28 Aug 2018 07:34:45 GMT[\r][\n]" {org.apache.synapse.transport.http.wire}

[2018-08-28 00:34:45,789] DEBUG -  HTTPS-Sender I/O dispatcher-4 >> "Server: WSO2 Carbon Server[\r][\n]" {org.apache.synapse.transport.http.wire}

[2018-08-28 00:34:45,789] DEBUG -  HTTPS-Sender I/O dispatcher-4 >> "[\r][\n]" {org.apache.synapse.transport.http.wire}

[2018-08-28 00:34:45,789] DEBUG -  HTTPS-Sender I/O dispatcher-4 >> "Failed to authorize incoming request" {org.apache.synapse.transport.http.wire}

[2018-08-28 00:34:45,789] DEBUG -  http-outgoing-397 << HTTP/1.1 401 Unauthorized {org.apache.synapse.transport.http.headers}

[2018-08-28 00:34:45,789] DEBUG -  http-outgoing-397 << Content-Type: application/xml;charset=UTF-8 {org.apache.synapse.transport.http.headers}

[2018-08-28 00:34:45,789] DEBUG -  http-outgoing-397 << Content-Length: 36 {org.apache.synapse.transport.http.headers}

[2018-08-28 00:34:45,790] DEBUG -  http-outgoing-397 << Date: Tue, 28 Aug 2018 07:34:45 GMT {org.apache.synapse.transport.http.headers}

[2018-08-28 00:34:45,790] DEBUG -  http-outgoing-397 << Server: WSO2 Carbon Server {org.apache.synapse.transport.http.headers}

[2018-08-28 00:34:45,790] DEBUG -  I/O session http-outgoing-397-250 192.168.3.216:54504<->192.168.3.216:9443[ACTIVE][r:r][ACTIVE][r][NOT_HANDSHAKING][0][0][0][0]: Set attribute RES_HEADER_ARRIVAL_TIME {org.apache.http.nio.reactor.ssl.SSLIOSession}

[2018-08-28 00:34:45,790] DEBUG -  I/O session http-outgoing-397-250 192.168.3.216:54504<->192.168.3.216:9443[ACTIVE][r:r][ACTIVE][r][NOT_HANDSHAKING][0][0][0][0]: Set attribute RES_FROM_BACKEND_READ_START_TIME {org.apache.http.nio.reactor.ssl.SSLIOSession}

[2018-08-28 00:34:45,790] DEBUG -  I/O session http-incoming-860-249 192.168.3.216:8243<->192.168.3.216:41245[ACTIVE][:r][ACTIVE][][NOT_HANDSHAKING][0][0][0][0]: Set attribute CLIENT_WORKER_INIT_TIME {org.apache.http.nio.reactor.ssl.SSLIOSession}

[2018-08-28 00:34:45,790] DEBUG -  getAction (null) from org.apache.axis2.client.Options@5314693d {org.apache.axis2.client.Options}

[2018-08-28 00:34:45,790] DEBUG -  Old SoapAction is (null) {org.apache.axis2.context.MessageContext}
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-09-06 02:45:05

抛出的错误是:移动应用程序端错误。

HTTP Status 500 - org.mozilla.javascript.JavaScriptException: Error:{/app/modules/oauth/token-handlers.js}无法通过密码授予类型设置访问令牌对。缺少编码的客户端凭据-- (/ios-web-agent/app/modules/oauth/token-handlers.js#44)状态报告( setupTokenPairByPasswordGrantType(x,y) org.mozilla.javascript.JavaScriptException: Error:{/app/org.mozilla.javascript.JavaScriptException/oauth/Token-handlers.js}无法通过密码授予类型设置访问令牌对。缺少编码的客户端凭据-- (/ios-web-agent/app/modules/oauth/token-handlers.js#44)描述服务器遇到了一个内部错误,无法满足此请求。Apache Tomcat/7.0.85

服务器wso2carbon.log:

代码语言:javascript
复制
0 bytes written {org.apache.http.nio.reactor.ssl.SSLIOSession}

[2018-08-28 00:34:45,784] DEBUG -  http-outgoing-397: Produce output 
{org.apache.synapse.transport.http.conn.LoggingNHttpClientConnection}

[2018-08-28 00:34:45,784] DEBUG -  I/O session http-outgoing-397-250
192.168.3.216:54504<->192.168.3.216:9443[ACTIVE][rw:w][ACTIVE][rw] . 
[NOT_HANDSHAKING][0][0][1189][0]: 1105 bytes written 
{org.apache.http.nio.reactor.ssl.SSLIOSession}

[2018-08-28 00:34:45,785] DEBUG -  HTTPS-Sender I/O dispatcher-4 << "POST 
/api-application-registration/register/tenants?            
tenantDomain=carbon.super&applicationName=ios-webapp-carbon.super 
HTTP/1.1[\r][\n]" {org.apache.synapse.transport.http.wire}

[2018-08-28 00:34:45,785] DEBUG -  HTTPS-Sender I/O dispatcher-4 << "X-JWT- 
Assertion: eyJhbGciOiJSUzI1NiJ9.eyJzdWI7LY-mV2P5q-2q-  
{org.apache.synapse.transport.http.wire}

[2018-08-28 00:34:45,785] DEBUG -  HTTPS-Sender I/O dispatcher-4 << "Content- 
Type: application/json; charset=UTF-8[\r][\n]" 
{org.apache.synapse.transport.http.wire}

[2018-08-28 00:34:45,785] DEBUG -  HTTPS-Sender I/O dispatcher-4 << 
"Transfer-Encoding: chunked[\r][\n]" {org.apache.synapse.transport.http.wire}

[2018-08-28 00:34:45,785] DEBUG -  HTTPS-Sender I/O dispatcher-4 << "Host: 
IOT server:9443[\r][\n]" {org.apache.synapse.transport.http.wire}

[2018-08-28 00:34:45,785] DEBUG -  HTTPS-Sender I/O dispatcher-4 << 
"Connection: Keep-Alive[\r][\n]" {org.apache.synapse.transport.http.wire}

[2018-08-28 00:34:45,785] DEBUG -  HTTPS-Sender I/O dispatcher-4 << "User- 
Agent: Synapse-PT-HttpComponents-NIO[\r][\n]" 
{org.apache.synapse.transport.http.wire}

[2018-08-28 00:34:45,785] DEBUG -  HTTPS-Sender I/O dispatcher-4 << "[\r] . 
[\n]" {org.apache.synapse.transport.http.wire}

[2018-08-28 00:34:45,785] DEBUG -  HTTPS-Sender I/O dispatcher-4 << "0[\r] . 
[\n]" {org.apache.synapse.transport.http.wire}

[2018-08-28 00:34:45,785] DEBUG -  HTTPS-Sender I/O dispatcher-4 << "[\r] . 
[\n]" {org.apache.synapse.transport.http.wire}

[2018-08-28 00:34:45,786] DEBUG -  I/O session http-outgoing-397-250
192.168.3.216:54504<->192.168.3.216:9443[ACTIVE][rw:w][ACTIVE][rw] . 
[NOT_HANDSHAKING][0][0][1189][0]: Clear event [w] 
{org.apache.http.nio.reactor.ssl.SSLIOSession}

[2018-08-28 00:34:45,786] DEBUG -  Adding tenant: -1234, isTenantLoaded: 
false {org.wso2.carbon.registry.indexing.internal.IndexingServiceComponent}

[2018-08-28 00:34:45,786] DEBUG -  Size of initializedTenants after adding 
tenant -1234: 1 
{org.wso2.carbon.registry.indexing.internal.IndexingServiceComponent}

[2018-08-28 00:34:45,788] DEBUG -  Failed to authorize incoming request , API 
: %2Fapi-application-registration%2Fregister%2Ftenants 
{org.wso2.carbon.webapp.authenticator.framework.WebappAuthenticationValve}

[2018-08-28 00:34:45,788] DEBUG -  http-outgoing-397: Consume input 
{org.apache.synapse.transport.http.conn.LoggingNHttpClientConnection}

[2018-08-28 00:34:45,788] DEBUG -  I/O session http-outgoing-397-250
192.168.3.216:54504<->192.168.3.216:9443[ACTIVE][r:r][ACTIVE][r] . 
[NOT_HANDSHAKING][0][0][0][0]: 195 bytes read 
{org.apache.http.nio.reactor.ssl.SSLIOSession}

[2018-08-28 00:34:45,789] DEBUG -  HTTPS-Sender I/O dispatcher-4 >> "HTTP/1.1 
401 Unauthorized[\r][\n]" {org.apache.synapse.transport.http.wire}

[2018-08-28 00:34:45,789] DEBUG -  HTTPS-Sender I/O dispatcher-4 >> "Content- 
Type: application/xml;charset=UTF-8[\r][\n]" 
{org.apache.synapse.transport.http.wire}

[2018-08-28 00:34:45,789] DEBUG -  HTTPS-Sender I/O dispatcher-4 >> "Content- 
Length: 36[\r][\n]" {org.apache.synapse.transport.http.wire}

[2018-08-28 00:34:45,789] DEBUG -  HTTPS-Sender I/O dispatcher-4 >> "Date: 
Tue, 28 Aug 2018 07:34:45 GMT[\r][\n]" 
{org.apache.synapse.transport.http.wire}

[2018-08-28 00:34:45,789] DEBUG -  HTTPS-Sender I/O dispatcher-4 >> "Server: 
WSO2 Carbon Server[\r][\n]" {org.apache.synapse.transport.http.wire}

[2018-08-28 00:34:45,789] DEBUG -  HTTPS-Sender I/O dispatcher-4 >> "[\r] . 
[\n]" {org.apache.synapse.transport.http.wire}

[2018-08-28 00:34:45,789] DEBUG -  HTTPS-Sender I/O dispatcher-4 >> "Failed 
to authorize incoming request" {org.apache.synapse.transport.http.wire}

[2018-08-28 00:34:45,789] DEBUG -  http-outgoing-397 << HTTP/1.1 401 
Unauthorized {org.apache.synapse.transport.http.headers}

[2018-08-28 00:34:45,789] DEBUG -  http-outgoing-397 << Content-Type: 
application/xml;charset=UTF-8 {org.apache.synapse.transport.http.headers}

[2018-08-28 00:34:45,789] DEBUG -  http-outgoing-397 << Content-Length: 36 
{org.apache.synapse.transport.http.headers}

[2018-08-28 00:34:45,790] DEBUG -  http-outgoing-397 << Date: Tue, 28 Aug 
2018 07:34:45 GMT {org.apache.synapse.transport.http.headers}

[2018-08-28 00:34:45,790] DEBUG -  http-outgoing-397 << Server: WSO2 Carbon 
Server {org.apache.synapse.transport.http.headers}

[2018-08-28 00:34:45,790] DEBUG -  I/O session http-outgoing-397-250
192.168.3.216:54504<->192.168.3.216:9443[ACTIVE][r:r][ACTIVE][r] . 
[NOT_HANDSHAKING][0][0][0][0]: Set attribute RES_HEADER_ARRIVAL_TIME 
{org.apache.http.nio.reactor.ssl.SSLIOSession}

[2018-08-28 00:34:45,790] DEBUG -  I/O session http-outgoing-397-250
192.168.3.216:54504<->192.168.3.216:9443[ACTIVE][r:r][ACTIVE][r] . 
[NOT_HANDSHAKING]    [0][0][0][0]: Set attribute 
RES_FROM_BACKEND_READ_START_TIME 
{org.apache.http.nio.reactor.ssl.SSLIOSession}

[2018-08-28 00:34:45,790] DEBUG -  I/O session http-incoming-860-249
192.168.3.216:8243<->192.168.3.216:41245[ACTIVE][:r][ACTIVE][] . 
[NOT_HANDSHAKING] . 
[0][0][0][0]: Set attribute CLIENT_WORKER_INIT_TIME 
{org.apache.http.nio.reactor.ssl.SSLIOSession}

[2018-08-28 00:34:45,790] DEBUG -  getAction (null) from 
org.apache.axis2.client.Options@5314693d {org.apache.axis2.client.Options}

[2018-08-28 00:34:45,790] DEBUG -  Old SoapAction is (null) 
{org.apache.axis2.context.MessageContext}

修正:

编辑IOT_HOME/repository/deployment/server/jaggeryapps/ios-web-agent/app/conf/config.json并将所有者和adminUser更改为“g****@carbon.super”,文档中没有提到该文件!!

  1. 修复此错误后,引发另一个错误

TID:-1234 2018-08-29 04:01:18,487错误{org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver} -错误处理过程中发生错误,放弃!{org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver} org.apache.cxf.interceptor.Fault:加载程序约束违反:当解析方法"org.apache.http.protocol.HttpCoreContext.(Lorg/apache/http/protocol/HttpContext;)类加载器(当前类的org/wso2/carbon/webapp/mgt/loader/CarbonWebappClassLoader)实例、org/apache/http/client/protocol/HttpClientContext,和类加载器(方法定义类的org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader)实例,org/apache/http/protocol/HttpCoreContext,在org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:170) at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:136) at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:204) at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:101) at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1的签名中使用org/apache/http/protocol/HttpContext类型的不同的类对象.run(ServiceInvokerInterceptor.java:58) .

Fix:https://github.com/wso2/product-iots/issues/1818

处理一些jar文件wso2 2/lib/运行时/cfx

  • httpclient-4.3.6.jar
  • httpcore-4.2.4.jar
  • commons-logging-1.1.1.jar
代码语言:javascript
复制
1. There were errors showing about Nullkey

错误-全局异常映射程序捕获了一个未知的异常。{org.wso2.carbon.apimgt.rest.api.util.exception.GlobalThrowableMapper} java.lang.NullPointerException at org.wso2.carbon.apimgt.rest.api.util.impl.WebAppAuthenticatorImpl.validateScopes(WebAppAuthenticatorImpl.java:152)

java.security.InvalidKeyException:提供的键(null)不是实例

之所以出现这种情况,是因为我们将自己的SSL用于域加密for,而不是使用脚本生成的自签名SSLs,使用脚本生成的证书解决了这个问题。需要找到将签名SSL用于域的步骤。

  1. WSO2 MDM iPhone profile installation issue (Invalid DER encoding, not ended)

修正:

希望从最新的p2回购中重建ios功能扩展将解决这个错误。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/52068948

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档