Unable to view statics in the WSO2 API Manager Publisher? - wso2

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

Related

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

Publishing WSO2 api statisticcs

I'm following below links for publishing WSO2 statistics. But i'm getting "405 method not allowed" when i login to https://localhost:9443/admin-dashboard. So i'm unable to enable the statistics.
I'm using ws02 API 2.0 and ws02API analytics 2.0.
Could anyone help me on this.
Thanks,
Santosh
#santosh.a
I assume you have configured apim_wso2metrics_db datasource as common database for wso2am and wso2am-analytics. Next,Follow documentation to configure wso2am-analytics with wso2am-api-manager. Configuring APIM Analytics. Most important Step 2: Edit <APIM_HOME>/repository/conf/api-manager.xml and enable analytics and check the DASServerURL and DASRestApiURL, make sure it is pointing to analytics server IP.
Once configuration is enabled. you will be able to see analytics on API Store and API Publisher under statistics sections. You can also go to dashboard by https://<wso2am-analytics>/portal

WSO2 API Manager : API Creation Issue

I installed the APIM and started the APIM and created a new API. The ApI which i created comprises of a URL which points at our company production server. I gave the URL in the api creation mode to the production endpoint and sandbox Endpoint boxes. Then i set the required parameters under the GET method. Then i try it out at the store but the request does not hit the production server. I want to see the URL output from your api manager which passes to our production server. Because i want to see what is whether there is an error on that as it it doesnot hit our production server.
Can you help me with the issue?
Thanks in advance.
You can enable wire log to see the what are the requests which came to APIM and what are the requests APIM made for backend. Follow the steps in How to get wire logs from WSO2 ESB blog post to enable wire log. Those instructions are given for ESB, but they are valid for APIM as well.

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

WSO2 API Manager and WSO2 Governance registry integration

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.