<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Nirodha Pramod on Medium]]></title>
        <description><![CDATA[Stories by Nirodha Pramod on Medium]]></description>
        <link>https://medium.com/@nirodhapramod?source=rss-81b2df71651f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*NA1dUTwyiGrJfq-V.</url>
            <title>Stories by Nirodha Pramod on Medium</title>
            <link>https://medium.com/@nirodhapramod?source=rss-81b2df71651f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 08:39:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nirodhapramod/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[[WSO2 ESB] Using Secure vault to store passwords securely in your synapse configuration]]></title>
            <link>https://medium.com/nirodha/wso2-esb-using-secure-vault-to-store-passwords-securely-in-your-synapse-configuration-64a40521935b?source=rss-81b2df71651f------2</link>
            <guid isPermaLink="false">https://medium.com/p/64a40521935b</guid>
            <dc:creator><![CDATA[Nirodha Pramod]]></dc:creator>
            <pubDate>Thu, 15 Oct 2015 09:43:00 GMT</pubDate>
            <atom:updated>2017-11-29T13:17:21.842Z</atom:updated>
            <content:encoded><![CDATA[<p>When you are using WSO2 ESB to do some mediation there come the times that you have to send user credentials to the backend services for authentication and authorization purposes. In that case, you have to store the usernames and passwords in your synapse configuration. One problem of that approach is that other people get to see the credentials which is not very secured.</p><p>To overcome that issue you can use the secure vault feature in ESB. What happens there is, first you create a registry entry for your password with an alias for the password. In the registry the password is NOT stored in plain text, but encrypted using the certificate in wso2carbon.jks file. This entry is stored as a property under the location<strong> /_system/config/repository/components/secure-vault </strong>in the registry. Then in your synapse configuration you use the alias instead of the password, and use a custom xpath expression to lookup for the password from the registry and decode it before sending it to the endpoint.</p><p>First of all you need to configure the ciphering part. For that you need configure the ‘repository/conf/security/secret-conf.properties’ file and add the following.</p><pre>keystore.identity.location=&lt;ESB_HOME_Absolute_path&gt;/repository/resources/security/wso2carbon.jks<br>keystore.identity.type=JKS<br>keystore.identity.store.password=identity.store.password<br>keystore.identity.store.secretProvider=org.wso2.carbon.securevault.DefaultSecretCallbackHandler<br>secretRepositories.file.provider=org.wso2.securevault.secret.repository.FileBaseSecretRepositoryProvider<br>secretRepositories.file.location=repository/conf/security/cipher-text.properties<br>secretRepositories=file<br>keystore.identity.key.password=identity.key.password<br>carbon.secretProvider=org.wso2.securevault.secret.handler.SecretManagerSecretCallbackHandler<br>keystore.identity.key.secretProvider=org.wso2.carbon.securevault.DefaultSecretCallbackHandler<br>keystore.identity.alias=wso2carbon</pre><p>Restart the ESB server if you have already started it. Log in, and go to the “Manage Passwords” link under the “Secure Vault Tool” entry in the left hand menu. In that page you can create a new password (or username) entry in the registry by providing a key(alias) and the actual password. Then your password will be stored in the registry encrypted with the key in wso2carbon.jks .</p><p>Now setting up the alias is done, let’s see how to retrieve it in your synapse configuration. You can use the custom xpath expression called “wso2:vault-lookup(‘alias’)” to retrieve the decrypted password mapping to the alias. See the example given below.</p><pre>&lt;property name=&quot;Sec_Password&quot; expression=&quot;wso2:vault-lookup(&#39;pass&#39;)&quot;/&gt;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=64a40521935b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nirodha/wso2-esb-using-secure-vault-to-store-passwords-securely-in-your-synapse-configuration-64a40521935b">[WSO2 ESB] Using Secure vault to store passwords securely in your synapse configuration</a> was originally published in <a href="https://medium.com/nirodha">nirodha</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Integrating WSO2 BAM with WSO2 API Manager for API stat collection]]></title>
            <link>https://medium.com/nirodha/integrating-wso2-bam-with-wso2-api-manager-for-api-stat-collection-a82c5eaae0dc?source=rss-81b2df71651f------2</link>
            <guid isPermaLink="false">https://medium.com/p/a82c5eaae0dc</guid>
            <dc:creator><![CDATA[Nirodha Pramod]]></dc:creator>
            <pubDate>Fri, 15 Feb 2013 05:35:00 GMT</pubDate>
            <atom:updated>2017-11-29T13:17:23.937Z</atom:updated>
            <content:encoded><![CDATA[<p>WSO2 API Manager is the only open source and production ready API management middleware you can find at present. Just after a month of the release of AM 1.0.0 (in Aug 2012) it was deployed and launched in one of the biggest companies in US, as their API management platform. You can get more details about WSO2 AM from <a href="http://wso2.com/products/api-manager/">here</a>. <br><br>In API management we basically create APIs and publish them to a store so the registered users can subscribe to those APIs and use them directly or inside their Applications to get some functionality done. Other than that in business and publisher’s perspective it is really important to know statistics such as how many subscribers are using API ‘X’, what number of invocations coming for API ‘Y’, in which time period a peak load is coming to the API ‘Z’ etc.<br><br> Yes, WSO2 AM supports that sort of stat collection with the integration of WSO2 Business Activity Monitor (BAM). I’m going to explain here what are the few configuration changes you have to do in order to get WSO2 BAM fitted in this picture, specially when having port offsets. <br><strong><br>Pre-requisites</strong><br><br>1. Download WSO2 AM binary zip from <a href="http://wso2.com/products/api-manager/">here</a> and unzip it. Lets call the unzipped directory .<br>2. Download WSO2 BAM binary zip from <a href="http://wso2.com/products/business-activity-monitor/">here</a> and unzip it. Lets call the unzipped directory .<br>(Note that I am using WSO2 AM 1.3.0 and WSO2 BAM 2.0.1 for this but hopefully the following steps will work for later versions as well)<br><br><strong>API Manager configuration</strong><br><br>OK!! Lets start configuring the API Manager first. Assuming we are running both AM and BAM servers in the same machine (or VM), first we need to set port offset values otherwise when both servers are starting with default ports in the same machine you will see port conflict errors. (By setting an offset value all the default port allocations will be increased by the given value. I will be giving value 1 for AM and 2 for BAM as offsets)<br><br><strong>1.</strong> Go to /repository/conf/carbon.xml and change the offset value to 1.<br><strong>2.</strong> Go to /repository/conf/api-manager.xml and change the configuration as following.</p><pre>false<br>    org.wso2.carbon.apimgt.usage.publisher.APIMgtUsageDataBridgeDataPublisher<br>    7613<br>    tcp://localhost:7613/<br>    admin<br>    admin<br>    jdbc/WSO2AM_STATS_DB<br>    <br>       false<br>       UA-XXXXXXXX-X</pre><p>Note that AM uses Thrift messaging to communicate usage data to BAM. Since we are going to set the offset in BAM to 2 we need to increase ThriftPort value by 2 (7612 -&gt; 7614). Also we need to uncomment the property.<br><br><strong>3. </strong>Now go to /repository/conf/datasources/master-datasources.xml and edit the ‘WSO2AM_STATS_DB’ datasource as following. Replace with your absolute path to the BAM installation directory.</p><pre>WSO2AM_STATS_DB<br>            The datasource used for getting statistics to API Manager<br>            <br>                jdbc/WSO2AM_STATS_DB<br>            <br>            &lt;definition type=&quot;RDBMS&quot;&gt;<br>                <br>                    jdbc:h2:/repository/database/APIMGTSTATS_DB;AUTO_SERVER=TRUE<br>                    wso2carbon<br>                    wso2carbon<br>                    org.h2.Driver<br>                    50<br>                    60000<br>                    true<br>                    SELECT 1<br>                    30000</pre><p>This ‘APIMGTSTATS_DB’ in BAM is used to store the summerized stat data of AM. AM will fetch data from this database for presentation.</p><p><strong>BAM configuration</strong></p><p><strong>1.</strong> Go to /repository/conf/carbon.xml and change the offset value to 2.<br><strong>2. </strong>Now go to /repository/conf/datasources/master-datasources.xml and add the following config for ‘WSO2AM_STATS_DB’ datasource same as we did in AM. Replace with your absolute path to the BAM installation directory.</p><pre>WSO2AM_STATS_DB<br>            The datasource used for getting statistics to API Manager<br>            <br>                jdbc/WSO2AM_STATS_DB<br>            <br>            &lt;definition type=&quot;RDBMS&quot;&gt;<br>                <br>                    jdbc:h2:/repository/database/APIMGTSTATS_DB;AUTO_SERVER=TRUE<br>                    wso2carbon<br>                    wso2carbon<br>                    org.h2.Driver<br>                    50<br>                    60000<br>                    true<br>                    SELECT 1<br>                    30000</pre><p><strong>3.</strong> Now configuration changes are done. But still BAM will not be collecting data from AM. For that we need to run an Analytics script inside BAM. You have to copy /statistics/API_Manager_Analytics.tbox into /repository/deployment/server/bam-toolbox directory.</p><p>Configurations are DONE!!! Now start AM and BAM servers separately.</p><p>Oh Wait!!! Did you happen to see this error in BAM after server started.</p><p>ERROR {org.apache.hadoop.hive.cassandra.CassandraProxyClient} — Error while trying to connect to cassandra host:127.0.0.1<br>org.apache.hadoop.hive.cassandra.CassandraException: unable to connect to server<strong><br></strong><br>Let’s solve that as well. As I said earlier we need an analytics script to be run in BAM to collect data from AM. That script is written with the assumption that BAM will be run with the port offset 1. Therefore in the script it has mentioned the cassandra port as 9161 (cassandra default port 9160 + 1). Since we increased the BAM offset to 2 we need to change the cassandra port to 9162. For that you need to go to BAM management console (https://localhost:9445/carbon/) and login with admin credentials. And then from the left side menu go to Main -&gt; Manage -&gt; Analytics -&gt; List page. Now go to Edit page of am_stats_analyzer_451 script. Do a search for all 9161 and replace it with 9162 and save it. You won’t see that error anymore.</p><p>Now you will be able to see the API Usage statistics through the API Publisher in WSO2 AM. See <a href="http://docs.wso2.org/wiki/display/AM120/Viewing+API+Statistics">http://docs.wso2.org/wiki/display/AM120/Viewing+API+Statistics</a> for more details on viewing statistics.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a82c5eaae0dc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nirodha/integrating-wso2-bam-with-wso2-api-manager-for-api-stat-collection-a82c5eaae0dc">Integrating WSO2 BAM with WSO2 API Manager for API stat collection</a> was originally published in <a href="https://medium.com/nirodha">nirodha</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[Solved] ORA-12519, TNS:no appropriate service handler found]]></title>
            <link>https://medium.com/nirodha/solved-ora-12519-tns-no-appropriate-service-handler-found-8b7f19e5318c?source=rss-81b2df71651f------2</link>
            <guid isPermaLink="false">https://medium.com/p/8b7f19e5318c</guid>
            <dc:creator><![CDATA[Nirodha Pramod]]></dc:creator>
            <pubDate>Mon, 06 Aug 2012 05:13:00 GMT</pubDate>
            <atom:updated>2017-11-29T13:17:24.907Z</atom:updated>
            <content:encoded><![CDATA[<p>You might have come across this Oracle error while working with you database app connected to a Oracle 10g XE database.</p><p>ORA-12519, TNS:no appropriate service handler found</p><p>java.sql.SQLException: Listener refused the connection with the following error:</p><p>ORA-12519, TNS:no appropriate service handler found</p><p>at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:113)</p><p>at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:263)</p><p>at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:389)</p><p>at oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java:454)</p><p>at oracle.jdbc.driver.T4CConnection.(T4CConnection.java:165)</p><p>at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)</p><p>at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:802)</p><p>This is how to get rid of it. Open the sqlplus command line and set the processes and scope values as below. (and restart Oracle)</p><p>ALTER SYSTEM SET PROCESSES=150 SCOPE=SPFILE;</p><p>That’s it!!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8b7f19e5318c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nirodha/solved-ora-12519-tns-no-appropriate-service-handler-found-8b7f19e5318c">[Solved] ORA-12519, TNS:no appropriate service handler found</a> was originally published in <a href="https://medium.com/nirodha">nirodha</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to run Jmeter tests in non-GUI mode, automated with a shell script]]></title>
            <link>https://medium.com/nirodha/how-to-run-jmeter-tests-in-non-gui-mode-automated-with-a-shell-script-258f836a4ead?source=rss-81b2df71651f------2</link>
            <guid isPermaLink="false">https://medium.com/p/258f836a4ead</guid>
            <dc:creator><![CDATA[Nirodha Pramod]]></dc:creator>
            <pubDate>Fri, 22 Jun 2012 07:17:00 GMT</pubDate>
            <atom:updated>2017-11-29T13:17:23.026Z</atom:updated>
            <content:encoded><![CDATA[<p>Apache Jmeter is a great versatile tool for performance testing of web servers, DBMS servers etc. It’s a pure Java application where you can use even your own Java code to customize and randomize your tests. My intention of this post is not to tell you about all of those features, but one such cool feature of Jmeter which is running Jmeter tests in non-GUI mode.</p><p>If you have worked with Jmeter you surely should have experienced that sometimes it get stuck or crashes while you are doing high concurrency (&gt; 300) load testing. One solution for this is to create your test using the GUI and save it as a ‘.jmx’ file and later run that in <strong>non-GUI mode</strong> and save the test results to a ‘.jtl’ file. In that way you will be able to carry out your load test without crashing or maybe with more concurrency.</p><p>OKEY….. This is how to do it.</p><p>1. First prepare your test plan with Jmeter and save it, let’s say the file name is ‘mytest.jmx’. (It gets saved as a xml configuration file with the .jmx extention).</p><p>2. Then go to Apache JMETER_HOME/bin folder using command shell. And then run Jmeter with the following parameters, to execute the test.</p><p>./jmeter -n -t \absolute_path\mytest.jmx -l \absolute_path\mytest_results.jtl</p><p>3. While the test is running the results will be saved in the ‘mytest_results.jtl’. When your test is complete you can open this jtl file in Jmeter and summarize the results or create graphs using it.<br>To do that open Jmeter and add a Summary Report to the test plan (Add → Listener → Summary Report). And then go to the Summary Report UI and ‘Browse’ and open your mytest_results.jtl file.</p><p>OK…..next comes the real headache :-). Let’s say you have to repeat the above test several times with small changes to the test. I actually had a requirement at my work to repeat the same Jmeter test with different concurrency levels and number of loops.<br>The hard way to do this is create separate test scripts for different concurrency levels using the GUI and run them separately as above.<br>A less hard way to do this is open the test file (.jmx) using a text editor and change the values every time you repeat the test, in the ThreadGroup element in the test configuration(as below), and run the same file.</p><p>continue</p><p>false<br><strong>1000</strong></p><p><strong>300</strong><br>1<br>1339414812000<br>1339414812000<br>false</p><p>OK…. But why not automate the above ‘less hard way’ and make your life easy..<br>If you are a shell scripting master this is a “few lines” work, but since I’m not, this is how I did it.</p><p>#!/bin/bash</p><p>i=0</p><p>conc[0]=50<br>conc[1]=100<br>conc[2]=250<br>conc[3]=500<br>conc[4]=750<br>conc[5]=1000<br>conc[6]=1250</p><p>loop[0]=5000<br>loop[1]=2500<br>loop[2]=1000<br>loop[3]=500<br>loop[4]=334<br>loop[5]=250<br>loop[6]=200</p><p>cd ./jmx<br>while test $i != 7<br>do<br>sed ‘s/_loop_/’${loop[$i]}’/g’ mytest.jmx &gt; ./jmtest.jmx<br>sed ‘s/_con_/’${conc[$i]}’/g’ jmtest.jmx &gt; jmtest_${conc[$i]}.jmx<br>rm jmtest.jmx<br>cd ../apache-jmeter-2.6/bin/<br>./jmeter -n -t ../../jmx/jmtest_${conc[$i]}.jmx -l ../../jtl/results_${conc[$i]}.jtl<br>i=`expr $i + 1`<br>cd ../../jmx<br>done</p><p>For newbies like me, I will explain the script briefly.</p><p>For this script to work first you should do a small change to your Jmeter test configuration. You have to give a variable string for num_threads and loop instead of actual values, as below.</p><p>continue</p><p>false<br><strong>_loop_</strong></p><p><strong>_con_</strong><br>1<br>1339414812000<br>1339414812000<br>false</p><p>In the shell script, first I put the concurrency values and loop values in to 2 different arrays.<br>And then using a while loop I edit the concurrency and loop values in Jmeter test script for each time I have to repeat the test. I have used <strong>sed </strong>command for that. It searches for the <strong>_loop_ </strong>and <strong>_con_ </strong>strings in the Jmeter script and will replace it with the corresponding values in above two arrays.<br>Then inside the loop, changed Jmeter script is executed (for the number of times the while loop is run) in non GUI mode and results are saved in different jtl files.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=258f836a4ead" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nirodha/how-to-run-jmeter-tests-in-non-gui-mode-automated-with-a-shell-script-258f836a4ead">How to run Jmeter tests in non-GUI mode, automated with a shell script</a> was originally published in <a href="https://medium.com/nirodha">nirodha</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to install Oracle XE 10g on Ubuntu 10.04 64bit]]></title>
            <link>https://medium.com/nirodha/how-to-install-oracle-xe-10g-on-ubuntu-10-04-64bit-38f2d4ac87e0?source=rss-81b2df71651f------2</link>
            <guid isPermaLink="false">https://medium.com/p/38f2d4ac87e0</guid>
            <dc:creator><![CDATA[Nirodha Pramod]]></dc:creator>
            <pubDate>Sat, 19 May 2012 11:29:00 GMT</pubDate>
            <atom:updated>2017-11-29T13:17:20.854Z</atom:updated>
            <content:encoded><![CDATA[<p>Once I had a hard time installing Oracle XE -10g on Ubuntu 64bit machine. Since there is no 64bit version of Oracle-XE 10g we have to add some extra lib’s for Oracle to work. Following are the steps to install.</p><p>1) Download <a href="http://oss.oracle.com/debian/dists/unstable/non-free/binary-i386/oracle-xe-universal_10.2.0.1-1.1_i386.deb">oracle-xe-universal_10.2.0.1–1.1_i386.deb</a> from here.</p><p>2) Download <a href="http://oss.oracle.com/debian/dists/unstable/main/binary-i386/libaio_0.3.104-1_i386.deb">libaio_0.3.104–1_i386.deb</a> lib package from here.</p><p>3) In command line terminal go to the directory where above 2 files are downloaded.</p><p>4) Type : <strong>sudo apt-get install bc</strong></p><p>5) Then force to install the library : <strong>dpkg -i — force-architecture libaio_0.3.104–1_i386.deb</strong></p><p>6) Force to install Oracle XE : <strong>dpkg -i — force-architecture oracle-xe-universal_10.2.0.1–1.1_i386.deb</strong></p><p>7) After the installation is complete you need to configure the setup : <strong>sudo /etc/init.d/oracle-xe configure</strong></p><p>— While configuring you will be asked to assign the port numbers (default port numbers are prompted you can give the same).</p><p>— You will be asked to set a password for SYS and SYSTEM. <strong>Never ever</strong> give the password as <strong>“admin” </strong>you will not be able to log in after oracle is started.</p><p>(It was the lesson I learned after struggling couple of hours, interesting that oracle doesn’t support the password ‘admin’ :-) ).</p><p><strong>Remember to give a password with more than 8 characters.</strong></p><p>8) After configuration is complete you have to set environment variables for Oracle.</p><p>— Open your bashrc : <strong>sudo gedit /etc/bash.bashrc</strong></p><p>— And add the following variables and save the file :</p><p>ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server</p><p>PATH=$PATH:$ORACLE_HOME/bin<br>export ORACLE_HOME<br>export ORACLE_SID=XE export PATH</p><p>9) It’s done!! Now, to start the server : <strong>sudo /etc/init.d/oracle-xe start </strong>(you can use start, restart, stop arguments also)</p><p>10) To start with ‘sqlplus’ enter the following in command line: <strong>sqlplus sys as sysdba</strong></p><p>Or you can go to the admin console from the browser: <a href="http://127.0.0.1:8080/apex">http://127.0.0.1:8080/apex</a></p><p>— — — —</p><p>11) If you want to completely remove oracle : <strong>sudo dpkg -P oracle-xe-universal</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=38f2d4ac87e0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nirodha/how-to-install-oracle-xe-10g-on-ubuntu-10-04-64bit-38f2d4ac87e0">How to install Oracle XE 10g on Ubuntu 10.04 64bit</a> was originally published in <a href="https://medium.com/nirodha">nirodha</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>