Hello PrashanthK. It seems more likely a mutual SSL issue, as you mentioned that you're trying to use the IP address instead of the hostname. For the mutual SSL to work, you will need to match the same hostname or IP address, used as your gateway (MAG Server) certificate. If you defined it as a hostname, than use a hostname. If you defined as an IP, then use its IP address.
Make sure you open up your policy manager and check the gateway's SSL certificate. This is the one you need to export and use inside your config file.
An off-topic question. Why are you using a such old version of MAG? We are at MAG 3.2 currently with plenty of new features to make the mobile developer's life so much easier