Showing posts with label SAP Solution Manager. Show all posts
Showing posts with label SAP Solution Manager. Show all posts

9/28/2017

SAP Installation of SMD Agent With SWPM SP04

In the Diagnostics Agents page we have seen Diagnostic Agent installation-related Information and all key SAP Notes having all required detail. To summarize that info I would like to introduce some steps on how to install the latest Diagnostic Agent (includes SAP Host Agent). This Diagnostic Agent is compatible with any SP level of SAP Solution Manager 7.1. Also, you don't have to do a separate SAP Host Agent installation, if you have followed these steps. You can also activate the Agents On-the-fly feature with this Diagnostic Agent.


Note:  
When carrying out the below steps, make sure you have read and understood the Diagnostics Agent Installation Strategy PDF file attached with SAP Notes: 1365123  
            and sap note 1833501 for diagnostic agent installer version that is mentioned in the General Information section here: Diagnostics Agents. They explain the strategy, download procedure, and installation details.
Note: These steps have been performed on MS Windows server 2003 Enterprise Edition X64 bit encoding, so in your case, the file name could be different.

Download and extract the Installer media file.
To start the installation you need to first download the  Software Provisioning Manager 1.0 and their relevant kernel file. Once the correct files are downloaded have you need to unpack those.





Following these steps below you can download the Kernal media file.







Once the download is finished then you have to unpack these 2 files



Once you unpack those files then you have something like below,  Once you see these files available then you are ready to launch the installation.



After launching SAPINST.EXE  you will have to select this option below to go ahead.



Here you need to select the path of Kernal file been extracted in the same folder D:\download_basket\SWPM_SP04\Krnl_7.20_WIN__IA32__IA64__x64__SP04_








Note: here on this step 2 user gets created on OS level, you need to make sure on this server these users have admin-level or rights
 also they should have full Read + Write + Execute access to any folder and subfolder available on this server.







Note : This part below registering to the SLD is not advisable with the newer Solution Manager system so this step could be ignored and direct do to the next step Connection of diagnostic agent with Solution Manager. 

On this step if the user credential of target SLD system  is correct then this agent get register to the SLD. Here target SLD Could be any in your landscape usually you should connect this agent to the same SLD where your Managed system is reporting to using RZ70 or JAVA data supplier. This is optional step but it is strongly advise to connect agent with some SLD.





















If you have SAP MMC Installed on the same server then you can see a new Instance of SMD Agent is available, should appear something like this below, from here you can start or stop agent.
 

To make sure if the SMD Agent is connected to the SLD detail you have provided before, just logon to SLD and navigate to this below screen here you will see an agent instance is available under Diagnostic Agent Class.


SAP diagnostics agents

Diagnostics Agents

Skip to end of metadata

Installation

General Information

Following documents are most relevant for installing and working with the Diagnostics Agent:
  • Refer to SAP Note 1365123 for the Diagnostics Agent installation strategy. 
  • Refer to SAP Note 1833501 for information on Diagnostics Agent installer versions, and for an overview of SAP Notes related to Mass Deployment / Unattended Installation.
  • Refer to SAP Note 1858920 and the latest Installation and Setup Guide for:
    • Information on how to access the Product Availability Matrix (PAM) for the Diagnostics Agent
    • Instructions on how to download the Installation Media
    • Instructions on how to patch the Installation Media
    • Details on supported kernels
    • Description of the unattended/silent installation mechanism
    • SMD Setup Script (smdsetup.bat/smdsetup.sh) documentation
    • More detailed installation instructions

Download Paths

Artifacts required for Diagnostics Agent installations can be downloaded as follows (for detailed instructions and alternative paths refer to latest Diagnostics Agent Installation and Setup Guides):
  • Go to http://support.sap.com/sltoolset
    • Product Availability Matrix/PAM:  search for "Product Availability Matrix"
    • Documentation:  System Provisioning  →  System Provisioning Scenarios →  Install a System using System Provisioning Manager →  Installation Option of Software Provisioning Manager 1.0 → Installation Guides - Standalone Engines and Clients → Diagnostics Agent  → download the guide for your  "Operating System Platform"
    • "installer":  System Provisioning → Download Software Provisioning Manager → SOFTWARE PROVISIONING MGR 1.0 → DOWNLOADS → → SWPM10SP*.SAR
  • For download of individual archives go to SAP Note 2253383
  • Check SAP Note 1858920 and the Product Availability Matrix for supported kernel versions

Recommended Reading

Which agent version should be used?

Please refer to the above mentioned Diagnostics Agent Installation Strategy SAP Note.

Where to install an agent?

Please refer to the above mentioned Diagnostics Agent Installation Strategy SAP Note.

Where to download the agent installation files?

Please refer to the General Information section above.

Connection Configuration

Refer to the installation procedures contained inside the Diagnostics Setup Guide.

Connection options

Before starting the installation make sure that you have identified which installation strategy you want to use. This means that you need to choose between the two following scenarios:
  • Direct Solution Manager Registration: In this scenario, the Diagnostics Agent establishes a direct connection to the Solution Manager system. Using this type of connection no SLD attachment is necessary especially since Solution Manager 7.1 SP05. Operational issues concerning Diagnostics Agents to Solution Manager connectivity can now be easily resolved via the “Non-authenticated Agents” list. (See Non Authenticated Diagnostics Agents).
    Prerequisite: Diagnostics Agent was connected to a Solution Manager 7.1 SP05 system at least once.
  • SLD Registration: In this scenario, the Diagnostics Agent registers itself into the production SLD assigned to the managed system on which the Diagnostics Agent will be installed. This scenario should be used especially if Solution Manager is not yet installed.

SLD Registration - Remotely Connect DIagnostics Agents  - Solution Manager 7.1

If you choose the "SLD Registration" strategy, the Diagnostics Agent should be visible using SOLMAN_SETUP transaction -> System preparation -> Step "Connect Agents". You must connect the relevant Diagnostics Agents to the current Solution Manager system in order to later be able to use them.
Agent reconnection may require waiting several minutes. It depends on settings which are set on the SMD Agent side. As soon as it detects that the association has been changed the SLD state is updated and the registration should proceed.

Direct Solution Manager Registration

If you want to perform the "Direct Solution Manager Registration" after the installation of the Diagnostics Agent, you will need to perform the smdsetup script action managingconf.
You can perform the direct connection to the solution manager in two ways, using the J2EE Message Server HTTP port (recommended). For more information about the smdsetup script refer to the Diagnostics Agent setup guide attached to the SAP Note for the most recent installer release (see SAP Note 1833501).
Example:
  • Connection by Message Server:
smdsetup managingconf hostname:"sapms://" port:"" [optional user:"<...>" pwd:"<...>"]
To run these script we will need to following information:
  1. Full qualified solution manager hostname.
  2. J2EE Message Server HTTP Port, like 81.
  3. Diagnostics Agent system user: For more information about these user check the User Administration Guide.
  4. Diagnostics Agent system user password.
Where to find the J2EE Message Server HTTP port.
  • J2EE Message Server HTTP: This port is usually 81XX (where xx is the SCS instance number: /usr/sap//SCS).
Make sure that you address the Solution Manager Java SCS Message Server with the above mentioned port number. URL.  Enter in the following URL: http://:/msgserver/text/logon
This shall display a P4 and/or P4S line, like here:


Having all necessary information, you have to perform the smdsetup script to connect the Diagnostics Agent to the Solution Manager system:
   1. Open a prompt command and navigate to the script folder inside of the agent path: usr/sap//SMDAXX/script
   2. Run the smdsetup script as the following examples:
  • Connection by Message Server:
     - smdsetup managingconf hostname:"sapms://solman.full.qual.host.name" port:"81XX" user:"SMD_ADMIN" pwd:"XXXXXXXX"
  •  Afterwards, the command should finish successfully:
Then check at the “Agent Administration” if the agent is connected to the Solution manager. If the agent does not connect to the Solman system check the SMDSystem log for error. This log file can be found into the log folder at the agent path.
IMPORTANT: Note that SAP recommends to use the connection via the Solution Manager Java SCS Message Server. Trying out a direct connection via the P4 or P4S port, is only relevant in some very specific situations.

Connect the Diagnostics Agent to Solution Manager Using SSL 

How to Configure the Different Ciphers on the Diagnostic Agent

Please refer to SAP Note 2849162.

Frequently Asked Questions and Trouble Shooting

Please refer to the FAQ Diagnostics Agent.

9/06/2017

Connect SAP Diagnostics Agent to Solution Manager using SSL

Перейти к концу метаданных
    The aim of this wiki is to help in enabling the configuration to connect the Diagnostics Agents to the Solution Manager 7.10 using SSL, as described in note 1898685. Actually, the focus is narrowed down to prerequisite #2 of step #2, described in the same note.

This configuration is not valid for Solution Manager 7.20.

Prerequisites

The prerequisites are the deployment of the IAIK libraries in the Diagnostics Agent, as described in note 1898685  and the SSL configuration for the Solution Manager Message Server and P4 ports.

Solution 

Configure transport layer security on Solution Manager JAVA Stack

The configuration of the Solution Manager Java Stack to enable secure communication is described in detail in the following guide: 
The following setup step needs to be performed to enable secure communication on the Solution Manager Java stack:
Configure SSL on AS Java:
  1. Create SSL Credentials: in the Visual Admin(/usr/sap/<SID>/DVEBMGS<xx>/j2ee/admin) of the Solution Manager, select the Key Storage, under Server > Services. Create new credentials or check the validity f the already available credentials for service_ssl:

    Detailed information and the how to guide is available under: http://help.sap.com/saphelp_nw70ehp2/helpdata/en/a6/98f73dbc570302e10000000a114084/content.htm.
  2. Assign SSL Credentials to HTTPS communication port: Access the SSL provider with the following path: Server > Services > SSL Provider. Select the configured HTTPS port (default is 5xx01) and assign the SSL certificate created in the previous step as "Server Identity".
     
  3. Assign SSL Credentials to the P4S communication port: Access P4 provider with the following path: Server > Services > SSL Provider. Select the configured P4S port (default is 5xx06) and assign the SSL certificate created in the frist sttep of this section as "Server Identity".

    Further documentation about SSL configuration for Solution Manager Java Stack is available in the following documentation:  http://help.sap.com/saphelp_nw70ehp2/helpdata/en/f1/2de3be0382df45a398d3f9fb86a36a/frameset.htm.

Configure SSL on Message Server for Solution Manager ABAP and JAVA Stack

This section is relevant if you want to use MS HTTPS and P4S connection.
The executable directory of the message server needs the SAPCRYPTO libraries installed. For a message server running as part of Central Instance of ABAP stack this is already performed in step ”Install SAP Cryptographic Library and set Profile Parameters”. For Message Server on Java Central Service Instance (SCS) and ABAP Central Service Instance (ASCS) execute the same procedure. Also make sure a valid server identity is available in $DIR_INSTANCE$/sec that a valid SAPSSLS.pse. For simplification it is possible to reuse the server identity as created for the Solution Manager ABAP Stack.
Add the following parameters to the Central Services Instance Profile to enable Message Server HTTPS port:
ms/server_port_1 = PROT=HTTPS,PORT=444$$

SAP Host Agent Troubleshooting Guide

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 add or 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. Add or modify the required values, for example:
    hostexec/trace = 3  
    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 sapstartsrvprocess 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.
Other probable reasons for this error are:
  1. /usr/sap/hostctrl/work and/or /usr/sap/hostctrl/work/sapstartsrv.* is not writable for the sapadm user
  2. /tmp directory is not writable for the sapadm user or filesystem has no free space left.
The sapstartsrv error message in the system log should give you a hint why it cannot be started.

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 default trace level dev_sapdbctrl contains messages like
    [PID 23258] *** ERROR => Database neither found in '/var/opt/oracle/oratab' nor in inventory and environment of 'ora<sid>' user. Giving up... [dboractrlux.cpp 611]
  • 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:
To correctly detect Non-RAC Oracle databases:
  1. The database instance must be maintained in /etc/oratab (Solaris: /var/opt/oracle/oratab)
  2. or a central Oracle inventory must exists and the ORACLE_HOMEs of all databases must be registered. Also the central inventory pointer file must exist and contain the correct path to the central inventory.
And for RAC databases:
  1. SAP Host Agent 7.21 PL 14 must be installed
  2. The GRID/ASM instance must be maintained in /etc/oratab (Solaris: /var/opt/oracle/oratab). E.g.
    +ASM1:/u01/app/12.1.0.2/grid:N
  3. or a central Oracle inventory must exists and the ORACLE_HOMEs of at least the GRID/ASM instance must be registered. Also the central inventory pointer file must exist and contain the correct path to the central inventory.
Normally, all this is created by the Oracle/SAP installation tools.
Please note, from Oracle 11.2 onwards the so called runtime home must be maintained in the oratab file. Refer to Wrong Oracle database status on Unix for more details on that.
For details on how to check the central inventory pointer file you can refer to e.g. http://docs.oracle.com/cd/E11882_01/em.112/e12255/oui2_manage_oracle_homes.htm#CJAEHIGJ. For details on how to check whether the central inventory exists and which ORACLE_HOMEs it contains you can refer to e.g. http://docs.oracle.com/cd/E11882_01/em.112/e12255/oui2_manage_oracle_homes.htm#CHDEHFBJ.
If the central inventory does not exist or it doesn't contain all ORACLE_HOMEs, you can create or adapt 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>"

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

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

Issues with Oracle 12c databases on Unix


For Oracle 12c the ora<dbsid> user is still needed. Please refer to Note 1915323 for more details on this. In case the user was removed it can be recreated as described in Note 220421.

At least Host Agent 7.21 PL6 is needed for general Oracle 12c support. At least 7.21 PL16 is needed for Oracle 12c Multitenant databases.

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.

Remark: On Windows (in Unix by default) the service/admin_users in the host_profile are case sensitive and need to be defined exactly as the user running the service. For example service running as <SMD>ADM\SAPServiceDAA cannot be defined as <smd>adm\SAPServiceDAA in the host_profile. The upper and the lower case letters must match.

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.

Unable to detect Microsoft IIS applications


Symptom:
The command to retrieve list of IIS web applications fails with error "Invalid namespace":

"c:\Program Files\SAP\hostctrl\exe\saphostctrl.exe" -function GetCIMObject -namespace WebAdministration -enuminstances Application -user sapadm <password>

Error: CIM Request EnumerateInstances for classes Application failed: EnumerateInstances for Application failed: Invalid namespace

Solution:
Please ensure that the "IIS Management Scripts and Tools" are installed. For example, with Windows 2008 this can be checked via Server Manager -> Roles -> Web Server -> Add Role Services.

Username/Password-based authentication fails on Unix

Symptom:
When a Web service method of the Host Agent is called or a Web-UI is accessed via the Host Agent (e.g. SUM) Username/Password-based authentication fails although the correct credentials were supplied.
Solution:
Ensure that the Host Agent is correctly installed/updated as described in Note 1031096. A common error is that the host agent files are manually copied into /usr/sap/hostctrl/exe or the host agent archive is just directly extracted into /usr/sap/hostctrl/exe. This results in invalid file ownership and permission, which in turn breaks various functionality like e.g. the Username/Password-based authentication.
To fix this install the Host Agent as described in Note 1031096.

Host Agent fails to load clean root user environment on startup or installation/upgrade

When starting or upgrading the Host Agent you see the following messages:
Executing "'/bin/su' '-' '-c' 'echo SAPHOSTAGENT-START;env;echo SAPHOSTAGENT-END' "
*** WARNING => Timeout, helper didn't answered within 30 sec...
*** ERROR => Unable to load clean root environement.
Starting with 7.21 PL8 the Host Agent is trying to load a clean root user environment during startup. This is done by running a (non-interactive) root user login shell. This step hangs and is therefore interrupted after some timeout.
Typical reasons for that are some prompts issued by shell login scripts requesting manual user input. You can check this by e.g. running the following command:
/bin/su - root -c env </dev/null
Please ensure that these non-interactive root user login shells don't hang/require any user input.
E.g. in the shell login scripts you can use the 'tty -s' command to check whether the shell is interactive and only in this case execute commands that require user input.

Popular Posts