Skip to Content

The problem


So you’re at home wanting to access your company’s SAP HANA system, of from your office, trying to reach an SAP HANA system at your customer. You connect to your company’s network using VPN client software.

Then you open the SAP HANA Studio and notice that there’s an odd icon near your system’s connection and when you hover your mouse over the connection, you get a popup saying:

<SYSID> <hostname> <instance> – System state cannot be determined

SAPControl request failed: Permission denied: connect

Database connection is not available. See error log for more details

/wp-content/uploads/2012/08/blog1_132180.png

Searching for a solution

So you go investigate a little deeper and try one or more of the following, any of which will leave you more confused because none of the options will point you towards a possible cause!

  • PING to the system from a command promt. Response allright!
  • Use Telnet to check if port 3<instance>15 (30015 for instance 00) is open, and of course you’ll find it to be open.
  • Create an ODBC System DSN to the HANA system and see if this is connectable. No surprise that it will be working!
  • Open your favorite browser to check if port 5<instance>13 (for HTTP) or 5<instance>14 (for HTTPS) is open: (50013 and 50014 for instance 00)
    http://<sap_hana_host>:50013/?wsdl or https://<sap_hana_host>:50014/?wsdl.
    This will give you a repsonse, in fact an XML schema.

Confused? I was too, until I ran into http://www.java.net/node/703177 Quote: “In JDK 7 brings support for IPv6 on Windows. When you attempt to connect to an IPv4 address then under the covers it will use an IPv4-mapped IPv6 address.”. So if your VPN client has no support for IPv6, then you’re busted. My Cisco AnyConnect client apparently does not support IPv6.

One solution is reverting to JDK6 instead of JDK7, but that is not always an option.

The real solution

Close HANA Studio.

Edit the file %PROGRAMFILES%\sap\hdbstudio\hdbstudio.ini with your favorite editer (Hint: Open the editor as administrator!)

Add the line

-Djava.net.preferIPv4Stack=true

at the end of the file. This tells JDK not to map to IPv6 addresses. Another solution might be reverting back to JDK6 instead of JDK7.

Save, close your editor and start HANA Studio and you’ll see that the problem is solved!

To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

  1. Alvaro Tejada Galindo

    Awesome! Your blog just solved my problem! 😀 I update my SAP HANA Studio to Rev. 48 but also update my JDK to jdk1.7.0_10…after that…I couldn’t connect to AWS or KT ucloud…at first I thought it was because my HANA servers were old dated…so I upgraded AWS to Rev. 48…without any luck…I spend a lot of time trying to fix it…and actually I came across the -Djava.net.preferIPv4Stack=true solution…but I never suspected that I needed to pass the parameter on hdbstudio.ini

    Thanks! You rock! 😀

    Greetings,

    Blag.

    (0) 

Leave a Reply