Posts

WSO2 API Manager 3.0.0 Active-Active HA | Mount Server directory to NFS/Shared Folder

Image
I am writing this post with respect to the problem I was struggling with APIM Active-Active HA setup in a production environment.  Environment:  WSO2 APIM 3.0.0, Ubuntu 18.04, AWS, EFS for shared storage, 2 node HA setup Problem Statement Referring to WSO2 APIM 3.0.0 documentation ( https://apim.docs.wso2.com/en/3.0.0/install-and-setup/deploying-wso2-api-manager/single-node/configuring-an-active-active-deployment/ ) I have started setting up my all in one Active-Active HA deployment. However, I stuck to a situation where I need to perform the following for artifact synchronization- "You need to mount the <API-M_HOME>/repository/deployment/server directory of the two nodes to the shared file system, in order to share all APIs and throttling policies between all the nodes"  https://apim.docs.wso2.com/en/3.0.0/install-and-setup/deploying-wso2-api-manager/single-node/configuring-an-active-active-deployment/#step-5-configure-the-artifact-synchronization Now I was not sure ho

WSO2 APIM 3.0.0 API subscription via application issue | Bug

Image
Hi Everyone, I am writing this post regarding one of the strange issues I was facing with WSO2 API Manager 3.0.0. Below is the summary and workaround I did to overcome the same. Problem Statement I have registered 55+ APIs through publisher portal and created one application per API i.e. total 55 Applications. I have created a new application and was trying to subscribe to one of the existing APIs but unfortunately, that API wasn't available in the subscription list. However, the same was visible with published status in publisher portal and devportal as well but during the subscription via the application, it wasn't available. I can see only 24 APIs in the list where I can subscribe them via Application. Rest of APIs wasn't visible so I wasn't able to subscribe them for the new application. Observation As per initial observation, I have checked the developer console to see the API being called to get the number of APIs in the dropdown list. It was 23 this time- I have

Useful queries for mongo DB

Image
Useful Mongo DB Queries ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== Mongo DB Script to update epoch timestamp to date time db.getCollection('transaction').find(           {'transactionTime': {$type: 2}}).forEach(function(doc) {                        doc.transactionTime=new Date(parseInt(doc.transactionTime));              db.getCollection('transaction').save(doc);            }) ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== Mongo Query to get total records (Using aggregate functions) db.getCollection('transaction').aggregate( [   {     $group: {        _id: null,        count: { $sum: 1 }     }   } ]) ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== Mongo Query to get records using filter & sort db.getCollection('transaction').aggregate( [   {       $match : {transactionType:"TYPE_A",activity:"DEBIT", transactionTime: {         $gte: ISODate("2020-03-01T00:00:00.

WSO2 APIM 3.0.0- endpoint connection timeout solution

Image
Hello everyone, in this post I'll share some of the important configurations of WSO2 API Manager for backend API connection.  Problem Recently I faced a strange issue of connection timeout of my backend API endpoint i.e. due to performance issue of my backend API, WSO2 API manager failed to get a response from my backend API and faulted with 'Connection Timeout' error. Below is the response that my API manager sent when such an issue arises- Http Code: 500 Response:  <am:fault xmlns:am=\"http://wso2.org/apimanager\">                   <am:code> 101504 </am:code>      <am:type>Status report</am:type>      <am:message>Runtime Error</am:message>      <am:description> Send timeout </am:description> </am:fault> Cause Backend API did not respond within the stipulated time frame due to the performance issue of the backend system or network. The default timeout of any API is 300ms (millisec

Oracle SOA Suite 12c - Export a composite from Enterprise Manager

Image
Hello everyone, in this blog tutorial we'll see how to export an existing SOA composite from enterprise manager and then after will import the same in JDeveloper.  The scenario is, the composite has been accidentally deleted from developer machine post-deployment on SOA Server. So let's see the steps we can use to recover/ get a composite from enterprise manager. Step1- Login to enterprise manager as http://host:port/em and navigate to SOA folder from left navigation menu & Click on anyone soa server... say soa_server1 or soa_server2 as shown below- Step2- Click on 'Deployed Composites' tab as shown below-  Step3- Locate the composite (even specific version you want) and click on the same as shown below- Step4- Go to the top section of the composite and expand the menu. The 'Export' option is visible than after as shown below- Step5- Click on the 'Export' option and select the appropriate options for downloading the composite. And finally, click on t

Oracle Cloud Infrastructure- Create VCN + Compute Ubuntu Linux 18.04

Image
In this post, I'll demonstrate how to create a new VCN (Virtual Cloud Network) with Internet Gateway+ NAT Gateway + Service Gateway followed by the creation of a new compute instance with Ubuntu 18.04. Environment In order to create a new compute instance in oracle cloud, there are few prerequisites- A valid OCI account A virtual Cloud network Optional SSH keys in case you want your own keys to be used Below is the network diagram of the virtual cloud network with the schematic wizard provided by OCI for quick setup of a VCN- Steps to achieve So, let's login to your OCI console and navigate to Networking >> Overview from the left navigation panel. From the right-side panel, click on start VCN wizard as shown below- This will open a web form to provide basic details like- VCN name and rest of the things are provided as default as shown below- Further, click on next and the Create. Once created, the VCN details look as shown below. So, this way our VCN is ready. We should n

Oracle Cloud Infrastructure- Changing root partition of Oracle Linux instance 7.8

Image
In this post, I'll describe a problem in OCI with respect to storage extension and possible solution with stepwise implementation process. Scenario I have provisioned a new compute instance with a default setting including the boot volume size of OCI i.e.  46.6 GB. The partition available to root ( / ) became ~39 GB post OS installation.  Requirement A requirement came where I need at least 100GB in my root ( / ) so the installation of that necessary production should go under respective directories viz. /opt or /u01 etc.  Approach I have figured out two approaches- Increase the boot volume size to a higher value and use Linux growpart to increase the size for root ( / ). Attach a new block volume with required capacity and mount it to required location viz   /opt or /u01 etc.  Solution This article considers the first approach. For the second approach, check out my this post  with necessary steps as a subpart of

Oracle Cloud Infrastructure- Adding a block volume and use it for swap

Image
Hello everyone, this is my first blog on Oracle Cloud Infrastructure. Requirement To increase Swap of existing compute instance with a new block volume in OCI. Prerequisite A valid OCI account with available credits Steps to Achieve 1. Create a new block volume 550GB 2. Attach the block volume to the instance 3. Execute iscsi commands and verify the disk attachment provided by OCI ls -l /dev/orcleoci/ 4. Do partitioning of the disk to 120GB for swap      Making the swap partition of required space 120GB fdisk <NEWLY_ADDED_DISK>      Command (m for help): n      Partition number (1-4): 2      Command (m for help): t      Hex code (type L to list codes): 82      Command (m for help): w      ls -l /dev/orcleoci/ 5. Executing necessary commands to check the space and mount the new swap- Check disks      lsblk Make Swap      mkswap -L sasswap2 /dev/<DISK_PARTITION_ID> Check Free Memory      free -m Update fstab for permanemt changes Do UUID entry in fstab Mount it      swa