cancel
Showing results for 
Search instead for 
Did you mean: 

SAPCONTROL Error-FAIL: Service definition not found in /usr/sap/sapservices

Former Member
0 Kudos

Hi ,

I installed SAPHOSTAGENT (Pre requisite for SMD 7.11).

I stopped sapcontrol with the below command

"sapcontrol -nr 99 -function StopService"

But when trying to start i am getting the below error

StartService

FAIL: Service definition not found in /usr/sap/sapservices.

Can you please let me know what should be added in sapservices file?

When i stopped sapcontrol both the below processes are also stopped ,I am not sure about the reason.

/usr/sap/hostctrl/exe/saposcol pf=/usr/sap/hostctrl/exe/host_profile

/usr/sap/hostctrl/exe/saphostexec pf=/usr/sap/hostctrl/exe/host_profile

Will all the processes be stopped if sapcontrol is stopped ?I thought only when saphostexec is stopped all the related proceses will stop.

I guess i need more clarification on how saphostagent works.....

Please let me know how to solve the above error...

Thanks in Advance......

Thanks,

Srini

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I'm confused about the instance number 99.

Besides that, an entry is missing in services-file.

This is the format for the entries:

sapdp<instance> 32<instance>/tcp

In your example, that would be

sapdp99 3299/tcp

Make sure that the services file ends with an empty line.

Former Member
0 Kudos

Hi Tomas,

I think you are refering to services file in /etc/services,but the error message clearly states that it is in /usr/sap/services.

I am trying to start the host agent .

Thanks,

Srini

Former Member
0 Kudos

You are right. I read it too fast.

Sorry

Answers (4)

Answers (4)

0 Kudos

You should not use the StopService method to Stop the hostagent.

you should use "hostexec -stop"

But if you are getting the error "FAIL: Service definition not found in /usr/sap/sapservices." to any other SAP system, see note

1868668 FAIL: Service definition not found in /usr/sap/sapservices.

bernd_hammermeister
Discoverer
0 Kudos

Hi Srini,

it looks like a diagnostic agent to start and stop.

I had the same problem.

You do not need to insert any entries in /usr/sap/sapservices

Please try:

su - <SID>adm -c "smdstart.sh <SID> 99" ## to start the agent

su - <SID>adm -c "smdstop.sh <SID> 99" ## to stop the agent

You can find the smdstart and smdstop in /usr/sap/<SID>/exe

Former Member
0 Kudos

To register sapstartsrv in the /usr/sap/services file you have to run the following:

/usr/sap/hostctrl/exe/saphostctrl -function RegisterInstanceService \

-sid <SID> -nr <instance number> -saplocalhost <hostname> \

-profile <path to instance start profile>

Former Member
0 Kudos

What OS are you running? I can remember that instance number 99 was not allowed for HP-UX..

Kind regards,

Mark

Former Member
0 Kudos

Hi Dijsselbloem ,

Our OS is SOLARIS .

Thanks,

Srini

Former Member
0 Kudos

I'm still curious about instance 99.

What is running under that instance number?

Former Member
0 Kudos

Hi Tomas,

I am installed SAPHOSTAGENT which is a prerequiesite for SMD 7.11 which gets installed with 99 as default.

I am still having issue when trying to register.

  1. ./saphostctrl -function RegisterInstanceService -sid SAP -nr 99 -saplocalhost bsbx01 -profile /usr/sap/hostctrl/exe/host_profile

Error: SAP Instance SID='SAP', NR='99', SAPLOCALHOST='bsbx01' not found. Please check your installation (e.g. profile parameter SAPLOCALHOST).

Thanks,

Srini

Former Member
0 Kudos

What entries do you have in the host_profile?

Former Member
0 Kudos

believe your /usr/sap/sapservices file is missing with below entry, please check

START_<SID>_<Instance_number>_<Hostname>: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>

OR

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>

Former Member
0 Kudos

Sreenivas,

Both the entries you mentioned are for SAP instance but i am getting the below error while starting host agent

Tomas,

host_profile has the below entries

  1. more host_profile

SAPSYSTEMNAME = SAP

SAPSYSTEM = 99

service/porttypes = SAPHostControl SAPOscol

#SAPHostControl NwaManagement SAPCCMS

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

Thanks,

Srini

Former Member
0 Kudos

Hm. Strange.

The error message says that the SAPLOCALHOST can not be found.

I would at least try to add such a entry to the host_profile

SAPLOCALHOST=bsbx01

And then give the register command again to see if it works then.

Former Member
0 Kudos

For start can you try this

cd /usr/sap/hostctrl/exe/

./saphostexec pf=/usr/sap/hostctrl/exe/host_profile

Regards,

Sreenivas.Y

Former Member
0 Kudos

Sreenivas,

I already tried that and hostexec is running

-


ps -ef |grep host

root 5821 7507 0 Jul 13 ? 0:03 ./saphostexec -start pf=/usr/sap/hostctrl/exe/host_profile

root 5835 7507 0 Jul 13 ? 7:50 /usr/sap/hostctrl/exe/saposcol -l pf=/usr/sap/hostctrl/exe/host_profile

root 22363 17581 0 08:33:54 pts/24 0:00 grep host

sapadm 5823 7507 0 Jul 13 ? 3:52 /usr/sap/hostctrl/exe/sapstartsrv pf=/usr/sap/hostctrl/exe/host_profile -D

-


I need some clarification here ,

When hostexec is started do we still need to start sacontrol and saphostctrl????What is the order of start and stop procedure for host agent?

Thanks,

Srini