WSO2 API Manager and WSO2 Governance registry integration - wso2

Following
http://docs.wso2.org/wiki/display/ESB460/Config+and+Governance+Partitions+in+Separate+Nodes
i tried to integrated WSO2 API manager with Governance registry.
I am running both of them with different offsets.
After login to API Manager Mgtm Console i get errors while accessing different links 'OAuth' 'Service Bus - APIs' etc.
Error occurred while reading OAuth application data
The following error details are available. Please refer logs for more details.
org.apache.axis2.AxisFault: Failed to get server context
Error while loading authorized applications
error
The following error details are available. Please refer logs for more details.
org.apache.axis2.AxisFault: The service cannot be found for the endpoint reference (EPR) local://services/FlowsAdminService

Seems some thing missing in document.
I was able to resolve this issue by updating the domain thing based on the product and did not kept it wso2.carbon.domain as is by default. For e.g
<parameter name="domain">wso2.esb.domain</parameter>
this solved my problem and i am running all WSO2 products this way.

Related

WSO2 API Manager can't call a registered external API. It could be related to a proxy configuration problem?

I am facing the following problem with an installation of WSO2 API Manager.
I register two APIs: the first one is the PizzaShack example API provided with the product that run on the same machine. It works fine.
The second one is an external API that I have registered using the publisher tool. The problem is that when I try to call this external API using the store I obtain the following error message as response:
<am:fault xmlns:am="http://wso2.org/apimanager">
<am:code>101500</am:code>
<am:type>Status report</am:type>
<am:message>Runtime Error</am:message>
<am:description>Error in Sender</am:description>
</am:fault>
I suppose (but I am absolutly not sure of this) that the problem could be related to the following situation: the machine on which WSO2 API Manager is installed use a proxy to be exposed on the Internet. So I think that this proxy have also to be set on WSO2 API Manager in some way.
Is it my reasoning correct or am I missing something? It could be the cause of my problem?

WSO2: How to integrate APIM and IS in wso2

I am currently evaluating WSO2 IS for authentication for APIM. Basically, the APIM login, authentication and token generation should happen through WSO2 IS.
I have read through many documentation which are present in wso2 sites but could not getting through it.
I am using IS as version 5.7.0 and APIM as version 2.5.0
If some one could help me in getting the proper documentation link which has step by steps process, it could be of great support.
However, I have gone through the below links
Here's [link1] (https://docs.wso2.com/display/CLUSTER44x/Configuring+the+Identity+Server+5.2.0+as+a+Key+Manager+with+API+Manager+2.0.0#)
and
Here's [link2] https://docs.wso2.com/display/CLUSTER420/Configuring+the+Identity+Server+5.0.0+with+API+Manager+1.9.1
As updated earlier, now I have integrated IS with IAM but when I am trying to fetch the application subscription token from store, I am getting below error
ERROR - AbstractKeyManager Can not retrieve OAuth application for the given consumer key : xxxxxxxxxxxxxxxxxxxx
org.apache.axis2.AxisFault: The service cannot be found for the endpoint reference (EPR) https://localhost:9445/services/APIKeyMgtSubscriberService
at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:531)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:381)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:456)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:227)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
Can someone please check and let me know how this can be avoided. Do i have to update the Hostname anywhere?
Thanks
Refer this doc - https://docs.wso2.com/display/AM250/Configuring+WSO2+Identity+Server+as+a+Key+Manager. It contains the steps to configure IS as Key manager for APIM

wso2 api manager clustering

I am trying to set up a cluster for WSO2 api manager and I am following https://docs.wso2.com/display/CLUSTER44x/Clustering+API+Manager+1.10.0
I am using seperate VMs for each of the component and currently in my setup I am able to
Publish an api using the publisher which gets published in the Gateway (Visible in the log)
Subscribe to this API from the store and generate keys
However when I am trying to access this api using the generated key I get the following response
<soapenv:Fault xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<faultcode xmlns:axis2ns2="http://schemas.xmlsoap.org/soap/envelope/">axis2ns2:Client</faultcode>
<faultstring>Authentication Failure</faultstring>
<detail>Error while accessing backend services for API key validation</detail>
</soapenv:Fault>
In the gateway logs I can see only the below line. There is no further details in the logs
TID: [-1234] [] [2016-02-02 16:55:58,288] WARN {org.wso2.carbon.apimgt.gateway.handlers.security.APIAuthenticat
ionHandler} - API authentication failure due to Unclassified Authentication Failure {org.wso2.carbon.apimgt.gat
eway.handlers.security.APIAuthenticationHandler}
Please help me to resolve this issue.
That sounds like an issue with your API - API Manager doesn't actually "authenticate anything" unless you are using identity server see here for the difference between authentication and authorization (what WSO2 does through Oauth). Please try an API that is know to work such as http://petstore.swagger.io/ and report back the error.
This can happen due to many reason. Please check some of the reasons below
Key Manager's public certificate isn'y properly imported in the <GATEWAY_HOME>/repository/resources/security/client-truststore.jks
Open the api-manager.xml fie of the gateway and key manager nodes and change the <KeyValidatorClientType> to WSClient as bellow (default value is ThriftClient).
<KeyValidatorClientType>WSClient</KeyValidatorClientType>
The reason for this could be a result of misconfiguration between nodes. First you can double check the configurations (specially keyvalidator related configurations)
If you could not find any issue there, then you can enable debug logs and get some idea about the issue
add following entires in repository/conf/log4j.properties in gateway node
log4j.logger.org.wso2.carbon.apimgt.gateway.handlers.security=DEBUG
add following entires in repository/conf/log4j.properties in key manager node
log4j.logger.org.wso2.carbon.apimgt.keymgt=DEBUG
You might be able to find the issue by analyzing the logs

Error while publishing an API in the WSO2 API Manager

When I publish an API in the WSO2 API Manager, the following error occurs:
Gateway Failures
Failed to Publish Environments
Production and Sandbox
Error while obtaining API information from gateway. Error while obtaining API information from gateway. Authentication failure
This could be due to an authentication failure. Please check whether username/password within <Environments> content element of root <APIGateway> element in api-manager.xml (<APIM_HOME>/repository/conf/api-manager.xml) is correct
I've had this issue.
When checking the logs I saw this:
URL context: /hrs/admihrsd/osb/documentWS/2.0.0 is already registered with the API: novakgo--hrs-admihrsd-osb-document-service:v2.0.0
The issue was someone was trying to publish a new API with the same context as another one. They should change the context and publish again, and the error is fixed. Context have to be unique.

Unable to view statics in the WSO2 API Manager Publisher?

I'm setting up WSO2 API Manager & WSO2 BAM. I folloed each and every step given in the below article.
http://umeshagunasinghe.blogspot.com/2013/11/how-to-configure-wso2-api-manager-to.html
I see below error in the terminal when I try to access the statistics page.
[2015-02-06 14:15:29,405] ERROR - usage:jag java.lang.NullPointerException: null
Below is the page I get.
I checked below questions as well. but didn't work out for me.
Why am I unable to view stats in the WSO2 API Manager Store?
Configuring WSO2 API Manager to use the WSO2 BAM Server
How can I fix this?
You see this error because there are no data to be shown. Please invoke APIs and try this page.
Please read the comments for more info