API 控制台问题 [英] API Console Issue

查看:60
本文介绍了API 控制台问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

过去一个月,我一直在静态 IP 上使用 WSO2 API Manager 1.9.1,我们非常喜欢它,将它放在 Azure 上的完全限定域名后面.由于我们仍仅用于内部用途,因此我们会在非工作时间关闭 VM 以节省资金.我们的 Azure 设置不保证每次 VM 重新启动时使用相同的 IP 地址.FQDN 允许我们始终访问

解决方案

由于以下问题,API 控制台可能没有给您响应

  1. 如果您使用的是 https,您必须在浏览器中输入网关 url 并接受它,然后才能从 API 控制台调用 API(这种情况下网关中没有签名证书)

  2. 可能由于您的域无法访问导致的 CORS 问题允许 Options 调用的来源响应

  3. 如果您创建一个具有 https 后端的 API.您必须将端点 SSL 证书导入到 client-trustore.jks

I've been using WSO2 API Manager 1.9.1 for the past month on a static IP and we liked it enough to put it on Azure behind a full qualified domain name. As we are still only using for internal purposes, we shut the VM down during off hours to save money. Our Azure setup does not guarantee the same IP address each time the VM restarts. The FQDN allows us to always reach https://api.mydomain.com regardless of what happens with the VM IP.

I updated the appropriate config files to the FQDN and everything seems to be working well. However! The one issue I have and cannot seem to resolve is calling APIs from the API consoloe. No matter what I do, I get a response as below

Response Body no content Response Code 0 Response Headers { "error": "no response from server" }

Mysteriously, I can successfully make the same calls from command line or SOAPUI. So it's something unique about the API Console. I can't seem to find anything useful in the logs or googling. I do see a recurring error but it's not very clear or even complete (seems to cut off).

[2015-11-17 21:33:21,768] ERROR - AsyncDataPublisher Reconnection failed for

Happy to provide further inputs / info. Any suggestions on root cause or where to look is appreciated. Thanks in advance for your help!

Edit#1 - adding screenshots from chrome

解决方案

The API Console may not be giving you response due to following issues

  1. If you are using https, you have to type the gateway url in browser and accept it before invoke the API from the API Console (This case there is no signed certificate in the gateway)

  2. CORS issue which may due to your domain is not in access allow origins response of Options call

  3. If you create a API which having https backend. You have to import endpoint SSL certificate to client-trustore.jks

这篇关于API 控制台问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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