Wednesday, 20 May 2020

Import of delivery units failed cannot check already imported delivery units

Some time we may get error like "Import of delivery units failed cannot check already imported delivery units" while doing HANA DB upgrade. as shown in below snap this error may come. 

ERROR: 

Cannot check already imported delivery units
 Connect failed: Connect failed (code= 10) : authentication failed









Note: before starting troubleshooting, i will request to read error care fully. because resolution is there in error. as we noted "authentication failed". Now we need to find which authentication failed

Resolution: 

we will discuss this issue step by step.


A: as error occurred, before delivery unit import what was step ? 
 --> before delivery unit import there was step of HANA DB upgrade and then start HANA database instances or instance. so we can see its showing in log all service/ server are started successfully as per above screen. 
   it mean that our upgrade is completed successfully. 

B: to check where upgrade done or not? open new putty session and login <SID>adm user then run 2 commands as shown below

1: check HANA DB version details. it will help you get current version details. 

hdbadm@localhost:/usr/sap/HDB/HDB00> HDB version

HDB version info:
  version:             2.00.020.00.1500920972
  branch:              fa/hana2sp02
  git hash:            7f63b0aa11dca2ea54d450aa302319302c2eeaca
  git merge time:      2017-07-24 20:29:32
  weekstone:           0000.00.0
  compile date:        2017-07-24 20:35:12
  compile host:        ld4551
  compile type:        rel

2: Check HANA database server process details by running SAPCONTROL commands as shown below.

hdbadm@s4hana:/usr/sap/HDB/HDB00> sapcontrol -nr 00 -function GetProcessList


20.05.2020 05:50:59
GetProcessList
OK
name, description, dispstatus, textstatus, starttime, elapsedtime, pid
hdbdaemon, HDB Daemon, GREEN, Running, 2020 05 20 05:32:37, 0:18:22, 2835
hdbcompileserver, HDB Compileserver, GREEN, Running, 2020 05 20 05:34:27, 0:16:32, 3001
hdbindexserver, HDB Indexserver-HDB, GREEN, Running, 2020 05 20 05:34:32, 0:16:27, 3044
hdbnameserver, HDB Nameserver, GREEN, Running, 2020 05 20 05:32:39, 0:18:20, 2851
hdbpreprocessor, HDB Preprocessor, GREEN, Running, 2020 05 20 05:34:27, 0:16:32, 3003
hdbwebdispatcher, HDB Web Dispatcher, GREEN, Running, 2020 05 20 05:36:19, 0:14:40, 3280
hdbxsengine, HDB XSEngine-HDB, GREEN, Running, 2020 05 20 05:34:32, 0:16:27, 3046

C: Now we know that from above points that HANA database upgrade. Now we need to focus on error 
and will refer below given SAP note.

Import of delivery units failed cannot check already imported delivery units



hdbadm@localhost:/usr/sap/HDB/home> cd /usr/sap/HDB/SYS/global/hdb/install/bin

hdbadm@localhost:/usr/sap/HDB/SYS/global/hdb/install/bin> pwd
/usr/sap/HDB/SYS/global/hdb/install/bin

hdbadm@:/usr/sap/HDB/SYS/global/hdb/install/bin> ls -althr
total 228K
-r-xr-xr-x 1 root   root    15K Jul  7  2017 hdbremovehost
-r-xr-xr-x 1 root   root    15K Jul  7  2017 hdbreg
-r-xr-xr-x 1 root   root    15K Jul  7  2017 hdbinst
-r-xr-xr-x 1 root   root    15K Jul  7  2017 hdbcheck
-r-xr-xr-x 1 root   root    15K Jul  7  2017 hdbaddhost
-r-xr-xr- 1 root   root    15K Jul  7  2017 hdbupdrep
-r-xr-xr-x 1 root   root    15K Jul  7  2017 hdbupdconf
-r-xr-xr-x 1 root   root    15K Jul  7  2017 hdbuninst
-r-xr-xr-x 1 root   root    15K Jul  7  2017 hdbrename
-r-xr-xr-x 1 root   root    15K Jul  7  2017 hdbmodify
-r-xr-xr-x 1 root   root    15K Jul  7  2017 hdbhostctrl
-rw-r--r-- 1 root   root    940 Jul 24  2017 filelist.install
-rw-r--r-- 1 root   root    36K Jul 25  2017 SIGNATURE.SMF
drwxr-x--- 7 hdbadm sapsys 4.0K May  6 07:09 ..
drwxr-xr-x 7 root   root   4.0K May  6 07:09 instruntime
drwxr-xr-x 3 root   root   4.0K May  6 07:09 .


Now we can understand why authentication failed while checking already imported delivery units. because hdbupdrep  file owner and group by root user. and upgrade where running with <SID>adm user. in may case permission is 555. we will try delivery Unit import with SIDadm user. 

-r-xr-xr-x 1 root   root    15K Jul  7  2017 hdbupdrep  

D: In case you are installing or upgrading to a revision earlier than the above mentioned ones, run /usr/sap/<SID>/SYS/global/hdb/install/bin/hdbupdrep to update the delivery units.

If the repeated import also returns with errors, further steps must be taken, depending on the nature of the errors.

Please find process below to update Delivery Units.

hdbadm@localhost:/usr/sap/HDB/SYS/global/hdb/install/bin> ./hdbupdrep


SAP HANA Lifecycle Management - Update Repository 2.2.18
********************************************************



Enter System Database User Name [SYSTEM]: SYSTEM
Enter System Database User (SYSTEM) Password:
Importing delivery units...
No delivery units to import
Update Repository done
Log file written to '/var/tmp/hdb_HDB_UpdateRepository_2020-05-20_06.33.17/hdbupdrep.log' on host 's4hana'.
hdbadm@localhost:/usr/sap/HDB/SYS/global/hdb/install/bin>


Note: Friends i am trying to share my knowledge and learning from experience. please help to correct if i am wrong.