tag:blogger.com,1999:blog-64552720254694329632024-03-20T19:23:59.900-07:00Manee's Tech SpaceManeesha Wijesekarahttp://www.blogger.com/profile/04283147149772113205noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-6455272025469432963.post-77348837435530610132017-08-30T02:33:00.000-07:002017-08-30T04:52:25.683-07:00Install API Manager 2.0.0 features in DAS 3.1.0 Minimum HA Cluster<span style="font-size: large;"><b>Introduction</b></span><br />
<br />
<span style="font-size: 12.5pt;"><span style="font-size: 12.5pt;">Following are the steps to carry on in order to install API Manager Analytics features in minimum High Availability Data Analytics Server. Here we have used <b><span style="color: #274e13;">Oracle 11g</span></b> as the RDBMS to create databases.</span><br />
<br /><span style="color: purple; font-size: large;"><b>
Steps to DAS Clustering,</b></span><br />
<br /><span style="font-size: 12.5pt;">During this blog post, I will explain how DAS server will be clustered with minimum HA deployment model.</span></span><br />
<span style="font-size: 12.5pt;"><span style="font-size: 12.5pt;"><br /></span></span>
<span style="font-size: 12.5pt;"><span style="font-size: 12.5pt;">1. Download Data Analytics Server 3.1.0 from <a href="http://wso2.com/analytics#download" target="_blank">here</a>.</span></span><br />
<span style="font-size: 12.5pt;"><span style="font-size: 12.5pt;"><br /></span></span>
<span style="font-size: 12.5pt;"><span style="font-size: 12.5pt;">2. Create users for following datasources in oracle 11g.</span><br />
</span><br />
<ul>
<li><span style="font-size: 12.5pt;">WSO2CarbonDB (user -> carbondb)</span></li>
<li><span style="font-size: 12.5pt;">WSO2REG_DB (user -> regdb)</span></li>
<li><span style="font-size: 12.5pt;">WSO2UM_DB (user -> userdb)</span></li>
<li><span style="font-size: 12.5pt;">WSO2_ANALYTICS_EVENT_STORE_DB (user -> eventstoredb)</span></li>
<li><span style="font-size: 12.5pt;">WSO2_ANALYTICS_PROCESSED_DATA_STORE_DB (user -> prosdatadb)</span></li>
<li><span style="font-size: 12.5pt;">WSO2_METRICS_DB (user -> metricsdb)</span></li>
<li><span style="font-size: 12.5pt;">WSO2ML_DB (user -> mldb)</span></li>
</ul>
<span style="font-size: 12.5pt;">
<br /><span style="font-size: 12.5pt;">
Note- Please add the <a href="http://download.oracle.com/otn/utilities_drivers/jdbc/121010/ojdbc7.jar" target="_blank">database driver</a> (ex-ojdbc7.jar) to <DAS_HOME>/repository/components/lib in both nodes</span><br />
<br /><span style="font-size: 12.5pt;">
3. Add User management datasource in <DAS_HOME>/repository/conf/datasources/master-datasources.xml</span><br />
</span><br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"><span style="font-size: 12.5pt;"> <span style="font-size: 9.5pt;"> <span style="color: #007700;"><datasource></span>
<span style="color: #007700;"><name></span>WSO2UM_DB<span style="color: #007700;"></name></span>
<span style="color: #007700;"><description></span>The datasource used for user manager<span style="color: #007700;"></description></span>
<span style="color: #007700;"><jndiConfig></span>
<span style="color: #007700;"><name></span>jdbc/WSO2UM_DB<span style="color: #007700;"></name></span>
<span style="color: #007700;"></jndiConfig></span>
<span style="color: #007700;"><definition</span> <span style="color: #0000cc;">type=</span><span style="background-color: #fff0f0;">"RDBMS"</span><span style="color: #007700;">></span>
<span style="color: #007700;"><configuration></span>
<span style="color: #007700;"><url></span>jdbc:oracle:thin:@10.100.15.22:1521/oracle11g<span style="color: #007700;"></url></span>
<span style="color: #007700;"><username></span>userdb<span style="color: #007700;"></username></span>
<span style="color: #007700;"><password></span>userdb<span style="color: #007700;"></password></span>
<span style="color: #007700;"><driverClassName></span>oracle.jdbc.driver.OracleDriver<span style="color: #007700;"></driverClassName></span>
<span style="color: #007700;"><maxActive></span>50<span style="color: #007700;"></maxActive></span>
<span style="color: #007700;"><maxWait></span>60000<span style="color: #007700;"></maxWait></span>
<span style="color: #007700;"><testOnBorrow></span>true<span style="color: #007700;"></testOnBorrow></span>
<span style="color: #007700;"><validationQuery></span>SELECT 1<span style="color: #007700;"></validationQuery></span>
<span style="color: #007700;"><defaultAutoCommit></span>false<span style="color: #007700;"></defaultAutoCommit></span>
<span style="color: #007700;"><validationInterval></span>30000<span style="color: #007700;"></validationInterval></span>
<span style="color: #007700;"></configuration></span>
<span style="color: #007700;"></definition></span>
<span style="color: #007700;"></datasource></span></span>
</span></pre>
</div>
<span style="font-size: 12.5pt;">
<br /><span style="font-size: 12.5pt;">
Note - oracle11g is the database where the users were created.</span><br /><br /><span style="font-size: 12.5pt;">
4. Add registry datasource in <DAS_HOME>/repository/conf/datasources/master-datasources.xml</span><br />
</span>
<span style="font-size: 12.5pt;"><span style="font-size: 12.5pt;"></span></span>
<br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"><span style="color: #007700;"><datasource></span><span style="font-size: 9.5pt;">
<span style="color: #007700;"><name></span>WSO2REG_DB<span style="color: #007700;"></name></span>
<span style="color: #007700;"><description></span>The datasource used by the registry<span style="color: #007700;"></description></span>
<span style="color: #007700;"><jndiConfig></span>
<span style="color: #007700;"><name></span>jdbc/WSO2REG_DB<span style="color: #007700;"></name></span>
<span style="color: #007700;"></jndiConfig></span>
<span style="color: #007700;"><definition</span> <span style="color: #0000cc;">type=</span><span style="background-color: #fff0f0;">"RDBMS"</span><span style="color: #007700;">></span>
<span style="color: #007700;"><configuration></span>
<span style="color: #007700;"><url></span>jdbc:oracle:thin:@10.100.15.22:1521/oracle11g<span style="color: #007700;"></url></span>
<span style="color: #007700;"><username></span>regdb<span style="color: #007700;"></username></span>
<span style="color: #007700;"><password></span>regdb<span style="color: #007700;"></password></span>
<span style="color: #007700;"><driverClassName></span>oracle.jdbc.driver.OracleDriver<span style="color: #007700;"></driverClassName></span>
<span style="color: #007700;"><maxActive></span>50<span style="color: #007700;"></maxActive></span>
<span style="color: #007700;"><maxWait></span>60000<span style="color: #007700;"></maxWait></span>
<span style="color: #007700;"><testOnBorrow></span>true<span style="color: #007700;"></testOnBorrow></span>
<span style="color: #007700;"><validationQuery></span>SELECT 1<span style="color: #007700;"></validationQuery></span>
<span style="color: #007700;"><defaultAutoCommit></span>false<span style="color: #007700;"></defaultAutoCommit></span>
<span style="color: #007700;"><validationInterval></span>30000<span style="color: #007700;"></validationInterval></span>
<span style="color: #007700;"></configuration></span>
<span style="color: #007700;"></definition></span>
<span style="color: #007700;"></datasource></span>
</span></pre>
</div>
<br />
<span style="font-size: 12.5pt;">
Note - oracle11g is the database where the users were created.</span><br />
<br />
<span style="font-size: 12.5pt;">
Change other datasources according to the created databases by changing url, username, password, driverClassName</span><br />
<br />
<span style="font-size: 12.5pt;">
5. Open the <DAS_HOME>/repository/conf/user-mgt.xml file and modify the dataSource property of the <configuration> element as follows</span><br />
<br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"><span style="color: #007700;"><configuration></span>
…
<span style="color: #007700;"><Property</span> <span style="color: #0000cc;">name=</span><span style="background-color: #fff0f0;">"dataSource"</span><span style="color: #007700;">></span>jdbc/WSO2UM_DB<span style="color: #007700;"></Property></span>
<span style="color: #007700;"></configuration></span>
</pre>
</div>
<br />
<span style="font-size: 12.5pt;">6. Add the dataSource attribute of the <dbConfig name="govregistry"> in <DAS_HOME>/repository/conf/registry.xml file. Make sure to keep the ‘wso2registry’ db config as it is.</span><br />
<br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"><span style="color: #007700;"><dbConfig</span> <span style="color: #0000cc;">name=</span><span style="background-color: #fff0f0;">"govregistry"</span><span style="color: #007700;">></span>
<span style="color: #007700;"><dataSource></span>jdbc/WSO2REG_DB<span style="color: #007700;"></dataSource></span>
<span style="color: #007700;"></dbConfig></span>
<span style="color: #007700;"><remoteInstance</span> <span style="color: #0000cc;">url=</span><span style="background-color: #fff0f0;">"https://localhost:9443/registry"</span><span style="color: #007700;">></span>
<span style="color: #007700;"><id></span>gov<span style="color: #007700;"></id></span>
<span style="color: #007700;"><cacheId></span>regdb@jdbc:oracle:thin:@10.100.15.22:1521/oracle11g<span style="color: #007700;"></cacheId></span>
<span style="color: #007700;"><dbConfig></span>govregistry<span style="color: #007700;"></dbConfig></span>
<span style="color: #007700;"><readOnly></span>false<span style="color: #007700;"></readOnly></span>
<span style="color: #007700;"><enableCache></span>true<span style="color: #007700;"></enableCache></span>
<span style="color: #007700;"><registryRoot></span>/<span style="color: #007700;"></registryRoot></span>
<span style="color: #007700;"></remoteInstance></span>
<span style="color: #007700;"><mount</span> <span style="color: #0000cc;">path=</span><span style="background-color: #fff0f0;">"/_system/governance"</span> <span style="color: #0000cc;">overwrite=</span><span style="background-color: #fff0f0;">"true"</span><span style="color: #007700;">></span>
<span style="color: #007700;"><instanceId></span>gov<span style="color: #007700;"></instanceId></span>
<span style="color: #007700;"><targetPath></span>/_system/governance<span style="color: #007700;"></targetPath></span>
<span style="color: #007700;"></mount></span>
<span style="color: #007700;"><mount</span> <span style="color: #0000cc;">path=</span><span style="background-color: #fff0f0;">"/_system/config"</span> <span style="color: #0000cc;">overwrite=</span><span style="background-color: #fff0f0;">"true"</span><span style="color: #007700;">></span>
<span style="color: #007700;"><instanceId></span>gov<span style="color: #007700;"></instanceId></span>
<span style="color: #007700;"><targetPath></span>/_system/config<span style="color: #007700;"></targetPath></span>
<span style="color: #007700;"></mount></span>
</pre>
</div>
<br />
<span style="font-size: 12.5pt;">7. Set following properties in <DAS_HOME>/repository/conf/axis2/axis2.xml file to enable Hazlecast clustering.</span><br />
<span style="font-size: 12.5pt;"><br /></span>
<span style="font-size: 12.5pt;"><span style="font-size: 16.6667px;">
a) Enable clustering by setting value as ‘true’ for clustering class="org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent" as below,</span></span><br />
<br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"><span style="color: #007700;"><clustering</span> <span style="color: #0000cc;">class=</span><span style="background-color: #fff0f0;">"org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent"</span> <span style="color: #0000cc;">enable=</span><span style="background-color: #fff0f0;">"true"</span><span style="color: #007700;">></span>
</pre>
</div>
<span style="font-size: 12.5pt;"><br /></span>
<span style="font-size: 12.5pt;">
b) Enable well known address by changing the membershipScheme to ‘wka’</span><br />
<span style="font-size: 12.5pt;"><br /></span>
<br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"><span style="color: #007700;"><parameter</span> <span style="color: #0000cc;">name=</span><span style="background-color: #fff0f0;">"membershipScheme"</span><span style="color: #007700;">></span>wka<span style="color: #007700;"></parameter></span>
</pre>
</div>
<span style="font-size: 12.5pt;"><br /></span>
<span style="font-size: 12.5pt;">
c) Add respective server IP address as the value for the localMemberHost property for each node</span><br />
<br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"><span style="color: #007700;"><parameter</span> <span style="color: #0000cc;">name=</span><span style="background-color: #fff0f0;">"localMemberHost"</span><span style="color: #007700;">></span>10.100.1.89<span style="color: #007700;"></parameter></span>
</pre>
</div>
<span style="font-size: 12.5pt;"><br /></span>
<span style="font-size: 12.5pt;">d) Change the localMemberPort by assigning an unique port. Both nodes should have different unique ports</span><br />
<br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"><span style="color: #007700;"><parameter</span> <span style="color: #0000cc;">name=</span><span style="background-color: #fff0f0;">"localMemberPort"</span><span style="color: #007700;">></span>4000<span style="color: #007700;"></parameter></span>
</pre>
</div>
<br />
<span style="font-size: 12.5pt;">
e) Add both the DAS nodes as well known addresses in the cluster by specifying under the <members> tag in each node as shown below.</span><br />
<br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"> <span style="color: #007700;"><members></span>
<span style="color: #007700;"><member></span>
<span style="color: #007700;"><hostName></span>10.100.1.89<span style="color: #007700;"></hostName></span>
<span style="color: #007700;"><port></span>4000<span style="color: #007700;"></port></span>
<span style="color: #007700;"></member></span>
<span style="color: #007700;"><member></span>
<span style="color: #007700;"><hostName></span>10.100.1.90<span style="color: #007700;"></hostName></span>
<span style="color: #007700;"><port></span>4100<span style="color: #007700;"></port></span>
<span style="color: #007700;"></member></span>
<span style="color: #007700;"></members></span>
</pre>
</div>
<br />
<span style="font-size: 12.5pt;">
Note - Make sure to have different ports for both nodes and included under <members> tag in each node.</span><br />
<br />
<span style="font-size: 12.5pt;">8. Enable HA mode in <DAS_HOME>/repository/conf/event-processor.xml in order to Cluster CEP.</span><br />
<br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"><span style="color: #007700;"><mode</span> <span style="color: #0000cc;">name=</span><span style="background-color: #fff0f0;">"HA"</span> <span style="color: #0000cc;">enable=</span><span style="background-color: #fff0f0;">"true"</span><span style="color: #007700;">></span>
</pre>
</div>
<br />
<span style="font-size: 12.5pt;">9. Enter the respective server IP address under the HA mode Config for <hostname> in <eventSync> and <management> sections as below,</span><br />
<br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"> <span style="color: #007700;"><eventSync></span>
<span style="color: #007700;"><hostName></span>10.100.1.89<span style="color: #007700;"></hostName></span>
..
<span style="color: #007700;"></eventSync></span>
<span style="color: #007700;"><management></span>
<span style="color: #007700;"><hostName></span>10.100.1.89<span style="color: #007700;"></hostName></span>
..
<span style="color: #007700;"></management></span>
</pre>
</div>
<br />
<span style="font-size: 12.5pt;">10. Modify <DAS_HOME>/repository/conf/analytics/spark/spark-defaults.conf as follows,</span><br />
<br />
<span style="font-size: 12.5pt;">
a) Keep carbon.spark.master as ’local’. This creates a spark cluster with hazelcast cluster.</span><br />
<br />
<span style="font-size: 12.5pt;">
b) Set ‘carbon.spark.master.count’ as 2 since both node works as master (active and passive)</span><br />
<br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;">carbon.spark.master local
carbon.spark.master.count 2
</pre>
</div>
<br />
<span style="font-size: 12.5pt;">
c) If the path to <DAS_HOME> is different in the two nodes, please do the following. If it same you can skip this step.</span><br />
<br />
<span style="font-size: 12.5pt;">11. Create identical symbolic links to <DAS_HOME> in both nodes and ensures that we can use a common path. Uncomment and change carbon.das.symbolic.link accordingly by setting the symbolink link.</span><br />
<br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;">carbon.das.symbolic.link /home/ubuntu/das/das_symlink/
</pre>
</div>
<br />
<span style="font-size: 12.5pt;">12. Make sure to apply above changes in both nodes and change ip address and ports (ex- localmemberport, port offset in carbon.xml, etc) accordingly.</span><br />
<span style="font-size: 12.5pt;">
Start at least one server with -Dsetup since we need to populate tables for the created databases and other node with/without -Dsetup . Go to <DAS_HOME>/bin and run</span><br />
<br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;">sh wso2server.sh -Dsetup
</pre>
</div>
<span style="font-size: 12.5pt;">
</span><br />
<span style="color: purple; font-size: large;"><b>
Steps to install APIM Analytics features</b></span><br />
<br />
<span style="font-size: 12.5pt;">1. Go to management console -> Main - Configure -> Features</span><br />
<br />
<span style="font-size: 12.5pt;">
2. Click Repository Management and go to Add Repository.</span><br />
<br />
<span style="font-size: 12.5pt;">
3. Give a name and browse or add url to add the repository.</span><br />
<br />
<span style="font-size: 12.5pt;">
Note - You can get the p2 repo from <a href="http://product-dist.wso2.com/p2/carbon/releases/wilkes/" target="_blank">here</a></span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-fcdp0Bl9Efk/WaaOO15l5LI/AAAAAAAAFDU/ylcXHKg-pqMRYyIpSWgumX3GR7iGBxTPQCLcBGAs/s1600/Screenshot%2Bfrom%2B2017-08-30%2B15-35-53.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="389" data-original-width="943" height="260" src="https://1.bp.blogspot.com/-fcdp0Bl9Efk/WaaOO15l5LI/AAAAAAAAFDU/ylcXHKg-pqMRYyIpSWgumX3GR7iGBxTPQCLcBGAs/s640/Screenshot%2Bfrom%2B2017-08-30%2B15-35-53.png" width="640" /></a></div>
<br />
<br />
<span style="font-size: 12.5pt;">
Name - Any preferred name (ex - p2 repo)</span><br />
<span style="font-size: 12.5pt;">
Location (from URL) - http://product-dist.wso2.com/p2/carbon/releases/wilkes</span><br />
<br />
<br />
<span style="font-size: 12.5pt;">
4. Go to ‘Available Features’ tab, untick ‘Group features by category’ and click ‘Find Features’</span><br />
<br />
<span style="font-size: 12.5pt;">
5. Following features needed to be installed from listed set of features.</span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-4E-7LgNNuuQ/WaaOg4FVpfI/AAAAAAAAFDY/Nr5tA1PEL_83UzL7Js6SLtKR-N9kZn4QQCLcBGAs/s1600/Screenshot%2Bfrom%2B2017-08-30%2B15-37-15.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="309" data-original-width="916" height="214" src="https://2.bp.blogspot.com/-4E-7LgNNuuQ/WaaOg4FVpfI/AAAAAAAAFDY/Nr5tA1PEL_83UzL7Js6SLtKR-N9kZn4QQCLcBGAs/s640/Screenshot%2Bfrom%2B2017-08-30%2B15-37-15.png" width="640" /></a></div>
<br />
<br />
<span style="font-size: 12.5pt;">
Tick the above features and click install and features will be installed.</span><br />
<br />
<span style="font-size: 12.5pt;">
Note - Make sure to do the same for both nodes.</span><br />
<br />
<b style="color: purple; font-size: x-large;">Steps to Configure Statistic Datasource</b><br />
<br />
<span style="font-size: 12.5pt;">Here, we only have to create stat database and point it in datasource file since we have followed other required steps when clustering.</span><br />
<br />
<span style="font-size: 12.5pt;">
1. Shut down both servers.</span><br />
<br />
<span style="font-size: 12.5pt;">
2. Create a database for statistics database in oracle (ex- user - statdb)</span><br />
<br />
<span style="font-size: 12.5pt;">
3. Go to <DAS_HOME>/repository/conf/datasources and open stats-datasources.xml and change the properties as below,</span><br />
<br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"> <span style="color: #007700;"><datasource></span>
<span style="color: #007700;"><name></span>WSO2AM_STATS_DB<span style="color: #007700;"></name></span>
<span style="color: #007700;"><description></span>The datasource used for setting statistics to API Manager<span style="color: #007700;"></description></span>
<span style="color: #007700;"><jndiConfig></span>
<span style="color: #007700;"><name></span>jdbc/WSO2AM_STATS_DB<span style="color: #007700;"></name></span>
<span style="color: #007700;"></jndiConfig></span>
<span style="color: #007700;"><definition</span> <span style="color: #0000cc;">type=</span><span style="background-color: #fff0f0;">"RDBMS"</span><span style="color: #007700;">></span>
<span style="color: #007700;"><configuration></span>
<span style="color: #007700;"><url></span>jdbc:mysql://10.100.15.22:1521/oracle11g<span style="color: #007700;"></url></span>
<span style="color: #007700;"><username></span>statdb<span style="color: #007700;"></username></span>
<span style="color: #007700;"><password></span>statdb<span style="color: #007700;"></password></span>
<span style="color: #007700;"><driverClassName></span>com.mysql.jdbc.Driver<span style="color: #007700;"></driverClassName></span>
<span style="color: #007700;"><maxActive></span>50<span style="color: #007700;"></maxActive></span>
<span style="color: #007700;"><maxWait></span>60000<span style="color: #007700;"></maxWait></span>
<span style="color: #007700;"><testOnBorrow></span>true<span style="color: #007700;"></testOnBorrow></span>
<span style="color: #007700;"><validationQuery></span>SELECT 1<span style="color: #007700;"></validationQuery></span>
<span style="color: #007700;"><validationInterval></span>30000<span style="color: #007700;"></validationInterval></span>
<span style="color: #007700;"><defaultAutoCommit></span>false<span style="color: #007700;"></defaultAutoCommit></span>
<span style="color: #007700;"></configuration></span>
<span style="color: #007700;"></definition></span>
<span style="color: #007700;"></datasource></span>
</pre>
</div>
<br />
<span style="font-size: 12.5pt;">
<span style="font-size: large;"><b>
Related documentations</b></span></span><br />
<span style="font-size: 12.5pt;"><br /></span>
<br />
<ul>
<li><span style="font-size: 12.5pt;"><a href="https://docs.wso2.com/display/CLUSTER44x/Minimum+High+Availability+Deployment+-+DAS+3.1.0" style="font-size: 12.5pt;" target="_blank">https://docs.wso2.com/display/CLUSTER44x/Minimum+High+Availability+Deployment+-+DAS+3.1.0</a></span></li>
<li><span style="font-size: 12.5pt;"><a href="https://docs.wso2.com/display/DAS310/Setting+up+Oracle" style="font-size: 12.5pt;" target="_blank">https://docs.wso2.com/display/DAS310/Setting+up+Oracle</a></span></li>
<li><span style="font-size: 12.5pt;"><a href="https://docs.wso2.com/display/AM200/Installing+WSO2+APIM+Analytics+Features" style="font-size: 16.6667px;">https://docs.wso2.com/display/AM200/Installing+WSO2+APIM+Analytics+Features</a></span></li>
<li><span style="font-size: 12.5pt;"><a href="https://docs.wso2.com/display/AM200/Configuring+APIM+Analytics" style="font-size: 16.6667px;">https://docs.wso2.com/display/AM200/Configuring+APIM+Analytics</a><span style="font-size: 16.6667px;"> (Go to ‘Standard Setup’ section)</span></span></li>
</ul>
Maneesha Wijesekarahttp://www.blogger.com/profile/04283147149772113205noreply@blogger.com2tag:blogger.com,1999:blog-6455272025469432963.post-87897416540607939132016-07-03T09:54:00.002-07:002016-07-03T10:07:20.219-07:00Wants to monitor outgoing or incoming messages ? Let's Enable WireLogs<span style="font-size: 12.5pt;">
Have you ever faced a situation where you have to monitor outgoing or incoming message of your WSO2 product in order to understand its flow of request/response transmission ?<br />
<br />
If the answer is YES, we can simply use wirelogs in order to monior incoming and outgoing messages just do a simple changes in configurations. In here I'm considering WSO2 API Manager product to describe on how to enable wirelogs.<br />
<br />
1. First go to <APIM_HOME>/repository/conf and open log4j.properties file.<br />
2. In here you just simple need to uncomment the following line.<br /><br />
</span>
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"><span style="font-size: 12.5pt;">log4j.logger.org.apache.synapse.transport.http.wire=DEBUG</span></pre>
</div>
<span style="font-size: 12.5pt;">
<br />
<span style="font-family: inherit; font-size: 16px; line-height: 1.15; white-space: pre-wrap;">3. That's it now save the file and start API Manager server ( Go to </span><span style="font-size: 12.5pt;"><APIM_HOME>/bin and enter sh wso2server.sh )
</span><br /><span style="font-size: 12.5pt;">
4. Assuming an API has been already deployed, now go to Store ( https://<ip-address>:9443/store)
</span><br /><span style="font-size: 12.5pt;">
5. Go to API console of an already available API and tryout an available resource.
</span><br /><span style="font-size: 12.5pt;">
6. Then go to terminal of API Manager.
</span><br /><br /><span style="font-size: 12.5pt;">
You can see the wirelogs were enabled and the message transmission are separated as follows.</span></span><br />
<ul><span style="font-size: 12.5pt;">
<li><span style="color: #7f6000; font-size: 12.5pt;">Logs with '>>' are the outgoing transmissions from API Manager</span></li>
<li><span style="color: #4c1130; font-size: 12.5pt;">Logs with '<<' are the incoming transmissions to API Manager</span></li>
</span></ul><br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"><b><span style="color: #7f6000;">[2016-07-01 22:07:33,493] DEBUG - wire >> "OPTIONS /pizzashack/1.0.0/menu HTTP/1.1[\r][\n]"
[2016-07-01 22:07:33,493] DEBUG - wire >> "Host: 172.16.2.23:8243[\r][\n]"
[2016-07-01 22:07:33,493] DEBUG - wire >> "Connection: keep-alive[\r][\n]"
[2016-07-01 22:07:33,494] DEBUG - wire >> "Access-Control-Request-Method: GET[\r][\n]"
[2016-07-01 22:07:33,494] DEBUG - wire >> "Origin: https://172.16.2.23:9443[\r][\n]"
[2016-07-01 22:07:33,494] DEBUG - wire >> "User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36[\r][\n]"
[2016-07-01 22:07:33,494] DEBUG - wire >> "Access-Control-Request-Headers: accept, authorization[\r][\n]"
[2016-07-01 22:07:33,494] DEBUG - wire >> "Accept: */*[\r][\n]"
[2016-07-01 22:07:33,494] DEBUG - wire >> "Referer: https://172.16.2.23:9443/store/apis/info?name=PizzaShackAPI&version=1.0.0&provider=admin&tenant=carbon.super[\r][\n]"
[2016-07-01 22:07:33,494] DEBUG - wire >> "Accept-Encoding: gzip, deflate, sdch[\r][\n]"
[2016-07-01 22:07:33,494] DEBUG - wire >> "Accept-Language: en-US,en;q=0.8[\r][\n]"
[2016-07-01 22:07:33,494] DEBUG - wire >> "[\r][\n]"</span></b>
<span style="color: #741b47;"><b>[2016-07-01 22:07:33,565] DEBUG - wire << "HTTP/1.1 200 OK[\r][\n]"
[2016-07-01 22:07:33,566] DEBUG - wire << "Origin: https://172.16.2.23:9443[\r][\n]"
[2016-07-01 22:07:33,566] DEBUG - wire << "Accept: */*[\r][\n]"
[2016-07-01 22:07:33,566] DEBUG - wire << "Access-Control-Request-Method: GET[\r][\n]"
[2016-07-01 22:07:33,566] DEBUG - wire << "Access-Control-Allow-Origin: *[\r][\n]"
[2016-07-01 22:07:33,566] DEBUG - wire << "Access-Control-Allow-Methods: GET[\r][\n]"
[2016-07-01 22:07:33,566] DEBUG - wire << "Access-Control-Request-Headers: accept, authorization[\r][\n]"
[2016-07-01 22:07:33,566] DEBUG - wire << "Referer: https://172.16.2.23:9443/store/apis/info?name=PizzaShackAPI&version=1.0.0&provider=admin&tenant=carbon.super[\r][\n]"
[2016-07-01 22:07:33,566] DEBUG - wire << "Host: 172.16.2.23:8243[\r][\n]"
[2016-07-01 22:07:33,566] DEBUG - wire << "Accept-Encoding: gzip, deflate, sdch[\r][\n]"
[2016-07-01 22:07:33,566] DEBUG - wire << "Accept-Language: en-US,en;q=0.8[\r][\n]"
[2016-07-01 22:07:33,566] DEBUG - wire << "Access-Control-Allow-Headers: authorization,Access-Control-Allow-Origin,Content-Type,SOAPAction[\r][\n]"
[2016-07-01 22:07:33,566] DEBUG - wire << "Date: Sun, 03 Jul 2016 16:37:33 GMT[\r][\n]"
[2016-07-01 22:07:33,566] DEBUG - wire << "Transfer-Encoding: chunked[\r][\n]"
[2016-07-01 22:07:33,566] DEBUG - wire << "Connection: keep-alive[\r][\n]"
[2016-07-01 22:07:33,566] DEBUG - wire << "[\r][\n]"
[2016-07-01 22:07:33,566] DEBUG - wire << "0[\r][\n]"
[2016-07-01 22:07:33,566] DEBUG - wire << "[\r][\n]"</b></span>
<span style="color: #7f6000;"><b>[2016-07-01 22:07:33,570] DEBUG - wire >> "GET /pizzashack/1.0.0/menu HTTP/1.1[\r][\n]"
[2016-07-01 22:07:33,570] DEBUG - wire >> "Host: 172.16.2.23:8243[\r][\n]"
[2016-07-01 22:07:33,570] DEBUG - wire >> "Connection: keep-alive[\r][\n]"
[2016-07-01 22:07:33,570] DEBUG - wire >> "Accept: application/json[\r][\n]"
[2016-07-01 22:07:33,571] DEBUG - wire >> "Origin: https://172.16.2.23:9443[\r][\n]"
[2016-07-01 22:07:33,571] DEBUG - wire >> "User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36[\r][\n]"
[2016-07-01 22:07:33,571] DEBUG - wire >> "Authorization: Bearer 3de15404-ffdb-3427-98da-65e6e43aaeaa[\r][\n]"
[2016-07-01 22:07:33,571] DEBUG - wire >> "Referer: https://172.16.2.23:9443/store/apis/info?name=PizzaShackAPI&version=1.0.0&provider=admin&tenant=carbon.super[\r][\n]"
[2016-07-01 22:07:33,571] DEBUG - wire >> "Accept-Encoding: gzip, deflate, sdch[\r][\n]"
[2016-07-01 22:07:33,571] DEBUG - wire >> "Accept-Language: en-US,en;q=0.8[\r][\n]"
[2016-07-01 22:07:33,571] DEBUG - wire >> "[\r][\n]"</b></span>
</pre>
</div>Maneesha Wijesekarahttp://www.blogger.com/profile/04283147149772113205noreply@blogger.com0tag:blogger.com,1999:blog-6455272025469432963.post-27493380700621071982016-06-03T11:03:00.000-07:002017-08-30T02:21:25.876-07:00Setup WSO2 API Manager Analytics with WSO2 API Manager 2.0 using RDBMS<div style="margin-bottom: .0001pt; margin: 0in; mso-line-height-alt: 9.75pt;">
<span style="font-size: 12.5pt;">In this blog post I'll explain on
how to configure RDBMS to publish APIM analytics using APIM analytics 2.0.0. <o:p></o:p></span></div>
<div style="margin-bottom: .0001pt; margin: 0in; mso-line-height-alt: 9.75pt;">
<br /></div>
<div style="margin: 0in 0in 0.0001pt;">
<span style="font-size: 12.5pt;">The purpose of having RDBMS is to fetch and store summarized data after the analyzing process. API Manager used this data to display on APIM side using dashboards.</span><br />
<span style="font-size: 12.5pt;"><br /></span>
<span style="font-size: 12.5pt;">Since the APIM
2.0.0, RDBMS use as the recommended way to publish statistics for API Manager.
Hence, I will explain step by step configuration with RDBMS in order to view statistics in
Publisher and Store through this blog post.<o:p></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt;">
<br /></div>
<div style="margin: 0in 0in 0.0001pt;">
<span style="font-size: 12.5pt;"><span style="color: #a64d79; font-size: large;">Steps to configure,</span></span></div>
<div style="margin: 0in 0in 0.0001pt;">
<br /></div>
<div style="margin: 0in 0in 0.0001pt;">
<span style="font-size: 12.5pt;">1. First download the WSO2 API Manager
Analytics 2.0.0 release pack and unzip it.<o:p></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt;">
<span style="font-size: 12.5pt;">( <a href="http://wso2.com/products/api-manager/" target="_blank">Download</a> )<o:p></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt;">
<br /></div>
<div style="margin: 0in 0in 0.0001pt;">
<span style="font-size: 12.5pt;">2. Go to <b>carbon.xml</b>
([APIM_ANALYTICS_HOME]/repository/conf/carbon.xml) and set port offset as 1
(default offset for APIM Analytics)<o:p></o:p></span><br />
<br /></div>
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"><span style="color: #007700;"><Ports></span>
<span style="color: #888888;"><!-- Ports offset. This entry will set the value of the ports defined below to</span>
<span style="color: #888888;">the define value + Offset.</span>
<span style="color: #888888;">e.g. Offset=2 and HTTPS port=9443 will set the effective HTTPS port to 9445</span>
<span style="color: #888888;">--></span>
<span style="color: #007700;"><Offset></span>1<span style="color: #007700;"></Offset></span>
</pre>
</div>
<div style="margin: 0in 0in 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="background: white; line-height: 13.5pt; margin-bottom: 0.0001pt;">
<span style="background-color: transparent; font-size: 12.5pt;">Note - This is only necessary if both API
Manager 2.0.0 and APIM Analytics servers run in a same machine.</span></div>
<div style="margin: 0in 0in 0.0001pt;">
<br /></div>
<div style="margin: 0in 0in 0.0001pt;">
<span style="font-size: 12.5pt;">3. Now add the data source for Statistics
DB in stats-datasources.xml ([APIM_ANALYTICS_HOME]/repository/conf/datasources/stats-datasources./xml)
according to the preferred RDBMS. You can use any RDBMS such as h2, mysql, oracle,
postgres and etc and here I choose mysql to use in this blog post.<o:p></o:p></span><br />
<span style="font-size: 12.5pt;"><br /></span>
<br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"><span style="color: #007700;"><datasource></span>
<span style="color: #007700;"><name></span>WSO2AM_STATS_DB<span style="color: #007700;"></name></span>
<span style="color: #007700;"><description></span>The datasource used for setting statistics to API Manager<span style="color: #007700;"></description></span>
<span style="color: #007700;"><jndiConfig></span>
<span style="color: #007700;"><name></span>jdbc/WSO2AM_STATS_DB<span style="color: #007700;"></name></span>
<span style="color: #007700;"></jndiConfig></span>
<span style="color: #007700;"><definition</span> <span style="color: #0000cc;">type=</span><span style="background-color: #fff0f0;">"RDBMS"</span><span style="color: #007700;">></span>
<span style="color: #007700;"><configuration></span>
<span style="color: #007700;"><url></span>jdbc:mysql://localhost:3306/statdb?autoReconnect=true<span style="color: #880000; font-weight: bold;">&amp;</span>relaxAutoCommit=true<span style="color: #007700;"></url></span>
<span style="color: #007700;"><username></span>maneesha<span style="color: #007700;"></username></span>
<span style="color: #007700;"><password></span>password<span style="color: #007700;"></password></span>
<span style="color: #007700;"><driverClassName></span>com.mysql.jdbc.Driver<span style="color: #007700;"></driverClassName></span>
<span style="color: #007700;"><maxActive></span>50<span style="color: #007700;"></maxActive></span>
<span style="color: #007700;"><maxWait></span>60000<span style="color: #007700;"></maxWait></span>
<span style="color: #007700;"><testOnBorrow></span>true<span style="color: #007700;"></testOnBorrow></span>
<span style="color: #007700;"><validationQuery></span>SELECT 1<span style="color: #007700;"></validationQuery></span>
<span style="color: #007700;"><validationInterval></span>30000<span style="color: #007700;"></validationInterval></span>
<span style="color: #007700;"></configuration></span>
<span style="color: #007700;"></definition></span>
<span style="color: #007700;"></datasource></span>
</pre>
</div>
<div style="margin: 0in 0in 0.0001pt;">
<br /></div>
<div style="margin: 0in 0in 0.0001pt;">
<span style="font-size: 12.5pt;">Give the correct hostname and name of the db in <url> (in this case,
localhost and statdb respectively), username and password for the database and
drive class name.</span></div>
<div style="margin-bottom: .0001pt; margin: 0in;">
<br /></div>
<div style="margin-bottom: .0001pt; margin: 0in;">
<span style="font-size: 12.5pt;">4. WSO2 analytics server automatically create the table
structure for statistics database at the server start up using ‘-Dsetup’. </span></div>
<div style="margin-bottom: .0001pt; margin: 0in;">
<br /></div>
<div style="margin-bottom: .0001pt; margin: 0in;">
<span style="font-size: 12.5pt;">5. Copy the related database driver into </span><APIM_ANALYTICS_HOME><span style="font-size: 12.5pt;">/repository/components/lib directory.<o:p></o:p></span></div>
<div style="margin-bottom: .0001pt; margin: 0in;">
<br /></div>
<div style="margin-bottom: .0001pt; margin: 0in;">
<span style="font-size: 12.5pt;">If you use mysql - <a href="https://docs.wso2.com/download/attachments/45941946/mysql-connector-java-5.1.35-bin.jar?version=1&modificationDate=1433176969000&api=v2" target="_blank">Download</a></span><br />
If you use oracle 12c - <a href="http://download.oracle.com/otn/utilities_drivers/jdbc/121010/ojdbc7.jar" target="_blank">Download</a><br />
If you use Mssql - <a href="https://msdn.microsoft.com/en-us/data/aa937724.aspx" target="_blank">Download</a><br />
<br /></div>
<div style="margin-bottom: .0001pt; margin: 0in;">
<span style="font-size: 12.5pt;">6. Start the Analytics server <o:p></o:p></span><br />
<br /></div>
<div style="margin: 0in 0in 0.0001pt;">
<span style="font-size: 12.5pt;">7. Download the WSO2 API Manager 2.0.0
pack and unzip it ( <a href="http://wso2.com/products/api-manager/" target="_blank">Download</a> )<o:p></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt;">
<br /></div>
<div class="Standard">
<span style="font-size: 12.5pt;">8. Open api-manager.xml ([APIM_HOME]/repository/conf/api-manager.xml
) and enables the Analytics. The configuration should be look like this. (by default
the value set as false)<o:p></o:p></span><br />
<span style="font-size: 12.5pt;"><br /></span></div>
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"><span style="color: #007700;"><Analytics></span>
<span style="color: #888888;"><!-- Enable Analytics for API Manager --></span>
<span style="color: #007700;"><Enabled></span>true<span style="color: #007700;"></Enabled></span>
</pre>
</div>
<div class="Standard">
<span style="font-size: 12.5pt;"><br /></span>
<span style="font-size: 12.5pt;">9. Then configure Server URL
of the analytics server used to collect statistics. The define format is '
protocol://hostname:port/'. Although admin credentials to login to the remote
DAS server has to be configured like below.</span></div>
<div class="Standard">
<br /></div>
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"><span style="color: #007700;"><DASServerURL></span>{tcp://localhost:7612}<span style="color: #007700;"></DASServerURL></span>
<span style="color: #007700;"><DASUsername></span>admin<span style="color: #007700;"></DASUsername></span>
<span style="color: #007700;"><DASPassword></span>admin<span style="color: #007700;"></DASPassword></span>
</pre>
</div>
<div class="Standard">
<br /></div>
<div class="Standard">
<span style="font-size: 12.5pt;">Assuming Analytics server in
the same machine as the API Manager 2.0, the hostname I used here is
'localhost'. Change according to the hostname of remote location if the Analytics
server runs on a different instance. </span></div>
<div class="Standard">
<br /></div>
<div class="Standard">
<span style="font-size: 12.5pt;">By default, the server port is
adjusted with offset '1'. If the Analytics server has a different port offset (
check {<span style="font-size: 16.6667px;">APIM_ANALYTICS_HOME</span>}/repository/conf/carbon.xml for the offset ), change the port
in <DASServerURL> accordingly. As an example if the Analytics server has
the port offset of 3, <DASServerURL> should be {tcp://localhost:7614}.<o:p></o:p></span></div>
<div class="Standard">
<br /></div>
<div class="Standard">
<span style="font-size: 12.5pt;">10. For your information, API
Manager 2.0 enables RDBMS configuration to proceed with statistics, by default.
To enable publishing using RDBMS, <StatsProviderImpl> should be uncommented
(By default, it's not in as a comment. So this step can be omitted)<o:p></o:p></span><br />
<br /></div>
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"><span style="color: #888888;"><!-- For APIM implemented Statistic client for DAS REST API --></span>
<span style="color: #888888;"><!--StatsProviderImpl>org.wso2.carbon.apimgt.usage.client.impl.APIUsageStatisticsRestClientImpl</StatsProviderImpl--></span>
<span style="color: #888888;"><!-- For APIM implemented Statistic client for RDBMS --></span>
<span style="color: #007700;"><StatsProviderImpl></span>org.wso2.carbon.apimgt.usage.client.impl.APIUsageStatisticsRdbmsClientImpl<span style="color: #007700;"></StatsProviderImpl></span>
</pre>
</div>
<div class="Standard">
<br /></div>
<div class="Standard">
<span style="font-size: 12.5pt;">11. The next step is to
configure the statistics database in API Manager side. Add the data source for
Statistics DB which used to configure in Analytics by opening
master-datasources.xml ([APIM_HOME]/repository/conf/datasources/master-datasources./xml)</span></div>
<span style="font-size: 12.5pt;"><br /></span>
<br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"><span style="color: #007700;"><datasource></span>
<span style="color: #007700;"><name></span>WSO2AM_STATS_DB<span style="color: #007700;"></name></span>
<span style="color: #007700;"><description></span>The datasource used for setting statistics to API Manager<span style="color: #007700;"></description></span>
<span style="color: #007700;"><jndiConfig></span>
<span style="color: #007700;"><name></span>jdbc/WSO2AM_STATS_DB<span style="color: #007700;"></name></span>
<span style="color: #007700;"></jndiConfig></span>
<span style="color: #007700;"><definition</span> <span style="color: #0000cc;">type=</span><span style="background-color: #fff0f0;">"RDBMS"</span><span style="color: #007700;">></span>
<span style="color: #007700;"><configuration></span>
<span style="color: #007700;"><url></span>jdbc:mysql://localhost:3306/statdb?autoReconnect=true<span style="color: #880000; font-weight: bold;">&amp;</span>relaxAutoCommit=true<span style="color: #007700;"></url></span>
<span style="color: #007700;"><username></span>maneesha<span style="color: #007700;"></username></span>
<span style="color: #007700;"><password></span>password<span style="color: #007700;"></password></span>
<span style="color: #007700;"><driverClassName></span>com.mysql.jdbc.Driver<span style="color: #007700;"></driverClassName></span>
<span style="color: #007700;"><maxActive></span>50<span style="color: #007700;"></maxActive></span>
<span style="color: #007700;"><maxWait></span>60000<span style="color: #007700;"></maxWait></span>
<span style="color: #007700;"><testOnBorrow></span>true<span style="color: #007700;"></testOnBorrow></span>
<span style="color: #007700;"><validationQuery></span>SELECT 1<span style="color: #007700;"></validationQuery></span>
<span style="color: #007700;"><validationInterval></span>30000<span style="color: #007700;"></validationInterval></span>
<span style="color: #007700;"></configuration></span>
<span style="color: #007700;"></definition></span>
<span style="color: #007700;"></datasource></span>
</pre>
</div>
<div class="Standard">
<br /></div>
<div class="Standard">
<span style="font-size: 12.5pt;">12. Copy the related database driver
into <APIM_HOME>/repository/components/lib directory as well.<o:p></o:p></span></div>
<div class="Standard">
<br /></div>
<div class="Standard">
<span style="font-size: 12.5pt;">13. Start the API Manager
server.<o:p></o:p></span></div>
<div class="Standard">
<br /></div>
<div class="Standard">
<span style="font-size: 12.5pt;">Go to statistics in publisher
and the screen should looks like this with a message of 'Data Publishing
Enabled. Generate some traffic to see statistics.'<o:p></o:p></span></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-7rGP5vaH7-4/Vy9KWiciBiI/AAAAAAAAEng/Yv_40GxXL28HPxIRtclOP3Yx72IrTL7TwCLcB/s1600/blog.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="354" src="https://2.bp.blogspot.com/-7rGP5vaH7-4/Vy9KWiciBiI/AAAAAAAAEng/Yv_40GxXL28HPxIRtclOP3Yx72IrTL7TwCLcB/s640/blog.png" width="640" /></a></div>
<div class="Standard">
<br /></div>
<div class="Standard">
<span style="font-size: 12.5pt;">To view statistics, you have
to create at least one API and invoke it in order to get some traffic to
display in graphs. <o:p></o:p></span></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-3xx5IhWmnKc/Vy9K1I7xznI/AAAAAAAAEnk/zdvOyNp-XMgja3aczciCDQkDw83kG59JACLcB/s1600/API%2BManager%2B2.0%2Banalytics.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="336" src="https://2.bp.blogspot.com/-3xx5IhWmnKc/Vy9K1I7xznI/AAAAAAAAEnk/zdvOyNp-XMgja3aczciCDQkDw83kG59JACLcB/s640/API%2BManager%2B2.0%2Banalytics.png" width="640" /></a></div>
<div style="margin-bottom: .0001pt; margin: 0in; mso-line-height-alt: 9.75pt;">
</div>
<div class="MsoNormal">
<br /></div>
</div>
<script src="https://connect.facebook.net/en_US/all.js#appId=153144121431590&xfbml=1">
</script><fb:like font="" href="http://maneeshawijesekara.blogspot.com/2016/06/setup-wso2-api-manager-analytics-100.html" send="false" show_faces="true" width="500"></fb:like>
Maneesha Wijesekarahttp://www.blogger.com/profile/04283147149772113205noreply@blogger.com9tag:blogger.com,1999:blog-6455272025469432963.post-23889574291880004732016-05-08T06:18:00.002-07:002016-11-29T10:56:27.935-08:00Setup WSO2 API Manager Analytics with WSO2 API Manager 2.0 using REST Client<span style="font-size: 16px;">
</span>
<br />
<div style="margin-bottom: 0in;">
<div style="margin-bottom: 0in;">
<span style="font-size: 16px;"><span style="color: red; font-size: large;">Please Note - Statistics publishing using REST Client was deprecated from APIM 2.0.0. Please refer <a href="http://maneeshawijesekara.blogspot.com/2016/06/setup-wso2-api-manager-analytics-100.html" target="_blank">this</a> to continue.</span></span><br />
<span style="font-size: 16px;"><span style="font-size: 16px;"><br /></span></span>
<span style="font-size: 16px;"><span style="font-size: 16px;">In this blog post I will explain how to configure WSO2 API Manager
Analytics 2.0.0 with WSO2 API Manager 2.0 to publish and view statistics.
Before going further into the topic, I thought to give a brief summary
about the role of WSO2 API Manager Analytics 2.0.0 in here</span></span></div>
<div style="font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0in;">
<span style="font-size: 16px;"><span style="font-size: 16px;"><br /></span></span></div>
<div style="font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0in;">
<span style="font-size: 16px;"><span style="font-size: 16px;">WSO2
API manager embedded with the ability to view statistics of the
operations carried out such as usage comparison, monitoring Throttled
Out Requests, API last access time and so on. To view so, the user
has to configure an analytics server with API Manager and it allows
to view statistics based on the given criteria. Until WSO2 API Manager 2.0.0, the
recommended analytics server to view statistics was WSO2 DAS ( Data
Analytics Server ) which is a high performing enterprise data
analytics platform. Before that WSO2 BAM (Business Activity Monitor) used to collect and analyze runtime statistics from the API Manager. Based on the WSO2 DAS, with the vision of having a
separate but custom analytics package including new features that
will perform all the analytics for API Manager, WSO2 API Manager
Analytics has been introduced. WSO2 API Manager analytics fuses
batch and real-time analytics with predictive analytics and generate
alerts when an abnormal situation occurs via machine learning.</span></span></div>
<div style="font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0in;">
<span style="font-size: 16px;"><span style="font-size: 16px;"><br /></span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-size: 16px;"><span style="font-family: "liberation" serif , serif; font-size: 16px;">Hope
now you have a sound knowledge on what API Manager analytics is all
about. So let's starts with configuration.</span></span></div>
<span style="line-height: 15px;"><span style="font-size: 16px;"><br /></span>
</span>
<br />
<div style="font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0in;">
<span style="font-size: 16px;"><span style="color: purple; font-family: "liberation" serif , serif; font-size: large;">Steps to configure,</span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-size: 16px;"><span style="font-size: 16px;"></span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-size: 16px;"><br /></span>
<span style="font-size: 16px;">1. First
download the WSO2 </span><span style="font-size: 16px;"><span style="font-style: normal;"><span style="font-weight: normal;">API
Manager Analytics 2.0.0 release pack and unzip it.</span></span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-size: 16px;"><span style="font-size: 16px;"><span style="font-family: "liberation" serif , serif;">(
<a href="http://wso2.com/products/api-manager/" target="_blank">Download</a> )</span></span></span><br />
<span style="font-size: 16px;"><br /></span>
<span style="font-size: 16px;">2. Start the Analytics server (By default the port offset was given as 1 in
carbon.xml)</span><br />
<span style="font-size: 16px;"><br /></span>
<span style="font-size: 16px;">3. Go to Management Console of Analytics Server and logged in as administrator (Username- admin, Password- admin). </span><br />
<span style="font-size: 16px;"><br /></span>
<span style="font-size: 16px;">4. Go to Manager -> Carbon Applications. List and delete the existing org.wso2.carbon.analytics.apim carbon app.</span><br />
<span style="font-size: 16px;"><br /></span>
<span style="font-size: 16px;">5. Browse Rest Client car app (org_wso2_carbon_analytics_apim_REST-1.0.0.car) from [APIM_ANALYTICS_HOME]/statistics and upload.</span><br />
<span style="font-size: 16px;"><br /></span>
<span style="font-size: 16px;">That's it from APIM Analytics side. Now see how to configure API Manager to finalize the configurations.</span></div>
<div style="margin-bottom: 0in;">
<span style="font-size: 16px;"><span style="font-size: 16px;"><br /></span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-size: 16px;"><span style="font-size: 16px;"><span style="font-family: "liberation" serif , serif;">6. Download
the </span><span style="font-variant: normal;"><span style="font-family: "liberation" serif , serif;"><span style="font-style: normal;"><span style="font-weight: normal;">WSO2
API Manager 2.0.0 pack and unzip it ( <a href="http://wso2.com/products/api-manager/" target="_blank">Download</a></span></span></span></span><span style="font-variant: normal;"><span style="font-family: "liberation" serif , serif;"><span style="font-style: normal;"><span style="font-weight: normal;"> )</span></span></span></span></span></span></div>
<br />
<div style="margin-bottom: 0in;">
<span style="font-size: 16px;"><span style="font-size: 16px;"><span style="font-family: "liberation" serif , serif;">7. Open
<b>api-manager.xml</b> ([<span style="font-variant: normal;"><span style="font-style: normal;"><span style="font-weight: normal;">APIM_HOME]/repository/conf/api-manager.xml
) and enables the Analytics. The configuration should be look like
this. ( by default the values set as false )</span></span></span></span></span></span></div>
<br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"><span style="color: #007700;"><Analytics></span>
<span style="color: #888888;"><!-- Enable Analytics for API Manager --></span>
<span style="color: #007700;"><Enabled></span>true<span style="color: #007700;"></Enabled></span>
</pre>
</div>
<div style="margin-bottom: 0in;">
<span style="font-size: 16px;"><span style="font-size: 16px;"><br /></span></span></div>
<div style="font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0in;">
<span style="font-size: 16px;"><span style="font-size: 16px;"><br /></span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-size: 16px;"><span style="font-size: 16px;"><span style="font-family: "liberation" serif , serif;"> 8. Then
configure <b>Server URL </b>of the analytics server used to collect
statistics. The define format is <span style="color: #b45f06;"><b>' protocol://hostname:port/'</b></span>.
Although <b>admin credentials to login</b> to the remote DAS server has to
be configured like below.</span></span></span></div>
<br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"><span style="color: #007700;"><DASServerURL></span>{tcp://localhost:7612}<span style="color: #007700;"></DASServerURL></span>
<span style="color: #007700;"><DASUsername></span>admin<span style="color: #007700;"></DASUsername></span>
<span style="color: #007700;"><DASPassword></span>admin<span style="color: #007700;"></DASPassword></span>
</pre>
</div>
<div style="margin-bottom: 0in;">
<span style="font-size: 16px;"><span style="font-size: 16px;"><br /></span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-size: 16px;"><span style="font-size: 16px;"><br /></span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-size: 16px;"><span style="font-size: 16px;"><span style="font-family: "liberation" serif , serif;">Assuming
Analytics server in the same machine as the API Manager 2.0, the
hostname I used here is '<b>localhost'</b>. Change according to the hostname
of remote location if the Analtics server run on different instance.
By default the server port is adjusted with <b>offset '1'</b>. If the
Analytics server has a different port offset ( check
<span style="font-variant: normal;"><span style="font-style: normal;"><span style="font-weight: normal;">[<span style="font-size: 16.6667px;">APIM_ANALYTICS_HOME</span>]/repository/conf/carbon.xml
for the offset ), change the port in <DASServerURL>
accordingly. As an example if the Analytics server has the port
offset of 3, <DASServerURL> should be {tcp://localhost:7614}.</span></span></span></span></span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-size: 16px;"><span style="font-size: 16px;"><br /></span></span></div>
<br />
<div style="margin-bottom: 0in;">
<span style="font-size: 16px;"><span style="font-size: 16px;"><span style="font-family: "liberation" serif , serif;"><span style="font-variant: normal;"><span style="font-style: normal;"><span style="font-weight: normal;"> Now
we have to choose between 2 clients to fetch and publish statistics. </span></span></span></span>
</span></span></div>
<br />
<ul>
<li><div align="left" style="border: none; font-size: 16px; font-variant: normal; font-weight: normal; margin-bottom: 0in; orphans: 1; padding: 0in;">
<span style="font-family: "liberation" serif , serif;">The
RDBMS client which fetches data from RDBMS and publish.</span></div>
</li>
<li><div align="left" style="border: none; font-size: 16px; font-variant: normal; font-weight: normal; margin-bottom: 0in; orphans: 1; padding: 0in;">
<span style="font-family: "liberation" serif , serif;">The
REST client which directly fetches data from Analytics server.</span></div>
</li>
</ul>
<div align="left" style="border: none; font-style: normal; font-variant: normal; font-weight: normal; margin-bottom: 0in; orphans: 1; padding: 0in;">
<span style="font-size: 16px;"><span style="font-size: 16px;"><br /></span></span></div>
<div align="left" style="border: none; font-style: normal; font-variant: normal; line-height: 0.21in; margin-bottom: 0in; padding: 0in;">
<span style="font-size: 16px;"><span style="font-size: 16px;"><span style="font-family: "liberation" serif , serif;">I
chose <span style="color: #b45f06; font-size: large;"><b>REST client</b></span> to publish data in this tutorial and will explain
how to configure the data fetching using RDBMS in next blog post.</span></span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-size: 16px;"><span style="font-size: 16px;"><br /></span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-size: 16px;"><span style="font-size: 16px;"><span style="font-family: "liberation" serif , serif;">For
your information, API Manager 2.0 enables RDBMS configuration
to proceed with statistics, by default. </span></span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-size: 16px;"><span style="font-size: 16px;"><br /></span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-size: 16px;"><span style="font-size: 16px;"><span style="font-family: "liberation" serif , serif;">9. To
enable publishing using REST Client, <b><StatsProviderImpl></b> should
be uncommented (By default, it's in as a comment) and comment </span></span></span><b style="font-size: 16px;"><StatsProviderImpl> </b><span style="font-size: 16px;">for RDBMS</span></div>
<br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"><span style="color: #888888;"><!-- For APIM implemented Statistic client for DAS REST API --></span>
<span style="color: #007700;"><StatsProviderImpl></span>org.wso2.carbon.apimgt.usage.client.impl.APIUsageStatisticsRestClientImpl<span style="color: #007700;"></StatsProviderImpl></span>
<span style="color: #888888;"><!-- For APIM implemented Statistic client for RDBMS --></span>
<span style="color: #888888;"><!--StatsProviderImpl>org.wso2.carbon.apimgt.usage.client.impl.APIUsageStatisticsRdbmsClientImpl</StatsProviderImpl--></span>
</pre>
</div>
<div style="margin-bottom: 0in;">
<span style="font-size: 16px;"><span style="font-size: 16px;"><br /></span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-size: 16px;"><span style="font-size: 16px;"><br /></span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-size: 16px;"><span style="font-size: 16px;"><span style="font-family: "liberation" serif , serif;">10. Then
the REST API url should be configured with hostname and port along
with the credentials to access,</span></span></span></div>
<br />
<div style="background: #ffffff; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;">
<pre style="line-height: 125%; margin: 0;"><span style="color: #007700;"><DASRestApiURL></span>https://localhost:9444<span style="color: #007700;"></DASRestApiURL></span>
<span style="color: #007700;"><DASRestApiUsername></span>admin<span style="color: #007700;"></DASRestApiUsername></span>
<span style="color: #007700;"><DASRestApiPassword></span>admin<span style="color: #007700;"></DASRestApiPassword></span>
</pre>
</div>
<div style="margin-bottom: 0in;">
<span style="font-size: 16px;"><span style="font-size: 16px;"><br /></span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-size: 16px;"><span style="font-size: 16px;"><span style="font-family: "liberation" serif , serif;">As
mentioned before, the port associate with the default offset of 1 for
WSO2 APIM analytics 1.0.0.</span></span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-size: 16px;"><span style="font-size: 16px;"><br /></span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-size: 16px;"><span style="font-size: 16px;"><span style="font-family: "liberation" serif , serif;">11. Now
Save api-manager.xml and start the API Manager 2.0 server.</span></span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-size: 16px;"><span style="font-size: 16px;"><br /></span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-size: 16px;"><span style="font-size: 16px;"><span style="font-family: "liberation" serif , serif;">That's
it. </span></span></span><span style="font-size: 16px;">Open
publisher in a browser ( https://<ip-address>:<port>/publisher). </span><span style="font-size: 16px;">Go
to Statistics and select API Usage as an example. The screen
should looks like this with a message of <span style="color: #783f04;">'</span><b><span style="color: #783f04;">Data Publishing Enabled.
Generate some traffic to see statistics.</span><span style="color: #0b5394;">'</span></b></span></div>
<div style="margin-bottom: 0in;">
<span style="font-size: 16px;"><span style="font-size: 16px;"><br /></span></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-7rGP5vaH7-4/Vy9KWiciBiI/AAAAAAAAEng/Yv_40GxXL28HPxIRtclOP3Yx72IrTL7TwCLcB/s1600/blog.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="354" src="https://2.bp.blogspot.com/-7rGP5vaH7-4/Vy9KWiciBiI/AAAAAAAAEng/Yv_40GxXL28HPxIRtclOP3Yx72IrTL7TwCLcB/s640/blog.png" width="640" /></a></div>
<span style="font-size: 16px;"><span style="font-size: 16px;"><br /></span></span>
<span style="font-size: 16px;"><span style="font-size: 16px;"><br /></span></span>
</div>
<div style="margin-bottom: 0in;">
<span style="font-size: 16px;"><span style="font-size: 16px;"><span style="font-family: "liberation" serif , serif;">Just
create few APIs and try to invoke them in order to get some traffic to generate statistics on graph. So you can see the statistics like this.</span></span></span><br />
<span style="font-size: 16px;"><span style="font-size: 16px;"><span style="font-family: "liberation" serif , serif;"><br /></span></span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-size: 16px;"><span style="font-size: 16px;"><br /></span></span></div>
<div style="margin-bottom: 0in;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-3xx5IhWmnKc/Vy9K1I7xznI/AAAAAAAAEnk/zdvOyNp-XMgja3aczciCDQkDw83kG59JACLcB/s1600/API%2BManager%2B2.0%2Banalytics.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="336" src="https://2.bp.blogspot.com/-3xx5IhWmnKc/Vy9K1I7xznI/AAAAAAAAEnk/zdvOyNp-XMgja3aczciCDQkDw83kG59JACLcB/s640/API%2BManager%2B2.0%2Banalytics.png" width="640" /></a></div>
<span style="font-size: 16px;"><span style="font-size: 16px;"><br /></span></span></div>
<div style="margin-bottom: 0in;">
<span style="font-size: 16px;"><span style="font-size: 16px;"><br /></span></span></div>
<span style="font-size: 16px;"><span style="font-size: 16px;"><br /></span>
</span>
<br />
<div style="margin-bottom: 0in;">
<span style="font-size: 16px;"><span style="font-size: 16px;"><br /></span></span></div>
</div>
<span style="font-size: 16px;">
<span style="font-size: 16px;">
</span></span>
<script src="https://connect.facebook.net/en_US/all.js#appId=153144121431590&xfbml=1">
</script><fb:like font="" href="http://maneeshawijesekara.blogspot.com/2016/05/setup-wso2-api-manager-analytics-100.html" send="false" show_faces="true" width="500"></fb:like>Maneesha Wijesekarahttp://www.blogger.com/profile/04283147149772113205noreply@blogger.com11tag:blogger.com,1999:blog-6455272025469432963.post-39183138378820562342016-04-28T23:18:00.001-07:002016-05-10T10:32:37.867-07:00Real time use cases of Deployment Synchronizer with a WSO2 ESB Cluster – Part 1<span style="font-size: 16px;">
</span>
<div style="line-height: 100%; margin-bottom: 0in;">
<span style="font-size: 16px;">In this blog post I
will explain some of the real time use cases of Deployment
Synchronizer (DepSync) in a WSO2 ESB Cluster environment. If you want
to know more about DepSync follow my <a href="http://maneeshawijesekara.blogspot.com/2016/04/fsfs.html" target="_blank">previous post</a>.</span></div>
<span style="font-size: 16px;">
</span>
<br />
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<span style="font-size: 16px;">Before going further
into the topic I'm going to list down the use cases so anyone can
simply understand the possible scenarios happened here.</span></div>
<span style="font-size: 16px;">
</span>
<br />
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<span style="font-size: 16px;"><span style="line-height: 100%;">1. Create an
artifact using Management console</span></span><br />
<span style="font-size: 16px;"><span style="line-height: 100%;">2. Remove an
artifact using Management console</span></span><br />
<span style="font-size: 16px;"><span style="line-height: 100%;">3. Create and save
an artifact in local repository of the manager node</span></span><br />
<span style="font-size: 16px;"><span style="line-height: 100%;">4. Remove an
artifact in local repository of the manager node</span></span><br />
<span style="font-size: 16px;"><span style="line-height: 100%;">5. Create and save
an artifact in local repository of a worker node</span></span><br />
<span style="font-size: 16px;"><span style="line-height: 100%;">6. Remove an
artifact in local repository of a worker node</span></span></div>
<span style="font-size: 16px;">
</span>
<br />
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<span style="font-size: 16px;"><span style="font-size: large;"><b><br /></b></span>
<span style="font-size: large;"><b>Usecase 1 - Create
an artifact using Management console</b></span></span></div>
<span style="font-size: 16px;">
</span>
<br />
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<span style="font-size: 16px;">In here, I'm going
to create a sample address endpoint and check how the synchronization
process happened in manager and worker nodes.</span></div>
<span style="font-size: 16px;">
</span>
<br />
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<span style="font-size: 16px;">1. Go to management
console of the manager node, select Endpoints under Service Bus.</span></div>
<span style="font-size: 16px;">
</span>
<br />
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<span style="font-size: 16px;">2. Then select 'Add
Endpoint' by choosing 'address endpoint' as the type</span></div>
<span style="font-size: 16px;">
</span>
<br />
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<span style="font-size: 16px;">3. Give a name and
address to the Endpoint and press 'Save and Close'</span></div>
<span style="font-size: 16px;">
</span>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<span style="font-size: 16px;"><br /></span></div>
<span style="font-size: 16px;">
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-3_1bEoqewJY/VyatanWN1uI/AAAAAAAAEmg/8CxcdJ2ZDhMrXqMZSGJOGDXRCRN2hurZwCLcB/s1600/DepSync%2B2%2B-%2BA.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="305" src="https://1.bp.blogspot.com/-3_1bEoqewJY/VyatanWN1uI/AAAAAAAAEmg/8CxcdJ2ZDhMrXqMZSGJOGDXRCRN2hurZwCLcB/s640/DepSync%2B2%2B-%2BA.png" width="640" /></a></div>
<br />
<br />
<br /></div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
Now observe the
terminals of both manager and worker nodes.<br />
<br /></div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<br /></div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<b>Manager Node</b></div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-HcBPgpQEXLc/VyatTr9XtYI/AAAAAAAAEmc/YgJ0aar2vrALC8EMTE9W6RJVoTYBIEijACLcB/s1600/Dep%2BSync%2B2%2B-%2BA1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="28" src="https://4.bp.blogspot.com/-HcBPgpQEXLc/VyatTr9XtYI/AAAAAAAAEmc/YgJ0aar2vrALC8EMTE9W6RJVoTYBIEijACLcB/s640/Dep%2BSync%2B2%2B-%2BA1.png" width="640" /></a></div>
<br /></div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<br /></div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<br /></div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<b>Worker node</b><br />
<b><br /></b></div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<br /></div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-g93F_e89rDw/VyatuCDz4oI/AAAAAAAAEmk/lJYW7Ebx7VgqGhxaafhoJZ6Qt-in_vHrgCLcB/s1600/Dep%2BSync%2B2%2B-%2BA2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="24" src="https://3.bp.blogspot.com/-g93F_e89rDw/VyatuCDz4oI/AAAAAAAAEmk/lJYW7Ebx7VgqGhxaafhoJZ6Qt-in_vHrgCLcB/s640/Dep%2BSync%2B2%2B-%2BA2.png" width="640" /></a></div>
<br /></div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<br /></div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<br /></div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<span style="line-height: 100%;">Once an artifact has
been deployed in central repository (We use a SVN repository),
manager node will send an hazlecast message to the all worker nodes
indicating that the autocommiting of a change has been done. So
worker nodes receive the same hazlecast message ( check messageId )
and the process of checking out (autocheckout) the changes from the
central repository to its local repository happens.</span></div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<br /></div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<br /></div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<span style="font-size: large;"><b>Usecase 2 - Remove
an artifact using Management console</b></span></div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<br /></div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<br />
Same process like
the Usecase 1 happens here. Once an artifact has been removed from
the repository, manager node will commit it in central repository and
parallel send a message to worker nodes to checkout the changes. But
check the below output of the worker node which shows the
undeployment of the removed artifact from its local repository.</div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<br /></div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<b><br /></b>
<b>Worker Node</b></div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-reqXW86CH0g/Vyat2T-1N5I/AAAAAAAAEmo/Xl4ywUN9bvka-FxOacK7WT9rT2i195UVACLcB/s1600/DepSync%2B-%2BA4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="30" src="https://3.bp.blogspot.com/-reqXW86CH0g/Vyat2T-1N5I/AAAAAAAAEmo/Xl4ywUN9bvka-FxOacK7WT9rT2i195UVACLcB/s640/DepSync%2B-%2BA4.png" width="640" /></a></div>
<br />
<br /></div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<br /></div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<span style="font-size: large;"><b>Usecase 3 - Create
and save an artifact in local repository of the manager node</b></span></div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<br /></div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<br />
In this use case I'm
going to save an endpoint manually in the local repository
(<PRODUCT_HOME>/repository/deployment/server/synapse-configs/default)
of the manager node.</div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<br /></div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<br />
Following is the
sample configuration of a proxy which includes a send mediator</div>
<div style="margin-bottom: 0in;">
<div style="font-size: 16px; line-height: 100%;">
<br /></div>
<br /></div>
<div style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #007700"><proxy</span> <span style="color: #0000CC">name=</span><span style="background-color: #fff0f0">"PassTroughTest"</span> <span style="color: #0000CC">startonload=</span><span style="background-color: #fff0f0">"true"</span> <span style="color: #0000CC">trace=</span><span style="background-color: #fff0f0">"disable"</span> <span style="color: #0000CC">transports=</span><span style="background-color: #fff0f0">"http https"</span> <span style="color: #0000CC">xmlns=</span><span style="background-color: #fff0f0">"http://ws.apache.org/ns/synapse"</span><span style="color: #007700">></span>
<span style="color: #007700"><target></span>
<span style="color: #007700"><endpoint></span>
<span style="color: #007700"><address</span> <span style="color: #0000CC">uri=</span><span style="background-color: #fff0f0">"http://10.100.7.11:9768/java_first_jaxws/services/hello_world"</span><span style="color: #007700">></span>
<span style="color: #007700"></address></span>
<span style="color: #007700"></endpoint></span>
<span style="color: #007700"><outsequence></span>
<span style="color: #007700"><send></span>
<span style="color: #007700"></send></outsequence></span>
<span style="color: #007700"></target></span>
<span style="color: #007700"></proxy></span>
</pre></div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<br /></div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<br /></div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
Go to proxy-services
folder of the local repository and create an Xml file with the name
'SamplePassThrough' and save above configuration.</div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<br /></div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
Now we have created
a sample proxy service successfully. Let's check the terminals of
both manager and worker nodes to understand what happened here.</div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<br /></div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<br /></div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<b>Manager Node</b></div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<br /></div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<br /></div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-HGuiZDRWXcI/Vyat-tKytMI/AAAAAAAAEmw/Iv1hodNeI0Mv7cB5BItx3mtySo-szPMAgCLcB/s1600/dd.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="92" src="https://1.bp.blogspot.com/-HGuiZDRWXcI/Vyat-tKytMI/AAAAAAAAEmw/Iv1hodNeI0Mv7cB5BItx3mtySo-szPMAgCLcB/s640/dd.png" width="640" /></a></div>
<br /></div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<br /></div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<br /></div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<span style="line-height: 100%;"><b>Worker Node</b></span></div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<br /></div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<br /></div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-wsLg3qvFRO0/VyauEg18YMI/AAAAAAAAEm0/jn8E3GX3_bgjfFNrQ2XQtkBb9y_hAWuzgCLcB/s1600/dd1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="84" src="https://1.bp.blogspot.com/-wsLg3qvFRO0/VyauEg18YMI/AAAAAAAAEm0/jn8E3GX3_bgjfFNrQ2XQtkBb9y_hAWuzgCLcB/s640/dd1.png" width="640" /></a></div>
<br /></div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<br /></div>
<div style="font-size: 16px; margin-bottom: 0in;">
<span style="line-height: 100%;">As soon as the file
created in the local repository of the manager node, it will auto
commit the new configured artifact in central SVN repository with the
name of the proxy service. Although the message communication </span><span style="line-height: 16px;">happens</span><span style="line-height: 100%;"> after that and worker node </span><span style="line-height: 16px;">receives</span><span style="line-height: 100%;"> the message, checking out from
the Svn repo and deployed the proxy service in local repository of
the each worker node.</span></div>
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
<br /></div>
<br />
<div style="font-size: 16px; line-height: 100%; margin-bottom: 0in;">
I will explain other
3 use cases in my next post. If you have questions, don't hesitate to
drop a comment.</div></br>
</span>
<script src="https://connect.facebook.net/en_US/all.js#appId=153144121431590&xfbml=1">
</script><fb:like font="" href="http://maneeshawijesekara.blogspot.com/2016/04/real-time-use-cases-of-deployment.html" send="false" show_faces="true" width="500"></fb:like>Maneesha Wijesekarahttp://www.blogger.com/profile/04283147149772113205noreply@blogger.com0tag:blogger.com,1999:blog-6455272025469432963.post-76780970603217229902016-04-24T02:01:00.001-07:002016-05-10T10:37:09.342-07:00Use SVN Deployment Synchronizer to sync artifacts in multiple nodes of a WSO2 cluster<span style="font-size: 16px;">
Deployment Synchronizer has the ability to sync deployed artifacts in a multiple nodes cluster as soon as the deployment happened. It's necessary to have the same configuration among each node of the cluster since the whole mechanism is to work as a single system (virtually). If a particular node doesn't have the same configuration like the rest of the nodes, it breaks the clustering model. As an example if a proxy service which doesn't include in Node 1, has been invoked through the load balancer and it won't fulfill the work division among nodes as it intended to be.<br /><br />
WSO2 products use SVN (SubVersioN) deployment synchronizer in order to have the syncing process of deployed artifacts like endpoints, proxy services, sequences and etc. The Subversion repository is used to sync the contents in the local sync directory (the axis2 repo directory, <product_home>/repository/deployment/server, by default). <br /><br />
Now let's see how to setup the SVN DepSync repository with WSO2 products. Before going further into setup, first of it's necessary to select the suitable SVN version. It's advised to only select SVN version 1.7 or 1.8 for the products based on Carbon 4.4.x ( if you're using products based on Carbon 4.2.x and below, please use only SVN version 1.6 ). <br /><br />
Following files needed to be downloaded and save in the product environment to continue with SVN Dep Sync configuration.</product_home></span><br />
<span style="font-size: 16px;"><product_home><br /></product_home></span>
<br />
<ul>
<li style="font-size: 16px;"><span style="font-size: 16px;">Download <a href="http://dist.wso2.org/tools/svnkit-1.3.9.wso2v2.jar">SVNKit</a> from <a href="http://dist.wso2.org/tools/svnkit-1.3.9.wso2v2.jar">here</a> and save it into the <product_home><PRODUCT_HOME>/repository/components/dropins folder. </product_home></span></li>
</ul>
<ul><span style="font-size: 16px;">
<li><span style="font-size: 16px;">In order to function the SVNKit properly, download </span><a href="http://maven.wso2.org/nexus/content/groups/wso2-public/com/trilead/trilead-ssh2/1.0.0-build215/trilead-ssh2-1.0.0-build215.jar" style="font-size: 16px;">trilead-ssh2-1.0.0-build215.jar</a><span style="font-size: 16px;"> file from </span><a href="http://maven.wso2.org/nexus/content/groups/wso2-public/com/trilead/trilead-ssh2/1.0.0-build215/trilead-ssh2-1.0.0-build215.jar" style="font-size: 16px;">here</a><span style="font-size: 16px;"> and save it in <PRODUCT_HOME></span><product_home style="font-size: 16px;">/repository/components/lib folder. </product_home></li>
</span></ul>
<span style="font-size: 16px;">
<product_home style="font-size: 16px;"><product_home><br />
After completing the pre-requesties, let's move to configure DepSync on manager and worker nodes. </product_home></product_home></span><br />
<span style="font-size: 16px;"><product_home style="font-size: 16px;"><product_home><br /></product_home></product_home></span>
<span style="font-size: 16px;"><product_home style="font-size: 16px;"><product_home>Deployment synchronizer configuration done in <product_home>/repository/conf/carbon.xml file and go to <DeploymentSynchronizer> sub section </product_home></product_home></product_home></span><span style="font-size: 16px;">in carbon.xml</span><deploymentsynchronizer style="font-size: 16px;"> to make necessary changes.</deploymentsynchronizer><br />
<span style="font-size: 16px;"><product_home style="font-size: 16px;"><product_home><product_home><deploymentsynchronizer><br />
</deploymentsynchronizer></product_home></product_home></product_home></span>
<br />
<span style="font-size: large;"><b>Steps to Enable DepSync on the manager node</b></span><br />
<br />
<ul>
<li><span style="font-size: 16px;">To enable the Deployment synchronizer, the value should be set to 'true' for <b><Enabled></b> </span><enabled style="font-size: 16px;">tag </enabled></li>
<li><enabled style="font-size: 16px;">Since manager node responsible for receiving server requests and committing changes in local repository to central repository, the value for <autocommit><b><AutoCommit> </b>should be 'true' </autocommit></enabled></li>
<li><enabled style="font-size: 16px;"><autocommit><autocheckout><b><AutoCheckout> </b>value should changed to 'true'. </autocheckout></autocommit></enabled><span style="font-size: 16px;">Once changes are committed in central repository, it should automatically checked out them to local repository of the node. </span></li>
<li><enabled style="font-size: 16px;"><autocommit><autocheckout>We're using Subversion as repository type here :<br /><b><RepositoryType>svn</b></autocheckout></autocommit></enabled><b style="font-size: 16px;"></RepositoryType></b></li>
<li><enabled style="font-size: 16px;"><autocommit><autocheckout>Location of the SVN repository should be specify:<br /><b><SvnUrl>https://svn.example.org/depSync</b></autocheckout></autocommit></enabled><b style="font-size: 16px;"></SvnUrl></b></li>
<li><enabled style="font-size: 16px;"><autocommit><autocheckout><svnuser><svnpassword><b><SvnUsername> </b>and <b><SvnPassword></b> must specified with the Username and password of SVN repository respectively.
If the tenant specific configuration has to be made, set the value for <svnurlappendtenantid> to 'true'. </svnurlappendtenantid></svnpassword></svnuser></autocheckout></autocommit></enabled></li>
</ul>
<span style="font-size: 16px;"><enabled><autocommit><autocheckout><svnuser><svnpassword><svnurlappendtenantid><br />
That's it with the manager node configuration. So the manager node deployment synchronization configuration should looks like this,
<br />
</svnurlappendtenantid></svnpassword></svnuser></autocheckout></autocommit></enabled></span><br />
<div style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #007700"><DeploymentSynchronizer></span>
<span style="color: #007700"><Enabled></span>true<span style="color: #007700"></Enabled></span>
<span style="color: #007700"><AutoCommit></span>true<span style="color: #007700"></AutoCommit></span>
<span style="color: #007700"><AutoCheckout></span>true<span style="color: #007700"></AutoCheckout></span>
<span style="color: #007700"><RepositoryType></span>svn<span style="color: #007700"></RepositoryType></span>
<span style="color: #007700"><SvnUrl></span>https://svn.example.com/depsync.repo/<span style="color: #007700"></SvnUrl></span>
<span style="color: #007700"><SvnUser></span>rep1<span style="color: #007700"></SvnUser></span>
<span style="color: #007700"><SvnPassword></span>reppass<span style="color: #007700"></SvnPassword></span>
<span style="color: #007700"><SvnUrlAppendTenantId></span>true<span style="color: #007700"></SvnUrlAppendTenantId></span>
<span style="color: #007700"></DeploymentSynchronizer></span>
</pre></div>
<span style="font-size: 16px;"><br />
Now move to worker node configuration. <br /><br />
</span><br />
<h2>
<span style="font-size: large;"><b>Steps to Enable DepSync on the worker nodes</b></span></h2>
<span style="font-size: 16px;">
<br />
Worker node has the same configuration for DepSync like the manager node except the usage of </span><b style="font-size: 16px;"><AutoCommit></b><span style="font-size: 16px;">. Since worker node doesn't receive any server requests to be handled and the committing part isn't associated with worker nodes, </span><b style="font-size: 16px;"><AutoCommit> </b><span style="font-size: 16px;">value set to be 'false'.
This is the DepSync configuration for Worker nodes.</span><br />
</br>
<div style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #007700"><DeploymentSynchronizer></span>
<span style="color: #007700"><Enabled></span>true<span style="color: #007700"></Enabled></span>
<span style="color: #007700"><AutoCommit></span>false<span style="color: #007700"></AutoCommit></span>
<span style="color: #007700"><AutoCheckout></span>true<span style="color: #007700"></AutoCheckout></span>
<span style="color: #007700"><RepositoryType></span>svn<span style="color: #007700"></RepositoryType></span>
<span style="color: #007700"><SvnUrl></span>https://svn.example.com/depsync.repo/<span style="color: #007700"></SvnUrl></span>
<span style="color: #007700"><SvnUser></span>rep1<span style="color: #007700"></SvnUser></span>
<span style="color: #007700"><SvnPassword></span>reppass<span style="color: #007700"></SvnPassword></span>
<span style="color: #007700"><SvnUrlAppendTenantId></span>true<span style="color: #007700"></SvnUrlAppendTenantId></span>
<span style="color: #007700"></DeploymentSynchronizer></span>
</pre></div>
<span style="font-size: 16px;">
<br /><br />
So that's it about how to configure deployment synchronizer in a clustered environment. I will discuss about some of the use cases of DepSync in my upcoming posts.<br /><br />
</span>
<script src="https://connect.facebook.net/en_US/all.js#appId=153144121431590&xfbml=1">
</script><fb:like font="" href="http://maneeshawijesekara.blogspot.com/2016/04/fsfs.html" send="false" show_faces="true" width="500"></fb:like>Maneesha Wijesekarahttp://www.blogger.com/profile/04283147149772113205noreply@blogger.com1tag:blogger.com,1999:blog-6455272025469432963.post-26622404684179344912016-04-23T23:08:00.001-07:002016-05-10T10:37:25.137-07:00How to create a custom log for a proxy service in WSO2 ESB<span style="font-size: 16px;">
Log files are vital to identifying any associated errors, security threats and sequence of service execution while using WSO2 carbon products. Usually application and other service logs are write into server logs but if you want to have a separate log for a particular service, you just need to simply add few lines to log4j.properties file. So with that in mind I will explained how to create a customized log file for a particular proxy service using wso2 Enterprise Service Bus.
<br />
<br />
First open log4j.properties file ( <esb_home>/repository/conf/log4j.properties ) and simply add the following entry.
</esb_home><br />
</span><br />
<div style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%">log4j.category.SERVICE_LOGGER.TestLogProxy=INFO, PROXY_APPENDER
log4j.additivity.PROXY_APPENDER=false
log4j.appender.PROXY_APPENDER=org.apache.log4j.DailyRollingFileAppender
log4j.appender.PROXY_APPENDER.File=${carbon.home}/repository/logs/${instance.log}/testlogproxy${instance.log}.log
log4j.appender.PROXY_APPENDER.Append=true
log4j.appender.PROXY_APPENDER.layout=org.apache.log4j.PatternLayout
log4j.appender.PROXY_APPENDER.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%X{ip}-%X{host}] [%t] %5p %c{1} %m%
</pre></div>
<span style="font-size: 16px;">
<br />
<br />
In here, 'TestLogProxy' is the name of the proxy service. You can define a location as the value for 'log4j.appender.PROXY_APPENDER.File' property. I have used default path for logs ( ${carbon.home}/repository/logs/) in here.
<br />
<br />
Then create a proxy service with log mediator ( log category – Info and log level – Full ) and add a send mediator with a service endpoint. You can see the customized log file under specified log path and logs for the 'TestLogProxy' will be logged in this file.
</span>
<script src="https://connect.facebook.net/en_US/all.js#appId=153144121431590&xfbml=1">
</script><fb:like font="" href="http://maneeshawijesekara.blogspot.com/2016/04/how-to-create-custom-log-for-proxy.html" send="false" show_faces="true" width="500"></fb:like>Maneesha Wijesekarahttp://www.blogger.com/profile/04283147149772113205noreply@blogger.com0