Background:
I had to upgrade the HANA One (Developer Edition) in AWS from Rev 48 to Rev 56 as part of the openSAP Introduction to Software Development on SAP HANA class.
Rev 48 client setup:
My Win7, C:\Windows\system32\drivers\etc\hosts file had the entry, aa.bb.cc.dd imdbhdb, where aa.bb.cc.dd is the Elastic IP of the HANA Instance in AWS.
I added the system in HANA studio using the entries below:
Hostname: imdbhdb
Instance Number: 00
DB User Name: SYSTEM
Password: <your password>
Rev 56 Error:
After the upgrade to Rev 56, the above setup resulted in the Error "Database connection is not available" within a few minutes after adding the system in the HANA Studio.
Problem Analysis:
I activated the JDBC trace as below for Rev 56 (See http://help.sap.com/hana_platform SAP HANA Developer's Guide):
JDBC would initially connect to the HANA server:
new Connection 'jdbc:sap://imdbhdb:30015'locale=en_USuser=SYSTEMpassword=***timeout=0reconnect=truevalidateCertificate=falseencrypt=falseHOSTLIST: [imdbhdb:30015,]
Rev 48 JDBC Connect | Rev 56 JDBC Connect |
---|---|
First three Connection attempts: new Connection 'jdbc:sap://imdbhdb:30015' HOSTLIST: [imdbhdb:30015,] Subsequent Connection attempts: new Connection 'jdbc:sap://imdbhdb:30015' HOSTLIST:
| First three Connection attempts: new Connection 'jdbc:sap://imdbhdb:30015' HOSTLIST: [imdbhdb:30015,] Subsequent Connection attempts: new Connection 'jdbc:sap://10.29.1.187:30015' HOSTLIST: [10.29.1.187:30015,] |
Rev 48 Output | |
---|---|
Rev 56 Output |
Rev 48 Output | Rev 56 Output |
---|---|
Rev 48 Output | Rev 56 Output |
---|---|
Workaround:
#1) Someone in openSAP forum suggested using hanaserver in the hosts file entry and in adding the system in HANA studio. While this worked, I did not like this option since hanaserver has no relationship to the actual hostname -- imdbhdb.
#2) I have been suggesting to folks -- in the openSAP forum and in the AWS upgrade blog (http://scn.sap.com/docs/DOC-30980) -- to use AWS Elastic IP for hostname in HANA studio while adding the system and to NOT add any entry in the hosts file. While this might be the lesser of the two evils, both options had the yellow-icon problem for the sapstartsrv process in the HANA studio.The SAP HANA Systems (Navigator) tab/view would also say "Some services are not started" (with an yellow icon) or "System state cannot be determined" (with a gray icon) for the system.
Fix:
When you compared the outputs of the SQL commands between Rev 48 and Rev 56 listed above, the only difference is the new key net_publicname added in Rev 56 in the View SYS.M_HOST_INFORMATION.
I had to wait until SPS06 documents were published to see what this new key was.
"Public host name that should be used by client interfaces. Can contain a host name, FQDN or IP address". (See http://help.sap.com/hana_platform SAP HANA System Views Reference)
The changed parameters are stored at the OS level as shown below.
The original *.ini files are at the OS level as shown below.
Let us run the SQL command now.
SELECT "HOST","KEY","VALUE" FROM SYS.M_HOST_INFORMATION WHERE UPPER("KEY") LIKE 'NET_%'
Now the net_publicname is set to imdbhdb.
Delete the system from the HANA studio, add the AWS ELASTIC IP-to-host (imdbhdb) mapping in the hosts file, and re-add the system in the HANA studio using the hostname ibmdbhdb.
Now the sapstartsrv process has the green icon as above.
Let us compare the JDBC Connections.
Rev 48 JDBC Connect | Rev 56 JDBC Connect |
---|---|
First three Connection attempts: new Connection 'jdbc:sap://imdbhdb:30015' HOSTLIST: [imdbhdb:30015,] Subsequent Connection attempts: new Connection 'jdbc:sap://imdbhdb:30015'HOSTLIST:
| First three Connection attempts: new Connection 'jdbc:sap://imdbhdb:30015' HOSTLIST: [imdbhdb:30015,] Subsequent Connection attempts: new Connection 'jdbc:sap://imdbhdb:30015' HOSTLIST:
|
You are done.
[Please note that I have tested this fix only in AWS. I am not sure if Rev 56 systems hosted by other HANA Cloud hosting providers like CloudShare would have the same issue or if the fix would work if they did.]