cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with /etc/rc.d/init.d/sapinit on RHEL 5.1

Former Member
0 Kudos

I have a problem with the /etc/rc.d/init.d/sapinit on a RedHat EL51 installation.

The Application Server was installed by a SAP Partner and this file was never initiated into the services. It's just there and never used.

Now we need to go Production with the system and we would like to have some type of monitoring oft the Application Server to make sure it is running.

Trying the ./sapinit status fails with the following error message

tail: cannot open `+2' for reading: No such file or directory

running

Is there a fixed sapinit file available where the "tail" is used correctly on a RedHat linux EL 5.1 setup?

I did a small try just changing the "tail +2" into "tail -n +2" but this was not the solution. The "running" message disapeared with this fix...

Our setup is splitted... meaning The DB server is on a Separate host and the Application server is running on it's own Linux Server.

Regards,

Mats

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Mats,

That's a bit strange. Afaik sapinit should be the same for all flavours of Unix/Linux. Maybe yours was damaged somehow.

Have a look at SAP note 823941; there's a current version of sapinit attached.

hope this helps

Former Member
0 Kudos

Hi Joe,

This was the issue. the sapinit was never updated at the time they updated the DB from 10.2.0.2 to 10.2.04 and the application part. and I was kind of on the right way with my tail -n +2. Was just that in the new sapinit there was a new function linux_get_process_args where tail was used the correct way for Linux.

Thanks for the tip on this Note.

Then I might add an add-on question to the sapinit.

On the Production Servers we only have one Instance of the application service but on the Development and Integration instances we have them running on the same physical server.

How would this work on such a setup? Somehow sapinit is supposed to read /usr/sap/sapservices for getting the LD_LIBRARY_PATH correct and from what I can see this one is tied to one single SAP Instance. Any idea on how to handle this

Creating a 2nd sapinit_XYZ where one change the environment variable SAPSERVICE_PATH to point to a /usr/sap/sapservices_YYZ and in the /usr/sap/sapservices_XYZ set the LD_LIBRARY_PATH to sute the XYZ Instane?

Thanks in advance

/Mats

Former Member
0 Kudos

Somehow sapinit is supposed to read /usr/sap/sapservices for getting the LD_LIBRARY_PATH correct and from what I can see this one is tied to one single SAP Instance

That's correct, but read the note mentioned above:

Create a file called 'sapservices' in the '/usr/sap/' directory. The file should contain the corresponding commands to be able to start the SAP Start Service (sapstartsrv) for each installed SAP instance on the server.

You need several entries in sapservices, each one with its correct LD_LIBRARY_PATH.

regards

Former Member
0 Kudos

Thanks Joe,

Problem Solved!

Former Member
0 Kudos

Sorry, Problem not completely solved.

sapinit doesn't work correctly on some installations here. I guess that's also connected to that we can use just startsap to start the application server. On some of the Linux servers we need to start with startsap <hostname> allthough I'm not sure this is the full truth.

I've not fully checked the startsap script but at one place I've seen that it expects the virtual hostname as argument $3.

Anyhow I've noticed that hostname is not correctly retrieved on Linux. Should be hostname -s (I suppose).

So, question is if there's an updated startsap script as well (like the sapinit) ?

Regards,

Mats

Former Member
0 Kudos

That's one of the cases where a search in SAP notes will help.

Keywords startsap and download will lead you to 809477.

regards

Former Member
0 Kudos

OK, slapping my face my self Sorry!

Downloading the fixes

Answers (0)