[英]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: 该错误可能是由于以下两个原因之一:
ApiKeyManager
in api_manager.xml . 未在api_manager.xml中为ApiKeyManager
设置您的管理员密码。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.