on 08-19-2013 10:28 AM
Good Morning everyone,
I'm trying to use sapcpe in my environment to distribute a new kernel.
Actually it works fine, there is just one problem left.
If I put a new Kernel in my /sapmnt/PR0/exe directory it says sapstartsrv is already in use.
How can I move this or tell him to use it from another directory?
any hints would be fine.
Greetings from cloudy and wet germany
Hello Markus,
Change the path in /usr/sap/sapservices file from /sapmnt/<SID>/exe (or /usr/sap/<SID>/SYS/exe/run) to /usr/sap/<SID>/<Instance>/exe.
Refer also to SAP note 823941.
Of course, already running sapsartsrv process must be stopped (sapcontrol -prot NI_HTTP -host <hostname> -nr <instance nr.> -function StopService or kill -9 <PID of sapstartsrv>).
Change will be active from next start of sapstartsrv (by sapcontrol, startsap or reboot).
Example:
#!/bin/sh
LD_LIBRARY_PATH=/usr/sap/<SID>/<Instance>/exe:$LD_LIBRARY_PATH;export LD_LIBRARY_PATH;/usr/sap/<SID>/<Instance>/exe/sapstartsrv pf=/usr/sap/<SID>/SYS/profile/START_<Instance>_<hostname> -D -u <sid>adm
Note: as of release 710 there is no START profile anymore. In that and all higher releases use the instance profile instead <SID>_<Instance>_<hostname>.
Best regards,
Adam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Adam,
after changeing this file erverything seems to work fine.
But a new problem occures.
I've stopped the SAP-Instance, unmounted the Repository and tried to start with the local copied kernel, for a emergency-backup test.
But got problem cause my workers where dying.
Checking the dev_w0 log give me following hint.
M Wed Aug 28 10:09:58 2013
M ThInit: running on host bssapp04
M calling db_connect ...
B Loading DB library '/usr/sap/PR0/SYS/exe/run/dbsdbslib.so' ...
M *** ERROR => DlLoadLib()==DLENOACCESS - dlopen("/usr/sap/PR0/SYS/exe/run/dbsdbslib.so") FAILED
"/usr/sap/PR0/SYS/exe/run/dbsdbslib.so: cannot open shared object file: No such file or directory" [dlux.c 445]
B *** ERROR => Couldn't load library '/usr/sap/PR0/SYS/exe/run/dbsdbslib.so'
[dbcon.c 5768]
M ***LOG R19=> ThInit, db_connect ( DB-Connect 008192) [thxxhead.c 1498]
M in_ThErrHandle: 1
M *** ERROR => ThInit: db_connect (step 1, th_errno 13, action 3, level 1) [thxxhead.c 11347]
M
Sure this will fail, because this points towards the unmounted File System.
Any Idea how to change this path?
Dear Markus,
This is working this way in our test system:
in START_SID_hostname profile I added an extra entry:
SETENV_00 = LD_LIBRARY_PATH=$(DIR_LIBRARY):%(LD_LIBRARY_PATH)
SETENV_01 = SHLIB_PATH=$(DIR_LIBRARY):%(SHLIB_PATH)
SETENV_02 = LIBPATH=$(DIR_LIBRARY):%(LIBPATH)
SETENV_03 = SECUDIR=/usr/sap/BCS/D03/sec
SETENV_04 = DIR_LIBRARY=$(DIR_EXECUTABLE)
See also SAP note 1827566.
dev_w0 before restart:
B Loading DB library '/usr/sap/BCS/SYS/exe/run/dboraslib.so' ...
dev_w0 after restart:
B Loading DB library '/usr/sap/BCS/D03/exe/dboraslib.so' ...
Best regards,
Adam
Hi,
thanks to all for advise but this isn't the solution to my problem.
My Problem is still, that startsapsrv is used from the sapmnt directory and not from the /usr/sap/<SID>/... directory.
That's the reason I can't update my sapmnt repository for SAPCPE. During SAP is running. All Kernel files should actualy been used from /usr/sap/<SID>/... and not from /sapmnt/...
Every other Kernel file is used from /usr/sap/ but this startsapsrv not.
Is there a parameter who changes the source for this file SAP uses during starting the system?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Markus,
Stop Manually.
sapcontrol -nr <InstanzNummern> -function StopService
And also try
ps -ef |grep sapstartsrv and kill the service
Thanks & Regards,
V Srinivasan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
thx for advise and i think i have a basic misunderstanding here.
I acutely know, that i have to restart sap on the system to use the new kernel.
But now i wan't to change the kernel "repository" where the SAP-Machine draw it's kernel for the new start.
That's the way I understand the SAPCPE-functionality.
Copy new Kernel to Network Share, stop all SAP Instances, Start them an during this start, the copy the new kernel from Share to a local folder and uses this. Works all fine except the startsapsrv file.
Or did i understand this SAPCPE thing wrong?
Best Regards,
Markus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
SAPCPE is ran every time during the startup of SAP, and allows for you to place the new/patched kernel in place before taking your system down; without this you have various files in use problems like you see with sapstartsrv.
\usr\sap\<SID>\SYS\exe\
This is the typical path of where you place the new files and sapcpe will pull them from there; now this is not the exact path as I'm not sure if you are using a unicode kernel or not. If you are using a unicode kernel you will see a \uc folder and then possible another folder for the type of system you have i386/64bit/NT/etc etc.
And typical best practice to save you in case of a disaster, duplicate the current kernel folder there first; for easy roll back options.
Billy is correct
you should first stop all the services and then copy the new kernel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
With Windows you will have to stop/start the windows SAP service; if you are using linux then you then to also do the same via the rc.d/init.d/systemctl.
You will then be able to have sapstartsrv copy over.
If you get the clearance, you could always reboot the entire server too which would fix the issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Markus,
before you patch the kernel you must stop SAP and all SAP services.
Best Regards
Valerio
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.