WSO2 IoTS APIMClientOAuthException:无法使用 jwt 检索 oauth 令牌 [英] WSO2 IoTS APIMClientOAuthException: failed to retrieve oauth token using jwt

查看:21
本文介绍了WSO2 IoTS APIMClientOAuthException:无法使用 jwt 检索 oauth 令牌的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已使用静态 IP 地址将 WSO2 IoTS 3.1.0 上传到我的远程虚拟机.

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

我已经解压了 zip 文件然后运行 ​​sudo ./change-ip.sh

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

第一步我输入了localhost

在第二步我输入了my_own_ip_address

那么我的主机名是 my_own_ip_address

当我启动 IoT Server 并打开设备管理时,我会登录它向我显示此页面的位置:

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.

我的日志显示:

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) 

显示jaggery JS有错误.

It shows that there is an error in jaggery JS.

我错过了什么?

推荐答案

该问题的一个原因可能是您在/etc/hosts 文件中有一个针对该 IP 的 DNS 条目.请确保您的/etc/hosts 文件不包含任何将您的 IP 指向主机名的 DNS 条目.当 WSO2 IoT Server 尝试解析 DNS 以调用端点时,它首先查看的是您的本地 DNS 设置.如果您的 IP 指向一个主机名,它将将该主机名作为服务器主机名.当 IoT 服务器尝试验证 SSL 证书的通用名称时,它会获得冲突信息.这会导致主机名验证失败问题.这可能会导致 JWT 令牌失败,因为它无法访问端点.

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.

此处

这篇关于WSO2 IoTS APIMClientOAuthException:无法使用 jwt 检索 oauth 令牌的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆