WSO2 IoTS APIMClientOAuthException: failed to retrieve oauth token using jwt

拈花ヽ惹草 提交于 2019-11-28 13:06:27

问题


I have uploaded WSO2 IoTS 3.1.0 to my remote virtual machine with static IP address.

I have unzipped zip file then run sudo ./change-ip.sh

In first step I have entered localhost

In second step I have entered my_own_ip_address

Then my hostname is my_own_ip_address

When I launch IoT Server and open device management then I login where it shows me this page:

When I try to open any other page and even try to logout it redirects me to this page.

My logs shows this:

TID[-1234] [IoT] [2017-09-09 08:32:30,079] ERROR {auth-module} - 
org.wso2.carbon.apimgt.integration.client.exception.APIMClientOAuthException: failed to retrieve oauth token using jwt 

org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1754) 
org.mozilla.javascript.MemberBox.invoke(MemberBox.java:148) 
org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225) 
org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:85) 

It shows that there is an error in jaggery JS.

What did I miss?


回答1:


One reason for the issue could be that you are having a DNS entry against that IP in /etc/hosts file. Please make sure that your /etc/hosts file does not contain any DNS entry pointing your IP to a hostname. When WSO2 IoT Server tries to resolve DNS to call the endpoints, the first thing it looks at is your local DNS setting. If your IP is pointing to a hostname, it takes that host name as the server hostname. And when IoT server tries to verify the common name of the SSL certificate, it gets conflicting information. This leads to hostname verification fail issue. And that could result in JWT token failure as it cannot access the endpoints.

Similar issue was discussed here



来源:https://stackoverflow.com/questions/46128761/wso2-iots-apimclientoauthexception-failed-to-retrieve-oauth-token-using-jwt

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!