在Docker容器中记录设备管理时的WSO2 IOT APIMClientOAuthException

问题描述 投票:2回答:1

我正在尝试使用docker(https://github.com/wso2-attic/docker-iot)在AWS(Ubuntu 18.04.1 LTS)的实例上安装WSO2 IoT服务器(版本3.3.0),然后我运行了change-ip.sh脚本以更改重定向的IP地址。我已将localhost更改为我自己的静态IP地址。

更改完成后,我尝试登录设备管理控制台。但它会抛出这个错误,但在发布者我可以访问

 ERROR {auth-module} -  org.wso2.carbon.apimgt.integration.client.exception.APIMClientOAuthException: failed to retrieve oauth token using jwt

我激活了调试日志。在IOT_HOME / conf / log4j.properties文件中

取消注释以下log4j.logger.org.apache.synapse.transport.http.wire = DEBUG

log4j.logger.feign = DEBUG

评论以下内容

log4j.category.org.apache.synapse = WARN

附件中的结果

https://github.com/wso2/product-iots/files/2977974/wso2carbon.log

我的主机文件

127.0.0.1 localhost

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

docker容器的主机

127.0.0.1       localhost
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
172.18.0.4      wso2iot-server

它与这个问题有关

WSO2 IoTS APIMClientOAuthException: failed to retrieve oauth token using jwt

https://github.com/wso2/product-iots/issues/1396

有什么建议吗?

docker wso2 jwt wso2is wso2iot
1个回答
1
投票

问题与HTTPS网关端口有关:8243,当根据文件docker-compose.yml启动容器时,它只暴露端口9443,所以你必须添加端口8243才能从外部访问,这就是为什么它适用于localhost和在使用ip地址更改后,它会生成错误。

所以我用这个命令更改了ip地址后保存了一个新的容器图像

docker commit a69f82f5eb71 wso2iot-server: 3.3.1

然后我添加了端口8243来启动图像

docker run -p 8243: 8243 -p 8280: 8280 -p 9443: 9443 wso2iot-server: 3.3.1 

谢谢你@Geeth Munasinghe的帮助

© www.soinside.com 2019 - 2024. All rights reserved.