Closed abravosuse closed 2 years ago
@abravosuse Thanks for finding this. I guess you got the ports mixed up 31013/31015 (wrong) vs. 30013/30015 (right)
Just checked the following:
vmnetweaver01:~ # grep dbhost /sapmnt/HA1/profile/DEFAULT.PFL
j2ee/dbhost = 10.74.1.12
vmnetweaver03:~ # grep "hdbuserstore.*SET" /tmp/swpm_unattended/sapinst.log
Output of /usr/sap/HA1/hdbclient/hdbuserstore -i -H sapha1pas SET DEFAULT vmhana01.internal.cloudapp.net:30013@PRD SAPABAP1 is written to the logfile userstore_DEFAULT.log.
Execution of the command "/usr/sap/HA1/hdbclient/hdbuserstore -i -H sapha1pas SET DEFAULT vmhana01.internal.cloudapp.net:30013@PRD SAPABAP1" finished with return code 0. Output:
one can change the sapinst parameter via this parameter:
--- /usr/share/salt-formulas/states/netweaver/templates/aas.inifile.params.j2.org 2022-03-01 13:33:16.674049235 +0000
+++ /usr/share/salt-formulas/states/netweaver/templates/aas.inifile.params.j2 2022-03-01 13:41:31.249668374 +0000
@@ -27,7 +27,7 @@
# HDB_Schema_Check_Dialogs.validateSchemaName = true
# Database hostnames that will be set directly in hdbuserstore without resolving them in HANA. Comma separated. Example (host1,host2)
-# HDB_Userstore.doNotResolveHostnames =
+HDB_Userstore.doNotResolveHostnames = {{ hana_host }}
# Alternative port for SystemDB to be used in hdbuserstore
# HDB_Userstore.systemDBPort =
vmnetweaver04:~ # grep "hdbuserstore.*SET" /tmp/swpm_unattended/sapinst.log
Output of /usr/sap/HA1/hdbclient/hdbuserstore -i -H sapha1aas1 SET DEFAULT 10.74.1.12:30013@PRD SAPABAP1 is written to the logfile userstore_DEFAULT.log.
Execution of the command "/usr/sap/HA1/hdbclient/hdbuserstore -i -H sapha1aas1 SET DEFAULT 10.74.1.12:30013@PRD SAPABAP1" finished with return code 0. Output:
vmnetweaver04:ha1adm 18> hdbuserstore List DATA FILE : /home/ha1adm/.hdb/sapha1aas1/SSFS_HDB.DAT KEY FILE : /home/ha1adm/.hdb/sapha1aas1/SSFS_HDB.KEY
KEY DEFAULT ENV : 10.74.1.12:30013 --> VIP and SYSTEMDB port USER: SAPABAP1 DATABASE: PRD
- which works out fine, even after a failover
vmnetweaver04:ha1adm 46> hdbsql -U DEFAULT -d PRD "select count() from schemas;" | tail COUNT() 34 1 row selected (overall time 1389 usec; server time 184 usec)
vmnetweaver04:ha1adm 47> hdbsql -U DEFAULT "select count() from schemas;" | tail COUNT() 34 1 row selected (overall time 1215 usec; server time 149 usec)
- connection to SYSTEMDB (30013) instead of TENANT (30015) is fine according to SAP docs
- https://help.sap.com/viewer/b3ee5778bc2e4a089d3299b82ec762a7/2.0.05/en-US/dd95ac9dbb571014a7d7f0234d762fdb.html
> Connecting to a Requested Tenant Database
> You can associate a key with tenant database information for use in a connection attempt. The server keeps track of which tenant databases are assigned to which ports for a host in the system database. You should only supply the host name/port pair for the system database that you plan to connect to, with each host specification being one of the three master nameservers associated with the system. The database name, when supplied in a connection attempt, is used to query a system database that runs on a well-defined port.
A fix will be supplied shortly.
@abravosuse Hope this fix is sufficient for you.
Thank you @yeoldegrove. Yes, the fix is sufficient for me.
Just two comments:
Thanks a lot!
Used cloud platform Azure
Used SLES4SAP version SLES for SAP 15 SP3
Used client machine OS Windows
Expected behaviour vs observed behaviour I have deployed a SAP NetWeaver 7.5 on HANA system with
1) One AAS on dedicated host 2) One PAS on dedicated host 3) One ASCS/ERS cluster with 2 nodes 4) HANA scale-up luster with 2 nodes
After installation, the hdbuserstore default connection in both PAS and AAS hosts is pointing to the HANA primary node, port 31013. That is wrong, as in case of HANA failover, the PAS and ASS instances can no longer connect to the database. Instead, they should be pointing to the HANA virtual IP, port 31015.
How to reproduce
Used terraform.tfvars
Logs I have downloaded the following logs from PAS host and can provide via DM on-demand: