为什么WSO2 API Manager尝试功能失败?

时间:2014-01-24 03:59:05

标签: wso2 wso2-am

我的配置如下: 1台服务器,带有单独的Publisher(9446)和Store(端口9447)。两者都配置了共享的gov / config注册表(注意发布者是相同的,除了localhost:9446 /注册表,用于远程实例url:

<dbConfig name="govregistry">
    <dataSource>jdbc/WSO2SHAREDCONREG_DB</dataSource>
</dbConfig>
<remoteInstance url="https://localhost:9447/registry">
    <id>gov</id>
    <dbConfig>govregistry</dbConfig>
    <readOnly>false</readOnly>
    <enableCache>true</enableCache>
    <registryRoot>/</registryRoot>
</remoteInstance>
<mount path="/_system/governance" overwrite="true">
    <instanceId>gov</instanceId>
    <targetPath>/_system/governance</targetPath>
</mount>
<mount path="/_system/config" overwrite="true">
    <instanceId>gov</instanceId>
    <targetPath>/_system/nodes</targetPath>
</mount>

我在不同的服务器上有一个网关和密钥管理器。这些都部署到不同的目录,WSO2文档没有说对registry.xml文件做任何额外的操作,所以它们看起来像:

<currentDBConfig>wso2registry</currentDBConfig>
<dbConfig name="wso2registry">
    <dataSource>jdbc/WSO2CarbonDB</dataSource>
</dbConfig>

当API发布然后我尝试使用'试一试'功能时,我得到以下错误(无论API是否设置为需要令牌)... 此错误在网关服务器上:

[2014-01-23 21:54:31,111] ERROR - APIAuthenticationHandler API authentication failure
org.wso2.carbon.apimgt.gateway.handlers.security.APISecurityException: Access failure for API: /newphoneverify, version: 1.0.0 with key: null

我是否还需要做一些额外的事情,比如在keymanager和gateway上设置治理和配置注册表共享?

2 个答案:

答案 0 :(得分:0)

如果未使用“无”身份验证类型启用API的OPTIONS谓词,则会发生这种情况。检查[1]。

[1] https://wso2.org/jira/browse/APIMANAGER-1819

答案 1 :(得分:0)

我遇到同样的问题:

Swagger UI不起作用并返回上面相同的屏幕截图,但如果我使用chrome / postman,API会返回正确的值,因此只是有问题的swagger UI,我在API管理器前面有一个Apache,并且商店的外部名称与内部名称不同,apache proxy通过请求。

我已经配置了api-manager.xml,并且API没有授权(全部设置为none)真的不知道如何解决它。