cancel
Showing results for 
Search instead for 
Did you mean: 

sapstartsrv cannot be stopped with sapcontrol

Former Member
0 Kudos

Hi,

I am running a lot of SAP instances and i am writing start/stop scripts. When starting a Netweaver 7.0 instance (command: startsap) it automatically starts sapstartsrv (for java MMC functionality). When i stop the sap system (command: stopsap) it does not stop this service. You can stop this by using the following command:

sapcontrol -nr 00 -prot NI_HTTP -function StopService

However, this results in an error message:

StopService

FAIL: Method 'SOAP-ENV:Envelope' not implemented: method name or namespace not recognized

Does anybody have a clue what goes wrong?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi.

I've faced with the similar problem and I killed the process sapstartsrv where OSS note 1348820 states. And I'm able to go further.

Fatih ERTEN

Former Member
0 Kudos

For me the solution was to move the file under /usr/sap called sapservices . It had entries related to the other installation on the same host . once I replaced the file with an empty one the sapcontrol was able to stop sapstartsrv.

Hope someone can find this hint useful

Former Member
0 Kudos

Thanx for your response, you definitely pointed me in the right direction. I checked all my .sapstream* files and came to the conclusion that some of the files for my instance had a wrong owner. I guess they were a leftover of an older installation which i deleted including the user. So ownership was somthing like 138:sapsys. I stoped my sapinstance (stopsap r3) and stopped the sapstartsrv proces with command

sapcontrol -nr 28 -user <sidadm> <password> -prot NI_HTTP StopService

After all was stopped (also cleaned shared memory with cleanipc command) i deleted the .sapstream* files with wrong ownership. Then restarted the instance and all missing .sapstream* files were re-created with correct ownership. Now i can stop the sapstartsrv proces again without problems.

regards,

Bas

Former Member
0 Kudos

Hi

When i accidently tried it as orasid user instead of sidadm, then i get exactly the error you got. But as sidadm everything works fine (working as root as well). So this could be a permission problem on a file too.

I tested it on:

hp-ux ia64 NW7.0, kernel patch level 180

hp-ux ia64 NW7.1, kernel patch level 141

linux x86_64 NW7.0, 700, patch level 179

Maybe a kernel upgrade could help as well.

Best regards, Michael

Former Member
0 Kudos

Michael,

I tried as you suggested to execute the same command as <sid>adm, sqd<sid> and root. All give me the same error. I checked autorisations for file sapcontrol and it seems all ok. I am using linux (SLES9 SP4) on IA64 with maxdb database. My system is running NW7.01 (EHP3) and i have kernel package 23 running (latest).

edit

just tried something: i also supplied user credentials in the sapcontrol command using -user <user> <password>. I used the credentials for the <sid> adm and it works without problems. I am surprised that this option works and just executing the command as <sid>adm does not. I guess there is something corrupted in the <sid>adm home dir.

regards,

Bas

Edited by: B. v. d. Lienden on Mar 18, 2009 2:28 PM

Former Member
0 Kudos

Ok, the fact that you are not able to stop sapstartsrv as root, can indicate two things:

- you have not the same problem i have

- you did not specifiy /sapmnt/SID/exe in your LD_LIBRARY_PATH, and got this error

Could not open the ICU common library.

The following files must be in the path described by

the environment variable "LD_LIBRARY_PATH":

libicuuc.so.30, libicudata.so.30, libicui18n.so.30 [nlsui0_mt.c 1557] pid = 6829

However, i investigated further on my issue. I did an strace on the command and it revealed, that i was missing permissions on the socket file: /tmp/.sapstream50213

After i set the permissions to 777 i was able to do the sapcontrol command with ANY user

To trace a command use (this will execute the sapcontrol and show all system calls)

strace sapcontrol -nr 00 -prot NI_HTTP -function StopService

The Output is kind of hard to read, but in my case this Permission denied was the problem:

connect(3, {sa_family=AF_FILE, path="/tmp/.sapstream50213"}, 22) = -1 EACCES (Permission denied)

And this file was open by the specifc sapstartsrv process

root # lsof | grep sapstream50213
sapstartsrv  8028   sidadm    7u  unix 0x0000010238240380             366230542 /tmp/.sapstream50213

I hope this stuff is not too confusing

Regards, Michael