Wednesday, June 6, 2018

Routing and forcing HTTP request and URL to HTTPS in Azure app service

If you have a REST server it is mandatory to have some standard security in place. The first and foremost security is connection to your REST services and APIs. Basic is make it HTTPS. Now as it is an web service usually it has HTTP on it. You can stop it by blocking the port 80 which is not OK in case you are doing scale up and scale down of your service. So what to chose?

Easy way is to use the web.conf  file in the Azure application services wwwroot directory as a place.
Just put the following texts on the wwwroot/web.conf file and restart the service.

<?xml version="1.0" encoding="UTF-8"?>
        <!-- BEGIN rule TAG FOR HTTPS REDIRECT -->
        <rule name="Force HTTPS" enabled="true">
          <match url="(.*)" ignoreCase="false" />
            <add input="{HTTPS}" pattern="off" />
          <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" appendQueryString="true" redirectType="Permanent" />
        <!-- END rule TAG FOR HTTPS REDIRECT -->

Web services not running on Azure suddenly with error '-2147023436'

Suddenly on 06/06/2018 around 7:20am UTC), our Azure application services stopped running.  We were seeing the following error:

Process '5324' failed to start.
Port = 29399
Error Code = '-2147023436'.

Restarting the services doesn't help.

Error on eventlog.xml dumped as -

            <Provider Name="HttpPlatformHandler"/>
            <TimeCreated SystemTime="2018-06-06T01:35:40Z"/>
            <Data>Process '3408' failed to start. Port = 14790, Error Code = '-2147023436'.</Data>
We spend over 8 hours to figure out the issue as we have few live company on the service as a customer. It was hail storm. But whatever, I was able to find the root cause and it seems like it is the issue of Microsoft Azure services itself. Reason was they have updated their app services to work with only newest jetty for web container and minor java version to newest as must requirement. And no notification for that change.

So if you ever face this issue please go to the application setting from the and set the recommended setting that I have mentioned.

Thursday, May 19, 2016

Building and installing python3.x with python2.x in Linux

RHEL 6.x doesn't comes with python3. So if any of your project require python3 and also some of the projects need python2 then you may need those 2 version same time in your system.

gcc (C89)/g++

1. Download python3.x package from
2. Extract it and move inside the package python-3.4.3
$ cd /python-3.4.3
3. Open a console and run the following configure command. We will build python with shared library support as many of the other project will require python3 dynamic library linking.

so, configure it by,
$ ./configure --prefix=/opt/python3 --enable-shared

We are putting build output directory as /opt/python3.

4. After completion now build it by,

$ make
 5. Then install it by alternate installation by,
$ make altinstall

6. Now create a symlink of the newly created python3 binary and copy the shared library to the /lib64/ directory of filesystem.
$ ln -s /opt/python3/bin/python3.4 /usr/bin/python3
$ cp /opt/python3/libpython3.* /lib64/
7.  Now run python script by,
 $ python3
And your python2 is also ok and usable!

Tuesday, May 10, 2016

Various address reachability scope on IPv6 network

IPv6 comes with various IP address terminology which can be assign to a system. Lets simply clarify their name and scope of reachability respect to IPv6.

 In general it has four address type one of which is depreciated by RFC standard.

1. Link Local Address (LLA)
Description: Link-local address can be access in directly connected router. Its basically same as IPv4 private address. 
2. Unique Local Address (ULA)
Description:Unique Local Address(ULA), they will often be advertised by IPv6 home gateways for subscriber local use only, and won't be reachable anywhere outside the home. Unique Local Address (ULA), which is an address that is used for local communication in a site – within a company, within a campus or within a set of networks in branch offices.

3. Site Local Address
Description: Deprecated.

4. Global Unicast Address
Description: Global unicast address is basically reachable from anywhere in internet. IPv6 unicast global addresses are similar to IPv4 public addresses.

Saturday, April 23, 2016

[MySql] relocation error: /usr/lib64/ symbol strmov, version libmysqlclient_16 not defined

When using myDSN and connection to remote DB(MySQL) this issue arise.


: relocation error: /usr/lib64/ symbol strove  version libmysqlclient_16 not defined in file with link time reference


this is an issue of back dated odbc-connector. You can check by systems' isql command that it's also returning same error. It's happen when there is a mismatch between the version of, 



Download and install mysql-connector-odbc-5.3.4-1.el6.x86_64.rpm by,

rpm -Uvh mysql-connector-odbc-5.3.4-1.el6.x86_64.rpm

And after that change the following file,

$ vi /etc/odbcinst.ini

Description             = ODBC for MySQL
Driver          = /usr/lib64/
Setup           = /usr/lib64/
Driver64                = /usr/lib64/
Setup64         = /usr/lib64/
FileUsage               = 1

[MySQL ODBC 5.3 Unicode Driver]
Driver          = /usr/lib64/
UsageCount              = 1

[MySQL ODBC 5.3 ANSI Driver]
Driver          = /usr/lib64/
UsageCount              = 1