简体   繁体   English

WSO2API Manager:Api存储错误:获取新的访问令牌时出错

[英]WSO2API Manager : Api Store Error: Error in getting new access token

I have updated WSO2 default SLL with the custom SSL certificate on my Production Server on which WSO2Api installed. 我已在安装了WSO2Api的生产服务器上使用自定义SSL证书更新了WSO2默认SLL。

SSL issues have been fixed, but now I am getting error while re-generating access token SSL问题已修复,但现在重新生成访问令牌时出现错误

在此处输入图片说明

Logs 日志

Caused by: org.wso2.carbon.apimgt.keymgt.APIKeyMgtException: Error in getting new accessToken
at org.wso2.carbon.apimgt.keymgt.service.APIKeyMgtSubscriberService.renewAccessToken(APIKeyMgtSubscriberService.java:281)
... 45 more
Caused by: java.lang.RuntimeException: Failed : HTTP error code : 500
at org.wso2.carbon.apimgt.keymgt.service.APIKeyMgtSubscriberService.renewAccessToken(APIKeyMgtSubscriberService.java:252)
... 45 more
 TID: [0] [AM] [2014-08-27 10:57:41,440] ERROR {org.wso2.carbon.apimgt.hostobjects.APIStoreHostObject} -  Error in getting new      accessToken {org.wso2.carbon.apimgt.hostobjects.APIStoreHostObject}

If APIManager runs with a port offset,you need to do addtional changes. 如果APIManager以端口偏移量运行,则需要进行其他更改。

Change the endpoint ports defined in default APIs shipped with APIManager Find all default APIs of the API Manager in /repository/deployment/server/synapse-configs/default/api folder. 更改在APIManager随附的默认API中定义的端点端口。在/ repository / deployment / server / synapse-configs / default / api文件夹中找到API Manager的所有默认API。 Those are Authorize API, Login API, Token API and Revoke API. 这些是Authorize API,Login API,Token API和Revoke API。 Open each of them and change the address endpoint config included port value to match with offset value.The default address endpoint config is "address uri="https://192.168.1.7:9443/oauth2/token".If the AM standalone pack running with port offset 2 change that config as address uri="https://192.168.1.7:9445/oauth2/token" 打开它们中的每一个并更改地址端点配置包含的端口值以与偏移值匹配。默认地址端点配置为“ address uri =“ https://192.168.1.7:9443/oauth2/token”。如果是AM独立包装使用端口偏移2运行,将配置更改为地址uri =“ https://192.168.1.7:9445/oauth2/token”

What I did to fix the issue was to 1) add admin user inside ApiKeyValidaor in api-manager.xml also into admin user via management console and into user-mgt.xml; 我要解决的问题是:1)在api-manager.xml中的ApiKeyValidaor中添加管理员用户,同时通过管理控制台将其添加到admin用户中,并添加到user-mgt.xml中; 2) Inside api-manager.xml: 2)在api-manager.xml中:

Change the following: 更改以下内容:

https://${carbon.local.ip}:${mgt.transport.https.port}${carbon.context}/services/ https://开头$ {} carbon.local.ip:$ {mgt.transport.https.port} $ {} carbon.context /服务/

to: https://[FQDN_OF_HOST }:${mgt.transport.https.port}${carbon.context}/services/ 到: https:// [FQDN_OF_HOST }:$ {mgt.transport.https.port} $ {carbon.context} / services /

Reason is my server certificate only recorded the domain name, not ip address. 原因是我的服务器证书仅记录了域名,而不是IP地址。

My setup: Product: WSO2 AM 1.10.0 DB: MSSQL Security: SAML2 integrated with PingIdentity OS: Linux 我的设置:产品:WSO2 AM 1.10.0数据库:MSSQL安全性:与PingIdentity集成的SAML2操作系统:Linux

Please also refer to this question: wso2 am 1.10.0 API Store: "Error occurred while executing the action generateApplicationKey" with " Invalid credentials provided." 请同时参考以下问题: wso2 am 1.10.0 API存储:带有“提供的无效凭据”的“执行操作generateApplicationKey时发生错误”。

The error may be due to one of these two things: 该错误可能是由于以下两个原因之一:

  1. Your admin password is not set for ApiKeyManager in api_manager.xml . 未在api_manager.xml中ApiKeyManager设置您的管理员密码。
  2. SSL is not set properly. SSL设置不正确。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 没有找到WSO2API经理的范围 - no scope found WSO2API manager 如何使用 ReadWriteLDAPUserStore 允许从 wso2is 到 wso2api 管理器的访问权限 - How to allow access permission from wso2is to wso2api manager using ReadWriteLDAPUserStore wso2Api Manager调用带有消息请求和响应的其余后端 - wso2Api Manager Call Rest Backend with Soap Request and Response WSO2 API Manager Store - 访问令牌密钥生成失败 - WSO2 API Manager Store - Access token key generation failure 如何使用 WSO2API 管理器从 API 中的 WSO2IS 访问 XACML 策略(如何使用 WSO2APIM 创建 API 以访问 XACML 策略) - How to access XACML policy from WSO2IS in API using WSO2API manager(How to create APIs using WSO2APIM to access XACML policy) 通过wso2api管理器调用wso2greg Artifcat Rest API无法正常工作 - 任何想法都可以修复 - Invoking wso2greg Artifcat Rest API via wso2api manager is not working - any ideas to fix 在WSO2API 1.7中作为API进行应用 - Application as an API in WSO2API 1.7 在wso2 API Manager上的商店中运行应用程序时出错 - Error while run the application in store on wso2 API Manager WSO2 API Manager Store 搜索应用程序时出错 - WSO2 API Manager Store error when searching for an application 无法在 wso2 API 管理器存储中创建访问令牌授予类型以测试 API - Unable to create Access token grant type in wso2 API manager store to test API
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM