After the server hardware crashed and we had a chance to upgrade to VMWare ESXi 6.5. However after various steps to recover all the VMs, when we tried to start S4, it should license check error
We know that the license check actually depends on where the ASCS instance runs, however when we check the ASCS instance and it was not running at all!
During SAP installation the ASCS was installed in the same VM as Hana DB, so we tried to start ASCS, but failed:
SharkS4HDB:s4aadm 18> startsap ASCS00
Cannot find startdb, DB startup failed
please send the tracefile /home/s4aadm/startsap.trc to support
SharkS4HDB:s4aadm 19> cat /home/s4aadm/startsap.trc
Trace of system startup/check of SAP System S4A on Sun Jan 8 17:56:07 UTC 2017
{17:56:07 ## Main() start: @=/usr/sap/S4A/SYS/exe/uc/linuxx86_64/startsap ASCS00
@(#) $Id: //bas/749_REL/src/krn/startscripts/startsap#2 $
BASENAME=startsap
{17:56:07 ## check_user() start: @=s4aadm
}17:56:07 ## check_user() done
#=1
@=ASCS00
{17:56:07 ## setPlatform() start
PLATFORM=linuxx86_64
}17:56:07 ## setPlatform() done
{17:56:07 ## setPing() start
PING=/bin/ping
}17:56:07 ## setPing() done
{17:56:07 ## setIfconfig() start
IFCONFIG=/sbin/ifconfig
}17:56:07 ## setIfconfig() done
{17:56:07 ## setIp() start
IP=/sbin/ip
}17:56:07 ## setIp() done
{17:56:07 ## setRootDir() start: @=
USR_SAP=/usr/sap
USR_SAP_SID=/usr/sap/S4A
PROFILE_DIR=/usr/sap/S4A/SYS/profile
DIR_LIBRARY=/usr/sap/S4A/SYS/exe/run
}17:56:07 ## setRootDir() done
{17:56:07 ## setDbUser() start: @=
}17:56:07 ## setDbUser() done
Argument=ASCS00
{17:56:07 ## getarg() start
{17:56:07 ## checkInstance() start: @=ASCS00
}17:56:07 ## checkInstance() done: 0
INST=ASCS00
}17:56:07 ## getarg() done: 1
{17:56:07 ## setVHostArray() start
_PROFILES=/usr/sap/S4A/SYS/profile/S4A_ASCS00_SharkS4APP.ooo /usr/sap/S4A/SYS/profile/S4A_ASCS00_SharkS4HDB /usr/sap/S4A/SYS/profile/S4A_D00_SharkS4APP /usr/sap/S4A/SYS/profile/S4A_D00_SharkS4APP.1 /usr/sap/S4A/SYS/profile/S4A_D00_SharkS4APP.2 /usr/sap/S4A/SYS/profile/S4A_D00_SharkS4APP.3 /usr/sap/S4A/SYS/profile/S4A_D00_SharkS4APP.4
_nrProfiles=7
{17:56:07 ## pushVHostsFromProfile() start: @=/usr/sap/S4A/SYS/profile/S4A_ASCS00_SharkS4APP.ooo /usr/sap/S4A/SYS/profile/S4A_ASCS00_SharkS4HDB /usr/sap/S4A/SYS/profile/S4A_D00_SharkS4APP /usr/sap/S4A/SYS/profile/S4A_D00_SharkS4APP.1 /usr/sap/S4A/SYS/profile/S4A_D00_SharkS4APP.2 /usr/sap/S4A/SYS/profile/S4A_D00_SharkS4APP.3 /usr/sap/S4A/SYS/profile/S4A_D00_SharkS4APP.4
_DUMMY=S4A_ASCS00_SharkS4APP.ooo
_VHOST=SharkS4APP.ooo
{17:56:07 ## isVHostLocal() start: SharkS4APP.ooo
VHOST=SharkS4APP.ooo
_IS_LOCAL=0
}17:56:09 ## isVHostLocal() done: 0
_DUMMY=S4A_ASCS00_SharkS4HDB
_VHOST=SharkS4HDB
{17:56:09 ## isVHostLocal() start: SharkS4HDB
VHOST=SharkS4HDB
_IS_LOCAL=1
}17:56:09 ## isVHostLocal() done: 1
_DUMMY=S4A_D00_SharkS4APP
_VHOST=SharkS4APP
{17:56:09 ## isVHostLocal() start: SharkS4APP
VHOST=SharkS4APP
_IS_LOCAL=0
}17:56:09 ## isVHostLocal() done: 0
_DUMMY=S4A_D00_SharkS4APP.1
_VHOST=SharkS4APP.1
{17:56:09 ## isVHostLocal() start: SharkS4APP.1
VHOST=SharkS4APP.1
_IS_LOCAL=0
}17:56:11 ## isVHostLocal() done: 0
_DUMMY=S4A_D00_SharkS4APP.2
_VHOST=SharkS4APP.2
{17:56:11 ## isVHostLocal() start: SharkS4APP.2
VHOST=SharkS4APP.2
_IS_LOCAL=0
}17:56:13 ## isVHostLocal() done: 0
_DUMMY=S4A_D00_SharkS4APP.3
_VHOST=SharkS4APP.3
{17:56:13 ## isVHostLocal() start: SharkS4APP.3
VHOST=SharkS4APP.3
_IS_LOCAL=0
}17:56:15 ## isVHostLocal() done: 0
_DUMMY=S4A_D00_SharkS4APP.4
_VHOST=SharkS4APP.4
{17:56:15 ## isVHostLocal() start: SharkS4APP.4
VHOST=SharkS4APP.4
_IS_LOCAL=0
}17:56:17 ## isVHostLocal() done: 0
VHOSTS= SharkS4HDB
}17:56:18 ## pushVHostsFromProfile() done
VHOSTS= SharkS4HDB
}17:56:18 ## setVHostArray() done
{17:56:18 ## setInstanceDo() start: @=ASCS00 /usr/sap/S4A/SYS/profile/S4A_ASCS00_SharkS4HDB:
setInstanceDo: INSTascs=ASCS00:
setInstanceDo: PROFILEascs=/usr/sap/S4A/SYS/profile/S4A_ASCS00_SharkS4HDB:
setInstanceDo: INST=ASCS00:
setInstanceDo: INSTFOUND=1:
}17:56:18 ## setInstanceDo() done: 1:
{17:56:18 ## prepare() start
{17:56:18 ## set_sapdbhost() start
_PROFILE=/usr/sap/S4A/SYS/profile/DEFAULT.PFL
SAPDBHOST=SharkS4HDB
}17:56:18 ## set_sapdbhost() done
{17:56:18 ## set_db_local() start
VHOST=SharkS4HDB
set_dblocal: _DB_LOCAL=1
SAPDBHOST=SharkS4HDB
}17:56:18 ## set_db_local() done: 1
{17:56:18 ## set_db_sid() start: @=1
DB_SID=HDB
}17:56:18 ## set_db_sid() done
{17:56:18 ## set_db_running() start
DB_RUNNING=0
JDB_RUNNING=
}17:56:18 ## set_db_running() done: 0
{17:56:18 ## set_sapjdbhost() start
SAPJDBHOST=
}17:56:18 ## set_sapjdbhost() done
{17:56:18 ## set_jdb_local() start
VHOST=SharkS4HDB
set_jdb_local: _JDB_LOCAL=0
SAPJDBHOST=
}17:56:18 ## set_jdb_local() done: 0
{17:56:18 ## set_jdb_running() start
JDB_RUNNING=0
_INST=
_PROFILE=
SAPSYSTEMNAME=S4A
}17:56:18 ## set_jdb_running() done: 0
}17:56:18 ## prepare() done
DB_LOCAL=1
DB_RUNNING=0
hasABAP=0
hasJava=0
hasSpecial=1
TASK=ALL
JDB_LOCAL=0
{17:56:18 ## Database() start: @=start
{17:56:18 ## getExePath() start: @=startdb
EXEDIR=
EXECMD=
}17:56:18 ## getExePath() done: 1
Cannot find startdb, DB startup failed
Exit code 5
Check the startsap script, and we had to force to set the DB not in the same host
429 prepare()
430 {
431 setTrace "## prepare() start";
432 sp="${sp} ";
433
434 # set variable SAPDBHOST
435 set_sapdbhost;
436
437 # abap database is local?
438 set_db_local;
439 #### Commented out by Adam Li since the DB was not really brought up by SIDadm ###
440 #DB_LOCAL=$?;
441 DB_LOCAL=0;
442 set_db_sid $DB_LOCAL;
443
444 # ABAP database is running?
445 set_db_running;
446 DB_RUNNING=$?;
447
448
449 # set variables SAPJDBHOST
450 set_sapjdbhost
Re-execute the startsap ASCS00 command and was able to bring up ASCS
SharkS4HDB:s4aadm 41> startsap ASCS00
Starting Startup Agent sapstartsrv
OK
Instance Service on host SharkS4HDB started
-------------------------------------------
starting SAP Instance ASCS00
Startup-Log is written to /home/s4aadm/startsap_ASCS00.log
-------------------------------------------
/usr/sap/S4A/ASCS00/exe/sapcontrol -prot NI_HTTP -nr 00 -function Start
Instance on host SharkS4HDB started
SharkS4HDB:s4aadm 42> ps -ef|grep -i ms.
s4aadm 20385 20374 0 18:08 ? 00:00:00 ms.sapS4A_ASCS00 pf=/usr/sap/S4A/SYS/profile/S4A_ASCS00_SharkS4HDB
s4aadm 20865 13892 0 18:08 pts/0 00:00:00 grep -i ms.
SharkS4HDB:s4aadm 43>
After the server hardware crashed and we had a chance to upgrade to VMWare ESXi 6.5. However after various steps to recover all the VMs, when we tried to start S4, it should license check error
We know that the license check actually depends on where the ASCS instance runs, however when we check the ASCS instance and it was not running at all!
During SAP installation the ASCS was installed in the same VM as Hana DB, so we tried to start ASCS, but failed:
````
SharkS4HDB:s4aadm 18> startsap ASCS00
Cannot find startdb, DB startup failed
please send the tracefile /home/s4aadm/startsap.trc to support
SharkS4HDB:s4aadm 19> cat /home/s4aadm/startsap.trc
Trace of system startup/check of SAP System S4A on Sun Jan 8 17:56:07 UTC 2017
{17:56:07 ## Main() start: @=/usr/sap/S4A/SYS/exe/uc/linuxx86_64/startsap ASCS00
@(#) $Id: //bas/749_REL/src/krn/startscripts/startsap#2 $
BASENAME=startsap
{17:56:07 ## check_user() start: @=s4aadm
}17:56:07 ## check_user() done
#=1
@=ASCS00
{17:56:07 ## setPlatform() start
PLATFORM=linuxx86_64
}17:56:07 ## setPlatform() done
{17:56:07 ## setPing() start
PING=/bin/ping
}17:56:07 ## setPing() done
{17:56:07 ## setIfconfig() start
IFCONFIG=/sbin/ifconfig
}17:56:07 ## setIfconfig() done
{17:56:07 ## setIp() start
IP=/sbin/ip
}17:56:07 ## setIp() done
{17:56:07 ## setRootDir() start: @=
USR_SAP=/usr/sap
USR_SAP_SID=/usr/sap/S4A
PROFILE_DIR=/usr/sap/S4A/SYS/profile
DIR_LIBRARY=/usr/sap/S4A/SYS/exe/run
}17:56:07 ## setRootDir() done
{17:56:07 ## setDbUser() start: @=
}17:56:07 ## setDbUser() done
Argument=ASCS00
{17:56:07 ## getarg() start
{17:56:07 ## checkInstance() start: @=ASCS00
}17:56:07 ## checkInstance() done: 0
INST=ASCS00
}17:56:07 ## getarg() done: 1
{17:56:07 ## setVHostArray() start
_PROFILES=/usr/sap/S4A/SYS/profile/S4A_ASCS00_SharkS4APP.ooo /usr/sap/S4A/SYS/profile/S4A_ASCS00_SharkS4HDB /usr/sap/S4A/SYS/profile/S4A_D00_SharkS4APP /usr/sap/S4A/SYS/profile/S4A_D00_SharkS4APP.1 /usr/sap/S4A/SYS/profile/S4A_D00_SharkS4APP.2 /usr/sap/S4A/SYS/profile/S4A_D00_SharkS4APP.3 /usr/sap/S4A/SYS/profile/S4A_D00_SharkS4APP.4
_nrProfiles=7
{17:56:07 ## pushVHostsFromProfile() start: @=/usr/sap/S4A/SYS/profile/S4A_ASCS00_SharkS4APP.ooo /usr/sap/S4A/SYS/profile/S4A_ASCS00_SharkS4HDB /usr/sap/S4A/SYS/profile/S4A_D00_SharkS4APP /usr/sap/S4A/SYS/profile/S4A_D00_SharkS4APP.1 /usr/sap/S4A/SYS/profile/S4A_D00_SharkS4APP.2 /usr/sap/S4A/SYS/profile/S4A_D00_SharkS4APP.3 /usr/sap/S4A/SYS/profile/S4A_D00_SharkS4APP.4
_DUMMY=S4A_ASCS00_SharkS4APP.ooo
_VHOST=SharkS4APP.ooo
{17:56:07 ## isVHostLocal() start: SharkS4APP.ooo
VHOST=SharkS4APP.ooo
_IS_LOCAL=0
}17:56:09 ## isVHostLocal() done: 0
_DUMMY=S4A_ASCS00_SharkS4HDB
_VHOST=SharkS4HDB
{17:56:09 ## isVHostLocal() start: SharkS4HDB
VHOST=SharkS4HDB
_IS_LOCAL=1
}17:56:09 ## isVHostLocal() done: 1
_DUMMY=S4A_D00_SharkS4APP
_VHOST=SharkS4APP
{17:56:09 ## isVHostLocal() start: SharkS4APP
VHOST=SharkS4APP
_IS_LOCAL=0
}17:56:09 ## isVHostLocal() done: 0
_DUMMY=S4A_D00_SharkS4APP.1
_VHOST=SharkS4APP.1
{17:56:09 ## isVHostLocal() start: SharkS4APP.1
VHOST=SharkS4APP.1
_IS_LOCAL=0
}17:56:11 ## isVHostLocal() done: 0
_DUMMY=S4A_D00_SharkS4APP.2
_VHOST=SharkS4APP.2
{17:56:11 ## isVHostLocal() start: SharkS4APP.2
VHOST=SharkS4APP.2
_IS_LOCAL=0
}17:56:13 ## isVHostLocal() done: 0
_DUMMY=S4A_D00_SharkS4APP.3
_VHOST=SharkS4APP.3
{17:56:13 ## isVHostLocal() start: SharkS4APP.3
VHOST=SharkS4APP.3
_IS_LOCAL=0
}17:56:15 ## isVHostLocal() done: 0
_DUMMY=S4A_D00_SharkS4APP.4
_VHOST=SharkS4APP.4
{17:56:15 ## isVHostLocal() start: SharkS4APP.4
VHOST=SharkS4APP.4
_IS_LOCAL=0
}17:56:17 ## isVHostLocal() done: 0
VHOSTS= SharkS4HDB
}17:56:18 ## pushVHostsFromProfile() done
VHOSTS= SharkS4HDB
}17:56:18 ## setVHostArray() done
{17:56:18 ## setInstanceDo() start: @=ASCS00 /usr/sap/S4A/SYS/profile/S4A_ASCS00_SharkS4HDB:
setInstanceDo: INSTascs=ASCS00:
setInstanceDo: PROFILEascs=/usr/sap/S4A/SYS/profile/S4A_ASCS00_SharkS4HDB:
setInstanceDo: INST=ASCS00:
setInstanceDo: INSTFOUND=1:
}17:56:18 ## setInstanceDo() done: 1:
{17:56:18 ## prepare() start
{17:56:18 ## set_sapdbhost() start
_PROFILE=/usr/sap/S4A/SYS/profile/DEFAULT.PFL
SAPDBHOST=SharkS4HDB
}17:56:18 ## set_sapdbhost() done
{17:56:18 ## set_db_local() start
VHOST=SharkS4HDB
set_dblocal: _DB_LOCAL=1
SAPDBHOST=SharkS4HDB
}17:56:18 ## set_db_local() done: 1
{17:56:18 ## set_db_sid() start: @=1
DB_SID=HDB
}17:56:18 ## set_db_sid() done
{17:56:18 ## set_db_running() start
DB_RUNNING=0
JDB_RUNNING=
}17:56:18 ## set_db_running() done: 0
{17:56:18 ## set_sapjdbhost() start
SAPJDBHOST=
}17:56:18 ## set_sapjdbhost() done
{17:56:18 ## set_jdb_local() start
VHOST=SharkS4HDB
set_jdb_local: _JDB_LOCAL=0
SAPJDBHOST=
}17:56:18 ## set_jdb_local() done: 0
{17:56:18 ## set_jdb_running() start
JDB_RUNNING=0
_INST=
_PROFILE=
SAPSYSTEMNAME=S4A
}17:56:18 ## set_jdb_running() done: 0
}17:56:18 ## prepare() done
DB_LOCAL=1
DB_RUNNING=0
hasABAP=0
hasJava=0
hasSpecial=1
TASK=ALL
JDB_LOCAL=0
{17:56:18 ## Database() start: @=start
{17:56:18 ## getExePath() start: @=startdb
EXEDIR=
EXECMD=
}17:56:18 ## getExePath() done: 1
Cannot find startdb, DB startup failed
Exit code 5
````
Check the startsap script, and we had to force to set the DB not in the same host
````
429 prepare()
430 {
431 setTrace "## prepare() start";
432 sp="${sp} ";
433
434 # set variable SAPDBHOST
435 set_sapdbhost;
436
437 # abap database is local?
438 set_db_local;
439 #### Commented out by Adam Li since the DB was not really brought up by SIDadm ###
440 #DB_LOCAL=$?;
441 DB_LOCAL=0;
442 set_db_sid $DB_LOCAL;
443
444 # ABAP database is running?
445 set_db_running;
446 DB_RUNNING=$?;
447
448
449 # set variables SAPJDBHOST
450 set_sapjdbhost
````
Re-execute the startsap ASCS00 command and was able to bring up ASCS
````
SharkS4HDB:s4aadm 41> startsap ASCS00
Starting Startup Agent sapstartsrv
OK
Instance Service on host SharkS4HDB started
-------------------------------------------
starting SAP Instance ASCS00
Startup-Log is written to /home/s4aadm/startsap_ASCS00.log
-------------------------------------------
/usr/sap/S4A/ASCS00/exe/sapcontrol -prot NI_HTTP -nr 00 -function Start
Instance on host SharkS4HDB started
SharkS4HDB:s4aadm 42> ps -ef|grep -i ms.
s4aadm 20385 20374 0 18:08 ? 00:00:00 ms.sapS4A_ASCS00 pf=/usr/sap/S4A/SYS/profile/S4A_ASCS00_SharkS4HDB
s4aadm 20865 13892 0 18:08 pts/0 00:00:00 grep -i ms.
SharkS4HDB:s4aadm 43>
````
Project 'Clam' founder