Error occurred while getting the APIs - wso2

I locally installed WSO2 API manager and create API but API list is not coming at WSO2 dashboard . It displaying an error i.e
[2015-11-03 18:47:29,781] ERROR - AsyncDataPublisher Reconnection failed for for tcp://localhost:7614"
index:jag org.wso2.carbon.apimgt.api.APIManagementException: Error occurred while getting the APIs
Version of API manager is 1.9.1
I can't get any API statistics

This issue can be occurred when you have not configured information according to the Port Offset value. As an example if the port offset value of BAM instance is 3,need to configure as follows in property in the api-manager.xml which is in /repository/conf/ folder.
<ThriftPort>7614</ThriftPort>
<BAMServerURL>{tcp://<IP Address>:7614/}</BAMServerURL>
Also make sure to restart both servers.

Related

WSO2 APIM with IS as KM - Jaggery Service Error

We are working on delivering a deployment of two WSO2 components - API Manager 3.0.0 and Identity Server 5.9.0 (which acts as Key Manager for APIM). For last few weeks everything worked fairly ok until today (or max few days ago) - suddenly we are getting following error when we try to log in to APIM Publisher:
ERROR {Jaggery service for token introspection} - {"data" : null, "xhr" : {}}
At same time publisher just keeps redirecting somewhere with an error message in the the browser logs:
Something went wrong while introspecting the token!!
Both components run on same virtual machine with offset for IS-as-KM set to 2. Datasources are OracleDB with full range of permissions for sake of testing.
Entire thing is handled using FQDN with wildcard certificate added to keystore.
Any idea about what this could be related to?

WSO2 Api Manager 3.0 Data Mapper does not work

I have installed wso2 Api Manager 3.0 on my windows by downloading the binaries.
I wonder if the datamapper does work in the v3.0 of the Api Manager.
it does not work in my case.
I am using OOTB sequences, but unfortunately unable to actually save it:
The logs are saying that the XML sequence are not found for the datamapper, regarding the apache-synapse configuration.
Steps to reproduce the issue:
1.)Downlaod AM3.0 Binaries and install in windows machine
2.)Open publisher and create a dummy api and in request mediator select the json_to_xml or any ootb sequences. and click on save button.
SAME FLOW WORK PERFECTLY FINE IN 2.6
Please find the errror log file attached.
Please find the server logs:
org.wso2.carbon.apimgt.api.APIManagementException: Issue is in accessing the Registry[2019-11-18 17:41:43,883] ERROR - APIUtil Issue is in accessing the Registry
[2019-11-18 17:41:43,900] ERROR - APIMappingUtil Error occurred while getting the uuid of the mediation sequence
org.wso2.carbon.apimgt.api.APIManagementException: Issue is in accessing the Registry
at org.wso2.carbon.apimgt.impl.utils.APIUtil.getMediationPolicyAttributes_aroundBody322(APIUtil.java:5438) ~[org.wso2.carbon.apimgt.impl_6.5.349.jar:?]
at org.wso2.carbon.apimgt.impl.utils.APIUtil.getMediationPolicyAttributes(APIUtil.java:5373) ~[org.wso2.carbon.apimgt.impl_6.5.349.jar:?]
at
Caused by: org.wso2.carbon.registry.core.exceptions.ResourceNotFoundException: Resource does not exist at path /_system/governance/apimgt/customsequences\in
at org.wso2.carbon.registry.core.jdbc.handlers.builtin.MountHandler.get(MountHandler.java:449) ~[org.wso2.carbon.registry.core_4.5.1.jar:?]
at org.wso2.carbon.registry.core.jdbc.handlers.HandlerManager.get(HandlerManager.java:2446) ~[org.wso2.carbon.registry.core_4.5.1.jar:?]

Configuring both WSO2 IS and ESB in Linux box and facing errors while starting IS server

Here is a snippet of the exception:
Caused by: org.wso2.carbon.user.core.UserStoreException: Database Error - Database may be already in use: "Locked by another process".
I am trying an example given in this url:
https://docs.wso2.com/display/IS500/2-legged+OAuth+for+Securing+a+RESTful+Service
steps:
copied both wso2 esb and wso2 is to linux box
started wso2 esb using ./wso2Server.sh --start. can access the management console.
trying to start wso2 is using ./wso2server.sh from IS_HOME/bin..And received this error.
Note: Still I can bring up the IS management console.

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.
SSL issues have been fixed, but now I am getting error while re-generating access token
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.
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. Those are Authorize API, Login API, Token API and 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"
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; 2) Inside api-manager.xml:
Change the following:
https://${carbon.local.ip}:${mgt.transport.https.port}${carbon.context}/services/
to:
https://[FQDN_OF_HOST}:${mgt.transport.https.port}${carbon.context}/services/
Reason is my server certificate only recorded the domain name, not ip address.
My setup: Product: WSO2 AM 1.10.0 DB: MSSQL Security: SAML2 integrated with PingIdentity OS: 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."
The error may be due to one of these two things:
Your admin password is not set for ApiKeyManager in api_manager.xml.
SSL is not set properly.

Getting error when running WSO2 API Manager with WSO2 BAM Server

I got the following error when runnning WSO2 API Manager 1.3.1 to use the WSO2 BAM Server 2.0.1.
TID: [0] [AM] [2013-05-02 18:58:40,609] ERROR
{org.wso2.carbon.apimgt.usage.publisher.APIMgtUsageDataBridgeDataPublisher}
- Error initializing APIMgtUsageDataBridgeDataPublisher {org.wso2.carbon.apimgt.usage.publisher.APIMgtUsageDataBridgeDataPublisher}
org.wso2.carbon.databridge.agent.thrift.exception.AgentException:
Error when finding event stream definition for :
org.wso2.apimgt.statistics.request 1.0.0
Both API Manager and BAM are running on the same machine and I changed offset to 1 in /home/jtao/api/wso2bam-2.0.1/repository/conf/carbon.xml based on Monetization of API Usage.
I also checked that BAM_HOME/repository/conf/etc/cassandra-component.xml doesn't exist in BAM 2.0.1. as someone suggested in the answer of another question "Configuring WSO2 API Manager to use the WSO2 BAM Server"
Any ideas?
I ran the same scenario described in guide and it works without any error. May be your have missed a part in the configuration guide? Make sure BAM_HOME is set correctly and BAM server is started before the AM server.
The following guide too can be used to integrate AM 1.3.1 with BAM 2.0.1
http://docs.wso2.org/wiki/display/AM131/Monitoring+and+Statistics
Ishara