Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 8392

SAP Host Agent Troubleshooting Guide

$
0
0

 

Changing the default trace level of SAP Host Agent


SAP Host Agent runs with tracelevel 1 by default.
If you need more information to be able to analyze an issue, you can change the following profile values:

 

hostexec/trace
service/trace


Proceed as follows:

  1. Open the SAP Host Agent profile ( host_profile ) which is located in the exe directory of the SAP Host Agent (/usr/sap/hostctrl/exe/ or C:\Program Files\SAP\hostctrl\exe\).
  2. Modify the required values, for example hostexec/trace = 3 and service/trace = 3.
  3. Restart SAP Host Agent by executing saphostexec -restart (as a user with root authorization) or hostexecstart -restart (as user <sapsid>adm)

 

All SAP Host Agent log files in /usr/sap/hostctrl/work/ (UNIX) or C:\Program Files\SAP\hostctrl\work\ (Windows) now contain much more information.

 

 

 

Start of SAPHostExec Service / saphostexec executable failed. dev_saphostexec log file contains error message "ERROR => Setup of too many communication channels failed"

Reason:

The sapstartsrv process of the Host Agent is not able to start.

 

Solution(UNIX):

Proceed as follows:

  1. Stop the Host Agent with saphostexec -stop .
  2. Check that there are no running processes which belong to SAP Host Agent, and kill any remaining Host Agent's sapstartsrv processes.
  3. Delete the  /tmp/.sapstartsrv99_sapstartsrv.log and content of the Host Agent's work directory.
  4. Restart SAP Host Agent by executing saphostexec -restart (as a user with root authorization) or hostexecstart -restart (as as user <sapsid>adm
  5. Check the system log for the error messages from the sapstartsrv process of the Host Agent

Note:
Probably, there are multiple sapstartsrv processes running: One from the SAP Host Agent and one from each SAP instance. Just ensure that there is no SAP Host Agent sapstartsrv process running. You can identify it by the start parameter, which is pf=/usr/sap/hostctrl/exe/host_profile and by the assigned user, which is sapadm.

 

 

Solution(Windows):

 

Check the Application Log in the Windows Event Viewer for the error messages from the SAPHostControl service

 

 

 

Oracle databases cannot be detected on Unix

 

Symptom:

  • Web service method ListDatabases does not return Oracle databases or not all Oracle databases
  • Other database Web service methods (for example GetDatabaseStatus) return the error message "Database not found" for Oracle databases.
  • With trace level 3 (host_profile: service/trace = 3) the trace file /usr/sap/hostctrl/work/dev_sapdbctrl contains messages like the following:

[PID 10682408] Looking up databases in inventory
[PID 10682408] Retrieving inventory location from '/etc/oraInst.loc'
[PID 10682408] Retrieving inventory data from '/oracle/oraInventory/ContentsXML/inventory.xml'
[PID 10682408] *** ERROR => Failed to open file '/oracle/oraInventory/ContentsXML/inventory.xml': No such file or directory
[PID 10682408] No installations registered in inventory

or like the following:

[PID 10682408] Looking up databases in inventory
[PID 10682408] Retrieving inventory location from '/etc/oraInst.loc'
[PID 10682408] Retrieving inventory data from '/oracle/oraInventory/ContentsXML/inventory.xml'
[PID 10682408] No installations registered in inventory

 

Solution:

SAP Host Agent is only able to detect Oracle databases if a central Oracle inventory exists and the ORACLE_HOMEs of all databases are registered. Normally, this inventory is created and maintained by the Oracle Universal Installer. If it does not exist, you can create it with the Oracle runInstaller tool.

For example, you can do this by executing the following command:

runInstaller -attachHome ORACLE_HOME="<Oracle_Home_Location>" ORACLE_HOME_NAME="<Oracle_Home_Name>"

For more information, refer to http://docs.oracle.com/cd/E11882_01/em.112/e12255/oui2_manage_oracle_homes.htm.

 

Wrong Oracle database status on Unix

 

Although the database is started and running fine it will be reported as stopped. E.g.:

 

# /usr/sap/hostctrl/exe/saphostctrl -function GetDatabaseStatus -dbname C11 -dbtype ora

Invalid databases status Database Status: Stopped

    Component name: Instance (Instance), Status: Stopped (Instance is stopped)

    Component name: Database (Database), Status: Stopped (Database is stopped)

    Component name: Archiver (Archiver), Status: Stopped (Archiver is stopped)

    Component name: Listener (Listener), Status: Running (Listener is started)

 

Please ensure that the correct Oracle home directory is maintained in /etc/oratab (Solaris: /var/opt/oracle/oratab).

From Oracle 11.2 onwards the so called runtime home must be maintained in the oratab file. E.g.:

 

C11:/oracle/C11/112_64

 

Or for an RAC instance, e.g.:

 

C11001:/oracle/C11/112


You can refer to Note 1524205 for details on the runtime home.

 

SAP Solution Manager Diagnostics (SMD) Agent is not able to connect to SAP Host Agent

 

Symptom:

The following issues may arise while the SMD agent is connecting to SAP Host Agent for the first time:

 

Trusted connect is not working

We assume the <smd>adm user is used for the installation of the SMD agent installation, where <smd> is the system ID of the SMD agent ("DAA" by default).

 

Solution:
Proceed as follows to check if SAP Host Agent is working correctly:

  1. Log on on the respective server as <smd>adm.
  2. Execute the following command (Note: Instance number is always 99. This is not an example!) :
    on UNIX:

    /usr/sap/hostctrl/exe/sapcontrol -nr 99 -user "" "" -function ConfigureLogFileList add /tmp

    on MS Windows (replace the <smdadm> and <password for smdadm> with your user and password):

    c:\usr\sap\DAA\SMDA97\exe\sapcontrol.exe -user <smdadm> <password for smdadm>  -nr 97 -function OSExecute "\"c:\Program Files\SAP\hostctrl\exe\sapcontrol.exe \" -user \"\" \"\" -nr 99 -trace - -function ConfigureLogFileList remove testLogFile.txt"  0 0 c:\temp\tst_out.txt

 

If the output of the command prompt is as follows, the trusted connect works:

 

12.12.2012 11:25:27
RequestLogonFile
OK


12.12.2012 11:25:27
ConfigureLogFileList
OK

 

This generally means that Trusted Connect has been configured correctly on the part of SAP Host Agent.
However, the SMD Agent call might fail. In those cases you should proceed as follows:

 

Check if ACLs are used. In the host_profile file you can find a configured entry: service/http/acl_file=<filepath>
If yes, check in the ACL files if all the relative IP Addresses of the local machine are configured correctly.

 

Alternatively you can proceed as follows:

  1. In the host_profile, specify service/trace=3
  2. Restart Host Agent with the following command: saphostexec -restart
  3. Trigger the SMD scenario
  4. Check if entries like NiAcl .... denied are contained in the sapstartsrv.log file. If yes, the ACL configuration is wrong and this is the root cause of that issue.

 

If the sapcontrol call does not return with OK, you have the following options to proceed:

 

The output is: "FAIL: Permission denied"

The output of the command prompt is as follows:

ConfigureLogFileList
FAIL: Permission denied


Solution:
Proceed as follows:

  1. Check if the <smd>adm user is specified in the host_profile in line service/admin_users .
  2. If <smd>adm user is not specified there, add it.
  3. Restart the SAP Host Agent.

 

The output is: "HTTP/1.1 401 Unauthorized"

The output of the command prompt is as follows:

ConfigureLogFileList
FAIL: HTTP error, HTTP/1.1 401 Unauthorized


Analysis:

User <smd>adm seems not to be able to read the logon file. The cause might be that file system permissions or ownership are wrong.

 

Solution:

Ensure that the file permission and ownership are as follows:

 

# ls -lda /usr/sap/hostctrl/work/sapcontrol_logon
drwx--x--x 2 sapadm sapsys 4096 28. Apr 06:33 /usr/sap/hostctrl/work/sapcontrol_logon

 

Ensure that the <smd>adm user is member of the sapsys group and the user is able to access files in /usr/sap/hostctrl/work/sapcontrol_logon.


Error message "Remote access not permitted" in SMD agent logs

 

Ensure that you have at least Host Agent 7.20 patch level 179 installed.

 

Autoupgrade from shared directory not working on Windows

For windows, the Autoupgrade has certain prerequisites:

  1. The Host Agent system must have access to the share. The SAPHostExec service is doing the autoupgrade and this service is running as Local System Account. ( One can read more about the Local System Account on http://msdn.microsoft.com/en-us/library/windows/desktop/ms684190 ) Hence, the <System>$ account must have access to the shared directory.
  2. Autoupgrade is working with UNC paths only. "Mounted" directories (e.g. as Drive X:) do not work.

If the Host Agent System and the System with the shared directory are located in different windows domains, there must be a one way trust to access the share. That means, the domain of system A (the system with the shared directory) has to trust the domain of system B (the system with the Host Agent).

See http://msdn.microsoft.com/en-us/library/cc237016%28v=prot.10%29.aspx for more information on how to setup a domain trust.


Viewing all articles
Browse latest Browse all 8392

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>