cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Hana - Hostexec issue

Former Member
0 Kudos

During HANA installation I got the error as below, this was during the SUM installation step.

I can see HDB is started and process, info and version command parameters run fine.

Though the installation is almost done, i am not sure if it was successful and also the hostagent is not running so worried.

The host_profile file has SID=SAP and sys nr=99, is that OK? I tried changing it to my HANA sid HAN and sys nr=00

still hostagent cannot be started. What is correct? When I try to start saphostexec manually I get the profile permission violation

error as highlighted below.

Also user sapadm is mentioned having buy doesnt have /home/sapadm directory, see attached image. Is that normal?

Following is extract from the setup.glf file -

-----------------------------

2012 09 03 00:17:57#+00#DEBUG#com.sap.lm.services.shell.util.ForwardingBuffer#main#stdout:CreateHostAgentCertificate.sh: Generating server PSE...|

2012 09 03 00:18:04#+00#DEBUG#com.sap.lm.services.shell.util.ForwardingBuffer#main#stdout:CreateHostAgentCertificate.sh: Done.|

2012 09 03 00:18:04#+00#DEBUG#com.sap.lm.services.shell.util.ForwardingBuffer#main#stdout:CreateHostAgentCertificate.sh: Granting PSE access to the Host Agent...|

2012 09 03 00:18:04#+00#DEBUG#com.sap.lm.services.shell.util.ForwardingBuffer#main#stdout:CreateHostAgentCertificate.sh: Done.|

2012 09 03 00:18:04#+00#DEBUG#com.sap.lm.services.shell.util.ForwardingBuffer#main#stdout:CreateHostAgentCertificate.sh: Restarting the Host Agent...|

2012 09 03 00:18:08#+00#DEBUG#com.sap.lm.services.shell.util.ForwardingBuffer#main#stdout:saphostexec is already running (pid=6056). Stopping...|

2012 09 03 00:18:08#+00#DEBUG#com.sap.lm.services.shell.util.ForwardingBuffer#main#stdout:-> Start /usr/sap/hostctrl/exe/saphostexec pf=/usr/sap/hostctrl/exe/host_profile <- |

2012 09 03 00:18:08#+00#DEBUG#com.sap.lm.services.shell.util.ForwardingBuffer#main#stdout:[ERROR] Profile permission violation. (/usr/sap/hostctrl/exe/host_profile) |

2012 09 03 00:18:08#+00#DEBUG#com.sap.lm.services.shell.util.ForwardingBuffer#main#stdout:Usage: saphostexec [OPTION] [pf=<ProfilePath>]|

2012 09 03 00:18:08#+00#DEBUG#com.sap.lm.services.shell.util.ForwardingBuffer#main#stdout:  WHERE 😐

2012 09 03 00:18:08#+00#DEBUG#com.sap.lm.services.shell.util.ForwardingBuffer#main#stdout: <ProfilePath> - path to the profile to be used.|

2012 09 03 00:18:08#+00#DEBUG#com.sap.lm.services.shell.util.ForwardingBuffer#main#stdout:   by default host_profile in the executable directory.|

2012 09 03 00:18:08#+00#DEBUG#com.sap.lm.services.shell.util.ForwardingBuffer#main#stdout:  OPTION:|

2012 09 03 00:18:08#+00#DEBUG#com.sap.lm.services.shell.util.ForwardingBuffer#main#stdout: -install | -upgrade   : Install/Upgrade the agent|

2012 09 03 00:18:08#+00#DEBUG#com.sap.lm.services.shell.util.ForwardingBuffer#main#stdout: -uninstall            : Uninstall the agent|

2012 09 03 00:18:08#+00#DEBUG#com.sap.lm.services.shell.util.ForwardingBuffer#main#stdout: -restart              : Start or Restart the agent|

2012 09 03 00:18:08#+00#DEBUG#com.sap.lm.services.shell.util.ForwardingBuffer#main#stdout: -stop                 : Stop a running agent|

2012 09 03 00:18:08#+00#DEBUG#com.sap.lm.services.shell.util.ForwardingBuffer#main#stdout: -status               : return the status of the agent|

2012 09 03 00:18:08#+00#DEBUG#com.sap.lm.services.shell.util.ForwardingBuffer#main#stdout: -version              : return a detailed version information|

2012 09 03 00:18:08#+00#DEBUG#com.sap.lm.services.shell.util.ForwardingBuffer#main#stdout:[ERROR] /usr/sap/hostctrl/exe/saphostexec pf=/usr/sap/hostctrl/exe/host_profile exit with status 255|

2012 09 03 00:18:08#+00#DEBUG#com.sap.lm.services.shell.util.ForwardingBuffer#main#stdout:CreateHostAgentCertificate.sh: Failed to restart the Host Agent.|

2012 09 03 00:18:08#+00#DEBUG#com.sap.lm.services.shell.local.impl.LocalShellImpl#main#Executed command with return code 254|

---------------------------------

Regards,

Nick

Accepted Solutions (1)

Accepted Solutions (1)

tomas-krojzl
Active Contributor
0 Kudos

Hello,

here is how hostagent profile should look like (file /usr/sap/hostctrl/exe/host_profile):

SAPSYSTEMNAME = SAP

SAPSYSTEM = 99

service/porttypes = SAPHostControl SAPCCMS SAPOscol

DIR_LIBRARY = /usr/sap/hostctrl/exe

DIR_EXECUTABLE = /usr/sap/hostctrl/exe

DIR_PROFILE = /usr/sap/hostctrl/exe

DIR_GLOBAL = /usr/sap/hostctrl/exe

DIR_INSTANCE = /usr/sap/hostctrl/exe

DIR_HOME = /usr/sap/hostctrl/work

Tomas

Answers (3)

Answers (3)

tomas-krojzl
Active Contributor

Hello,

and this is how permissions should be set:

/usr/sap/hostctrl/exe # ls -la

total 70152

drwxr-x--- 3 root   sapsys     4096  7. čen 12.48 .

drwxr-x--- 4 root   sapsys     4096 22. lis  2011 ..

-rw-rw-rw- 1 root   root         20  7. čen 12.49 gmon.out

-rwxr-x--- 1 root   sapsys      333  3. úno  2012 hostagent.mf

-rwsr-x--- 1 root   sapsys   864562  3. úno  2012 hostexecstart

-rw-r----- 1 root   sapsys      304 12. zář  2011 host_profile

-rwxr-x--- 1 root   sapsys  1367286  3. úno  2012 ldappasswd

-rwxr-x--- 1 root   sapsys  1442196  3. úno  2012 ldapreg

-rwxr-x--- 1 root   sapsys  5426635  3. úno  2012 librfccm.so

-rwxr-x--- 1 root   sapsys   435459  3. úno  2012 libsapacosprep.so

-rwxr-x--- 1 root   sapsys  2549015  3. úno  2012 libsapcrypto.so

-rwxr-x--- 1 root   sapsys  1758998  3. úno  2012 libsapdbadactrl.so

-rwxr-x--- 1 root   sapsys   483749  3. úno  2012 libsapdbdb6ctrl.so

-rwxr-x--- 1 root   sapsys   617577  3. úno  2012 libsapdboractrl.so

-rwxr-x--- 1 root   sapsys   556886  3. úno  2012 libsapdbsybctrl.so

-rwxr-x--- 1 root   sapsys  4638768  3. úno  2012 lssap

-rwxr-x--- 1 root   sapsys  3690620  3. úno  2012 sapacosprep

-rwxr-x--- 1 root   sapsys  3941539  3. úno  2012 sapcimb

-rwxr-x--- 1 root   sapsys  1590469  3. úno  2012 sapcimc

-rwxr-x--- 1 root   sapsys  4640831  3. úno  2012 sapcontrol

-rwxr-x--- 1 root   sapsys  1257469  3. úno  2012 sapcpp47.so

-rwxr-x--- 1 root   sapsys  4721404  3. úno  2012 sapdbctrl

-rwxr-x--- 1 root   sapsys    21904  3. úno  2012 sapgenpse

-rwxr-x--- 1 root   sapsys  4768872  3. úno  2012 saphostctrl

-rwxr-x--- 1 root   root    4291708  3. úno  2012 saphostexec

-rwxr-x--- 1 root   sapsys  2308853  3. úno  2012 saposcol

-rwxr-x--- 1 sapadm sapsys 13207620  3. úno  2012 sapstartsrv

-rwsr-x--- 1 root   sapsys   678588  3. úno  2012 sapuxuserchk

drwxr-x--- 2 sapadm sapsys     4096 22. lis  2011 sec

-rwxr-x--- 1 root   sapsys   702202  3. úno  2012 sldreg

-rwxr-x--- 1 root   sapsys  4172865  3. úno  2012 sldreglib.so

-rwxr-x--- 1 root   sapsys  1450682  3. úno  2012 xml71d.so

Tomas

Former Member
0 Kudos

Thank you! for replying Tomas. I would check this and let you know.

Is there a way to bypass the hardware check HanaHwCheck.py during installation?

Do you guys have seperate file systems for data and log?

I have created a partition c0d0p3 and a directory sap under /usr

Mounted the partition lets say c0d0p3 onto /usr/sap

And then created directories as <inst_path>/<sid>/global/hdb/data

i.e. /usr/sap/<SID>/global/hdb/data and <inst_path>/<sid>/global/hdb/log

i.e. /usr/sap/<SID>/global/hdb/log

This way /usr/sap and everything below it has space equal to the partition c0d0p3

to grow.

Is this correct way?

Regards,

Nick

Regards,

Nick Ron

Former Member
0 Kudos

Hi Nick,

resolved the above issue? How can I check if my host agent is running fine?

any commands for that?

and if not what need to be done?

regards,

Nitin

0 Kudos

Hello Nitin,

To check if everything is ok with the Host Agent you should use:

/usr/sap/hostctrl/exe/saphostexec -status

and check if the 3 processes saphostexec, sapstartsrv and saposcol are running fine.

Additionally it is always worth it to have a look at the Host Agent logfiles situated in /usr/sap/hostctrl/work. Important are sapstartsrv.log and dev_saphostexec

If there are any ERRORs in these logs, you should see if you can find them in the troubleshooting guide or open a css message on bc-ccm-hag.

SAP Host Agent - Frequently Asked Questions

SAP Host Agent Troubleshooting Guide

Best Regards,

Christian

Former Member
0 Kudos

Hi Christian,

Thanks for the reply It seems that I am missing saphostexec file 😞

rpm -V SAPHostAgent-720.171-0.x86_64

.....U..    /usr/sap/hostctrl/exe/SAPCAR

.M...U..  c /usr/sap/hostctrl/exe/host_profile

.....U..    /usr/sap/hostctrl/exe/hostagent.mf

.....U..    /usr/sap/hostctrl/exe/hostagent_acknowledgements.txt

.M...U..    /usr/sap/hostctrl/exe/hostexecstart

.....U..    /usr/sap/hostctrl/exe/ldappasswd

.....U..    /usr/sap/hostctrl/exe/ldapreg

.....U..    /usr/sap/hostctrl/exe/librfccm.so

.....U..    /usr/sap/hostctrl/exe/libsapacosprep.so

.....U..    /usr/sap/hostctrl/exe/libsapcrypto.so

.....U..    /usr/sap/hostctrl/exe/libsapdbadactrl.so

.....U..    /usr/sap/hostctrl/exe/libsapdbdb6ctrl.so

.....U..    /usr/sap/hostctrl/exe/libsapdbhdbctrl.so

.....U..    /usr/sap/hostctrl/exe/libsapdboractrl.so

.....U..    /usr/sap/hostctrl/exe/libsapdbsybctrl.so

.....U..    /usr/sap/hostctrl/exe/libslcryptokernel.so

.....U..    /usr/sap/hostctrl/exe/libslcryptokernel.so.sha256

.....U..    /usr/sap/hostctrl/exe/lssap

.....U..    /usr/sap/hostctrl/exe/sapacosprep

.....U..    /usr/sap/hostctrl/exe/sapcimb

.....U..    /usr/sap/hostctrl/exe/sapcimc

.....U..    /usr/sap/hostctrl/exe/sapcontrol

.....U..    /usr/sap/hostctrl/exe/sapcpp47.so

.....U..    /usr/sap/hostctrl/exe/sapdbctrl

.....U..    /usr/sap/hostctrl/exe/sapgenpse

.....U..    /usr/sap/hostctrl/exe/saphostctrl

missing     /usr/sap/hostctrl/exe/saphostexec

.....U..    /usr/sap/hostctrl/exe/saposcol

.....U..    /usr/sap/hostctrl/exe/sapstartsrv

.M...U..    /usr/sap/hostctrl/exe/sapuxuserchk

.....U..    /usr/sap/hostctrl/exe/sldreg

.....U..    /usr/sap/hostctrl/exe/sldreglib.so

.....U..    /usr/sap/hostctrl/exe/xml71d.so

.....U..    /usr/sap/hostctrl/work

.M...U..    /usr/sap/tmp

any suggestions as to what should be my next step?

Regards,

Nitin Jain

0 Kudos

Hello Nitin,

saphostexec is one of the central executables of SAP Host Agent. In your case it would be best to reinstall the Host Agent. It should work if you use the latest SAP Host Agent rpm package and upgrade your Host Agent installation. The missing saphostexec should be replaced and you should be able to start the Host Agent via. "saphostexec -restart" afterwards.

Best Regards,

Christian

PS: see Note 1031096 for Information about Host Agent installation (without rpm).

Former Member
0 Kudos

Hi Christian,

That is done, now the HLM and Hostagent both seems to be up and running, but still I cant not get a view of HLM in the browser using https://<host>:1129/lmsl/HLM/<SID>/ui/index.html. the browser do ask for a user and password (which I am entering ad SIDadm ) but it does not display anything.

all I want to do for now is deploy HANA live content on the HANA server. and there is an option of doing that using the command line client which I am exploring right now, any clue how it would work, or what would be the installation path for the HANA live content?

Many Thanks,

Nitin Jain

Former Member
0 Kudos


Hi Nitin,

Check the logs in the following path /usr/sap/hlm_bootstraps/<sid>/HLM/log/hlm.log to get some more details for the issue.

Page 35 of http://help.sap.com/hana/SAP_HANA_Update_and_Configuration_Guide_en.pdf describes deploying through command line.

Regards,

Ram.

tomas-krojzl
Active Contributor
0 Kudos

Hello,

...and last comment - there is script that you can use to start host agent:

As root execute: /etc/init.d/sapinit

(usage: /etc/init.d/sapinit {start|stop|status|restart})

So you can start via: /etc/init.d/sapinit start

Tomas

0 Kudos

Hello Tomas,

You have to very careful here. If you use sapinit stop / start to control the HostAgent, you will stop and start ALL sapstartsrv processes on your system. This way you will stop the Host Agent and all running SAP instances on the System. I hope this is not what you want to achieve!

The correct way to stop and start the Host Agent is to use (as root):

/usr/sap/hostctrl/exe/saphostexec -stop / -start

(as SIDadm)

/usr/sap/hostctrl/exe/hostexecstart -restart / -start

Please see these sites for more information:

SAP Host Agent - Frequently Asked Questions

SAP Host Agent Troubleshooting Guide

Regards,

Christian

tomas-krojzl
Active Contributor
0 Kudos

Hello Christian,

yes - of course - it was meant in context of the question - when you have problem with installing SAP HANA then there is no risk you will accidentally stop it and have outage.. log seems to be from UI tool which is used for initial installation of appliance and not for adding additional SAP HANA instances - so I also assumed MCOD is not the situation.. bottom line no risk expected in situation above..

advantage of stopping host agent in this way is proper restart in similar way like if you would reboot whole OS - in other words this is like reboot without having to reboot OS (you just restart main SAP service - which will take host agent and other processes along with it)... in my opinion this is best to do in example which was mentioned above in question (much better then just restarting one process)...

but you are right that random reader might came to conclusion that this is the command used to stop ONLY sap host agent and try it on already running system which would then cause outage... so definitely adding warning would be appropriate...

Tomas