on 01-04-2010 1:06 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.