亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

WSO2 iOT iOS 代理無法登錄

WSO2 iOT iOS 代理無法登錄

幕布斯6054654 2021-08-19 16:15:44
我們正面臨 IOS 設備注冊到 wso2 IoT 服務器 3.3.0 的問題。我們按照此文檔https://docs.wso2.com/display/IOTS330/iOS+Configurations安裝了 IOS 特色證書和 MDM 證書。但是當從 IOS 注冊而不使用 safari 的代理時,它會拋出 500 錯誤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 reportorg.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)descriptionThe 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 失敗。您能幫我們嗎?解決這個?
查看完整描述

1 回答

?
慕容森

TA貢獻1853條經驗 獲得超18個贊

拋出的錯誤是:移動應用端錯誤


HTTP 狀態 500 - org.mozilla.javascript.JavaScriptException:錯誤:{/app/modules/oauth/token-handlers.js} 無法按密碼授予類型設置訪問令牌對。缺少編碼的客戶端憑據 - setupTokenPairByPasswordGrantType(x, y) (/ios-web-agent/app/modules/oauth/token-handlers.js#44) 狀態報告 org.mozilla.javascript.JavaScriptException:錯誤:{/app/ modules/oauth/token-handlers.js} 無法通過密碼授予類型設置訪問令牌對。缺少編碼的客戶端憑據 - setupTokenPairByPasswordGrantType(x, y) (/ios-web-agent/app/modules/oauth/token-handlers.js#44) 說明 服務器遇到內部錯誤,無法完成此請求。Apache Tomcat/7.0.85


服務器 wso2carbon.log :


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 并將 owner 和 adminUser 更改為 'g****@carbon.super' ,沒有任何文檔說明此文件!!


修復此問題后拋出另一個錯誤

TID: [-1234] [] [2018-08-29 04:01:18,487] ERROR {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; )V”當前類的類加載器(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 的簽名中使用的類型 org/apache/http/protocol/HttpContext 具有不同的 Class 對象。


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


擺脫一些 jar 文件 wso2/lib/runtime/cfx


httpclient-4.3.6.jar

httpcore-4.2.4.jar

commons-logging-1.1.1.jar


有關于 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 用于域 cryptocom 而不是腳本生成的自簽名 SSL,使用腳本生成的證書解決了這個問題。需要找到為域使用簽名 SSL 的步驟。


WSO2 MDM iPhone 配置文件安裝問題(無效的 DER 編碼,未結束)

使固定:


希望從最新的 p2 repo 重建 ios-features 擴展可以解決這個錯誤。


查看完整回答
反對 回復 2021-08-19
  • 1 回答
  • 0 關注
  • 166 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號