WSO2 Api Manager 3.0 Data Mapper does not work - wso2

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:?]

Related

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.

Error occurred while getting the APIs

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.

WSO2 API Manager 1.4.0 Management Console

I downloaded and installed the WSO2 API Manager version 1.4.0 yesterday and I cannot login to the web management console (https://localhost:9443/carbon) using the default credentials (i.e. admin/admin)
I can login to the API store and API publisher and the error comes only for the management console.
Note that I performed the default install (unzip and ran ./wso2server.sh from the bin folder)
Following is part of the error stacktrace
2013-06-03 15:42:13,095] INFO - CarbonAuthenticationUtil 'admin#carbon.super [-1234]' logged in at [2013-06-03 15:42:13,095+1000]
[2013-06-03 15:42:13,112] ERROR - AuthenticationHandler System error : 0 active authenticators registered in the system. The system should have at least 1 active authenticator service registered.
java.lang.RuntimeException: System error : 0 active authenticators registered in the system. The system should have at least 1 active authenticator service registered.
at org.wso2.carbon.server.admin.module.handler.AuthenticationHandler.isAuthenticated(AuthenticationHandler.java:144)
at org.wso2.carbon.server.admin.module.handler.AuthenticationHandler.authenticate(AuthenticationHandler.java:83)
Further down the stacktrace, I also get the below
[2013-06-04 11:42:15,860] ERROR - AxisEngine Authentication failure
org.apache.axis2.AxisFault: Authentication failure
at org.wso2.carbon.server.admin.module.handler.AuthenticationHandler.authenticate(AuthenticationHandler.java:110)
at org.wso2.carbon.server.admin.module.handler.AuthenticationHandler.invoke(AuthenticationHandler.java:55)
at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
I also get the following two warning messages on startup
[2013-06-04 11:14:05,489] WARN - ValidationResultPrinter Swap Memory size (MB): 64 of the system is below the recommended minimum size :2048
[2013-06-04 11:14:15,444] WARN - LandingPageWebappDeployer Product landing page not found.
#nuwandias Hi Nuwan.
I identified the issue. When I was evaluating the previous 1.3.1 version, I injected the Authorization header with the Bearer token via my Firefox browser plugin.
That was what caused the problem with the 1.4.0 version. Once I disable it it works fine.
All good now and I am looking forward to doing a deep dive evaluation of this product.
Thanks a lot for your support.
I have just downloaded the zip from the website and tried the same and it worked fine. Can you please provide the following information.
What is the environment that you are trying this on (OS)?
What is the md5sum value of the zip archive? Mine is fea68eaadd17daa5e6fa0aff3d973601.
Do you see any errors/warnings on startup? If so, could you share the startup logs too?
Thanks,
Nuwan.
Looking at this log message...
Swap Memory size (MB): 64 of the system is below the recommended minimum size :2048
It seems like your hard drive (or partition) has filled up. I'm wondering whether this could have caused any errors when you unzipped the zip file (if the hard disk has no free space).
If this is the case, can you free up some space (>200MB) in your partition, unzip the archive again and retry?

WSO2 API Key Manager

I am configuring our API Manager, but running into troubles authenticating via OAuth, seems to be an issue with the API Key Manager. I haven't dug into it yet, but does this come with the API Manager (as I have assumed) or is this a separate installation?
I had the same issue when using the wso2 api manager on a Amazon hosted machine, turn out that Thrift was not working correctly because some problem with multicasting and broadcasting.
What I did to get it working was to switch from ThriftClient to WSClient. If you have a huge amount of requests coming in then Thrift is the recommended solution from wso2 but in any "normal" case you will not have any differences between thrift and WS.
Here is how you switch:
Shut down the API Manager
Open up <api manager install dir>\repository\conf\api-manager.xml
Find ThriftClient
Change this to
<KeyValidatorClientType>WSClient</KeyValidatorClientType>
Start the API Manager
You may get some Warnings while starting up but, try it before you jump to the conclusion that it doesn't work.
Hope it helps!
you can use APIM manager product in a distributed setup as keymanger,gateway,store,publisher..but all functionality come in a single distribution.. ..
Go through the documentation for further guides
I was facing the same issue. Everything started when I created my own jks in order to use SSL without a self-signed certificate. I successfully created the jks and changed it in the carbon file. When I started the server, everything seemed ok; but when I used SOAPUI to test an API call, I got this (in the logs of the api manager):
APIAuthenticationHandler API authentication failure due to Unclassified Authentication Failure
I started digging what was the problem by enabling Debug level in the log4j.properties file, and then tried again a tested with SOAPUI and I got:
APISecurityException: Could not connect to <my api ip address> on port 10397
Then, I read the comment of OneMuppet and I checked that file and I found that the Thrift config has a host option, so I uncommented it:
<KeyValidatorClientType>ThriftClient</KeyValidatorClientType>
<ThriftClientPort>10397</ThriftClientPort>
<ThriftClientConnectionTimeOut>10000</ThriftClientConnectionTimeOut>
<ThriftServerPort>10397</ThriftServerPort>
This Line --> <ThriftServerHost>localhost</ThriftServerHost>
<EnableThriftServer>true</EnableThriftServer>
Save, restarted the server and everything start working correctly.
I got the same below issue after my installation, when i try to invoke the api service it is throwing below error:
900900 Unclassified Authentication Failure Error while accessing backend services for API key validation
After some random checks i have seen the axis2.xml file in /repository/conf/axis2 there it is refering a differnt ip's instead. I change these ip's to my local ip and restarted. The issue is resolved now.
I was facing the same issue. when I was trying to setup API Manager as an API Gateway in a different machine as per the steps given here,
https://docs.wso2.com/display/AM250/Publish+through+Multiple+API+Gateways
Once the setup is done and when I am trying to use this gateway URL, I was getting the below response,
{"fault":{"code":900900,"message":"Unclassified Authentication Failure","description":"Error while accessing backend services for API key validation"}}
After changing the KeyValidatorClientType value to WSClient from ThriftClient on the <api manager install dir>\repository\conf\api-manager.xml
It started working fine. And I was able to get the expected response.
If you changed the admin password, then you also have to update the repository/conf/api-manager.xml file with the new password. The 2 places I have changed (so far) are:
<AuthManager>
and
<APIKeyManager>
but there are other admin usernames in that file. No doubt, I'll get to them....

Sharing Registry and Config Spaces across ESB cluster

Having linked an instance of ESB v4.6.0 to a G-Reg v4.5.3 as per
http://docs.wso2.org/wiki/display/ESB460/Remote+Registry+Instance+Configuration#RemoteRegistryInstanceConfiguration-Atom-BasedRemoteInstanceConfiguration
When the ESB starts it throws several errors like:
[Framework Event Dispatcher] ERROR AbstractTransportService Error while checking the transport availability
java.lang.NullPointerException
Despite that, I can browse the Registry in both ends but when I create a BAM Profile in ESB while it's successfully saved in the Registry, the ESB starts to fail with:
[http-nio-9443-exec-37] ERROR RPCMessageReceiver Exception occurred while trying to invoke service method getResourceString
java.lang.reflect.InvocationTargetException
and the BAM Profile can't be read in the ESB end neither through the Registry Browser (empty resource) nor the BAM Profile management page (Exceptions). But can be read in the Governance Registry browser.
I set the permissions wide open when I create the shared collection, and the artifacts can be read, write, etc. by everyone.
I can't find information about what can be wrong with the connection, to allow to browse and write, but prevents ESB to read.
Any help would be much appreciated.
I'll respond my own question, to help out somebody else facing the same issue.
Atom-based registry sharing is deprecated "de-facto" in newer versions of WSO2.
Use JDBC-based registry sharing from now on.
Regards
i don't think its deprecated, im pretty sure its a bug, present in 4.5.1/2/3
wso2esb wso2 governance registry