Documentos de Académico
Documentos de Profesional
Documentos de Cultura
0 EhP1
End-to-End Diagnostics
Diagnostics agent troubleshooting
Version 1.5, June 2009
END-TO-END DIAGNOSTICS
DIAGNOSTICS AGENT TROUBLESHOOTING
Contents
1 Introduction ......................................................................................................................................... 4
2 Pre-requisites ...................................................................................................................................... 5
2.1 OS support ................................................................................................................................... 5
2.2 JDK compatibility......................................................................................................................... 6
2.3 Managed System.......................................................................................................................... 8
2.4 SLD production system............................................................................................................... 9
3 Agent installation strategy................................................................................................................ 10
3.1 Standard environment............................................................................................................... 10
3.2 HA/virtualization environment .................................................................................................. 10
4 Agent installer.................................................................................................................................... 13
4.1 SAPinst Documentation ............................................................................................................ 13
4.2 Troubleshooting with SAPinst .................................................................................................. 13
4.3 OS configuration checks........................................................................................................... 14
4.4 JVM parameters ......................................................................................................................... 14
4.5 Startup scripts ........................................................................................................................... 15
5 Agent connectivity ............................................................................................................................ 18
5.1 Managing system....................................................................................................................... 18
5.2 Managed system ........................................................................................................................ 21
5.3 Full Qualified Name resolution issue ....................................................................................... 24
5.4 SAP router.................................................................................................................................. 24
5.5 Self-Monitoring .......................................................................................................................... 25
6 Agent Maintenance............................................................................................................................ 26
6.1 Upgrade SAP Kernel (saposcol update)................................................................................... 26
6.2 Configuration ............................................................................................................................. 26
6.2.1 Change Path of the JDK....................................................................................................... 27
6.2.2 Change JVM Parameters .................................................................................................... 27
6.2.3 Change the virtual host name............................................................................................... 27
6.2.4 Usage of smdsetup script..................................................................................................... 28
6.2.5 Change Agent log level ........................................................................................................ 31
6.3 Managing J2EE user.................................................................................................................. 32
7 Tracking agent issues ....................................................................................................................... 33
7.1 Deprecated SAP notes .............................................................................................................. 33
7.2 OSS message pre-requisites..................................................................................................... 33
7.3 Agent crash investigation ......................................................................................................... 34
7.4 Thread dump .............................................................................................................................. 35
7.5 Activate P4 logs ......................................................................................................................... 36
7.6 Telnet SMD server commands .................................................................................................. 37
8 Scalability........................................................................................................................................... 37
8.1 Managing java stack settings.................................................................................................... 37
End-to-End Diagnostics 4
Diagnostic agent troubleshooting guide
1 Introduction
The goal of this guide is to help Solution Manager Users troubleshoot failures encountered when installing,
configuring and using the Diagnostics Agents.
It contains the description of the resolution of the most common known issues related to the Diagnostics
Agents. It gives also information, tooltips and procedure to isolate and identify the root cause of an issue
related to the Diagnostics Agent.
This guide is separated in different areas that correspond to the different phases of the Solution Manager life
cycle. The chapters of this document follow a logical order corresponding to the Diagnostics Agent’s life cycle.
However, in order to successful troubleshoot a Diagnostics Agent’s issue, you should be familiar with all parts
of this document.
©SAP AG 2009
End-to-End Diagnostics 5
Diagnostic agent troubleshooting guide
2 Pre-requisites
2.1 OS support
The following table describes the list of different OS supported by the Diagnostics agent:
©SAP AG 2009
End-to-End Diagnostics 6
Diagnostic agent troubleshooting guide
For Diagnostics agent 711, the SAPJVM 5 is included with the SAP Kernel DVD. Therefore, you don’t need to install
separately the SAPJVM5 before installing the 711 agent.
The following SAP notes can be used to determine the JDK version but do not apply the JVM parameters proposed
in those sap notes since they are only specific to the sapj2ee engine.
1 Until further notice please don't use 1.4.2.17b12, 1.4.2_18 and 1.4.2_19.
2 Until further notice please don't use 1.4.2.20 (SAP note 1301397)
©SAP AG 2009
End-to-End Diagnostics 7
Diagnostic agent troubleshooting guide
Timeout occurred
This timeout issue is caused either by a wrong JDK Version or wrong JVM parameters. The timeout
occurs often on old IBM SDK or when the J9 technology is not enabled in the java parameters of the
Diagnostics agent. Check also the java stack thread settings (see chapter 8.1 Managing java stack
settings)
This problem occurs only with HP JDK; re-install a JDK version recommended for Diagnostics agent
(currently 1.4.2.17 or 1.4.2.21+).
©SAP AG 2009
End-to-End Diagnostics 8
Diagnostic agent troubleshooting guide
System SAPinst 7.0 SR3 SAPInst 7.01 Ehp1 SAPInst 7.11 Ehp1
NW 2007 Abap stack - - -
NW 2007 Java stack X X -
Netweaver Double stack X X -
Solution Manager X X -
NW 711 Abap stack - - (X) Not scheduled yet
NW 711 Java stack - - (X) Not scheduled yet
PI 7.11 - - X
CE 7.11 - - X
PI 7.10 - - -
NW 7.10 Java stack - - -
If the Diagnostics Agent has not been installed automatically, you have to install it as a standalone engine using the
standard SAPinst (Please refer the Agent Setup Guide for more information).
To avoid libraries conflicts it is highly recommended to install a Diagnostics agent which has the same kernel release
than the SAP systems already installed on the host.
Ex: On a NW04 or NW04s Managed System, you should install a Diagnostics agent 700 or 701,
On a 711 or 710 Managed System, you should install a Diagnostics agent 711,
…
Note for System NW2004 (640), the recommendation is to install a Diagnostics agent NW2004s (700)
only if no previous Diagnostics agent 640 has been installed on system.
Ex: on a host with a sap system 640, if no agent is present -> install a new diagnostics agent 700(SR3)
on a host with sap system 640, if one or more agent 640 are present -> install a new 640 agent.
©SAP AG 2009
End-to-End Diagnostics 9
Diagnostic agent troubleshooting guide
Or
Go in Agent Administration tool and click on link “agent candidates”
Enter the information to connect to productive SLD
The list of Diagnostics agents registered in this SLD will be displayed.
Which is the J2EE Group to assign to the SLD user used by the Diagnostics Agent?
The SAP_SLD_CONFIGURATOR group or the security role DataSupplierLD should be assigned to the user
used by the Diagnostics Agent.
What is the frequency used by the Diagnostics Agent to check if an association is present in SLD?
If the Diagnostics agent is not connected to the Managing System and registered in SLD, it will check every 20
minutes if an association has been created in SLD.
If the Diagnostics agent is still connected to Managing System and registered in SLD, it is going to check every
hour if a new association has been created in SLD.
©SAP AG 2009
End-to-End Diagnostics 10
Diagnostic agent troubleshooting guide
Note: Don’t install a Diagnostics Agent on a Database or an SCS host without any Central Instance. This
is not necessary in the current E2E RCA scenarios.
Check if a Diagnostic agent has already been installed on the managed system host.
Verify if the managed system has been installed with a SAPInst version greater than NW04S SR3
Check on file system if the folder /usr/sap/DA or the folder /usr/sap/SMD exist.
In both cases, an agent is already installed on the system.
If the Diagnostics agent is already installed on system, check if the agent is present in the SLD server where
the managed system is registered. In this case attach the agent to the Solution Manager System using the
agent admin tool (agent candidate view) or connect the agent with the script ‘smdsetup’ (see part 6.2.4).
If the Diagnostics agent is not installed, retrieve the virtual host or physical host name of the managed system.
The rule is to install one diagnostics agent per virtual host.
Go in the sap profile of the managed system (/usr/sap/SID/SYS/profile).
Retrieve the hostname in the profile file name. (Ex: for the value W46_JC93_NCED60185755A, the
hostname is nced60185755a).
The Diagnostics agent must be installed with this hostname.
When the installation is finished, on UNIX systems add the Diagnostics agent in OS startup/shutdown script
(see chapter 4.5 Startup scripts)
For UNIX system, check these Operating System limits of OS agent user (see part 4.2).
In High Availability environment, the Diagnostics agents must be installed on each virtual host used by the SAP
Instance (Except for the hosts running the database or the Central Services).
The Diagnostics Agents must be integrated in the cluster fail-over scripts used to control the managed systems. For
this reason, the recommendation is to install the Diagnostics agent on a shared file system.
During a failover scenario, the SAP instance of the managed system and the Diagnostic agent must be moved
together.
When the SAP instance and the agent are moved to another system node, you should mount the agent
instance partition before the SAP instance partition. This is due to the fact that the classpath of the SAP java
instance depends on some jar files contained in the agent folder for the Wily IS instrumentation.
©SAP AG 2009
End-to-End Diagnostics 11
Diagnostic agent troubleshooting guide
With MSCS you enable critical system components, Single Points of Failure (SPOFs), to be automatically switched
from one machine to the other in the event of hardware or software problems, or system maintenance affecting one
machine.
Until now, SAP has only supported the installation of one clustered SAP system in one MSCS cluster with two MSCS
nodes.
It is necessary to install a Diagnostics agent for each central instance and all dialog instances. The Diagnostics agents
must be installed on a local disk.
On the failover node, you should activate the windows service used to start the Diagnostics Agent.
Figure 1: ABAP or Java System with SPOFs, where non-SPOFs are installed locally on the MSCS Cluster Nodes
©SAP AG 2009
End-to-End Diagnostics 12
Diagnostic agent troubleshooting guide
Figure 2: ABAP+Java System where the non-SPOFs are installed on hosts outside of the MS Cluster
More information is available in SAP Note 112266 - SAP and MS Cluster Server: Frequent questions and tips.
Flexframe
A FlexFrame-based server landscape for SAP usually consists of the following components:
In addition, a check would be carried out to see whether the instance in question is already running on another
application node.
On this platform, install a Diagnostics agent for each service hosted on the application nodes identified by virtual IP
addresses.
Please refer to SAP Note 674851 - Virtualization on Windows to get a list of supported virtualization solutions on Windows.
©SAP AG 2009
End-to-End Diagnostics 13
Diagnostic agent troubleshooting guide
4 Agent installer
The following SAP Notes contain the most recent version of the ‘Agent Setup guide’ documentation and describes the
problems that could occur during the installation:
Don’t use the SAPInst SPS13 for SMD AGENT 7.00 or lower (SMDAGENT13_0-20001420.SAR), this
installer is deprecated.
If you need to install more than 20 agents, it is recommended to use the Mass Deployement option of the
Diagnostics agent.
SAP Note 1172764: Mass Deployment of SAP Diagnostics Agent 7.0 & 7.01
If no value is set for these variables, SAPinst uses /tmp/sapinst_instdir as default installation directory
on UNIX platforms and %ProgramFiles%\sapinst_instdir on windows platforms. If you want to use an
alternative installation directory, set the environment variable TEMP, TMP, or TMPDIR to the required directory.
©SAP AG 2009
End-to-End Diagnostics 14
Diagnostic agent troubleshooting guide
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 4194304
memory(Kbytes) unlimited
coredump(blocks) 4108901
nofiles(descriptors) 8092
If the user’s limit parameters for the OS agent user are not correct, some OutOfMemory exceptions can occur
in the extractor jobs of the Diagnostics agents.
If during an extractor job (datacollect), an access denied occurs in the agent log ‘SMDApplication.log’, check if
the folder /usr/sap/<SID_AGT>/JXX/SMDAgent/temp is writable for the sapsys group. If is not the case,
execute the command ‘chmod –R 775 /usr/sap/<SID_AGT>/JXX/SMDAgent/temp’.
Furthermore the file system of the Managed system must be readable by the Diagnostics agent.
Logon with an agent OS user (su – smdadm), go in the managed system folder (ex:
/usr/sap/SID/SYS/profile), and open one profile with the command ‘more SID_INSTANCE_HOST’. If the
“more” command is not working, the access rights are not correct for the Diagnostics agents. In that case,
check with your system Administrator to adapt the file system rights.
Don’t use the java parameter verbose:gc in the Diagnostics agents JVM parameters, because this
parameter will steadily increase the size of the file work/std_SMDAgent.out
©SAP AG 2009
End-to-End Diagnostics 15
Diagnostic agent troubleshooting guide
On Windows platform the SAP MMC allows to start or stop the Diagnostics agent. The NT service of the
Diagnostics agent is configured to start automatically during Windows startup.
The green status in SAP MMC only indicates that the agent is running. It doesn’t report if the agent is
connected to the Managing system. If the status is yellow after the agent start, it is probably due to the fact
that the agent process was stopped abnormally (see 7.3 Agent crash investigation)
On UNIX platform, the commands smdstart.sh, smdstop.sh and smdadmin.sh allow to operate the Diagnostics
agent. Since the SR3 release of SAPInst, those commands are included in the PATH variable of the OS agent
user. In that case, the commands can be called from every folder (not only in the agent script folder).
Command Action
smdstart.sh <SID> <InstanceNumber> Starts the Diagnostics agent and the sapstartsrv process.
smdstop.sh <SID> <InstanceNumber> Stops the Diagnostics agent and the sapstartsrv process
Launches jcmon tool to administrate the Diagnostics agent
smdadmin.sh <SID> <instanceNumber>
instance
On HP-UNIX platform, an error (!! ERRROR !! current user is not the owner of this instance )
occurs when the smdstart.sh is executed. Check the solution in sap note 1109366.
The following table gives the list of the return code of the smdstart.sh script.
For UNIX system, Diagnostics agents do not start automatically when the system reboots because the agent startup
scripts are not included in the system startup scripts.
The following command line can be used in the system startup scripts:
You will find below the command line for the shutdown sequence:
©SAP AG 2009
End-to-End Diagnostics 16
Diagnostic agent troubleshooting guide
The following procedure describes how to insert an agent in the boot sequence for a Linux SUSE 10 system:
When smdstart.sh and smdstop.sh are embedded in the system startup scripts, the exit code of the smd
scripts cannot be retrieved. Further it is important to redirect the standard output and standar error with a pipe
like 2>&1 to avoid that the smdstart.sh and smdstop.sh are blocking the parent script.
#!/bin/sh
### BEGIN INIT INFO
# Provides: diagnostics_agents
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 2 3 5
# Description: start diagnostics agents
### END INIT INFO
case "$1" in
'start')
su -c /usr/sap/SMD/J98/script/smdstart.sh > /dev/null 2>&1 -s /bin/sh - smdadm
;;
'stop')
su -c /usr/sap/SMD/J98/script/smdstop.sh > /dev/null -s /bin/sh - smdadm
;;
'status')
su -c /usr/sap/SMD/J98/script/smdadmin.sh -s /bin/sh - smdadm
;;
*)
echo "Usage: $0 { start | stop | status }"
;;
esac
exit 0
©SAP AG 2009
End-to-End Diagnostics 17
Diagnostic agent troubleshooting guide
With Diagnostics agent 711 the startup system is compliant to the SAP startup mechanism. It means that the
commands smdstart.sh and smdstop.sh have been removed.
Under Windows the SAP MMC allows to start or stop the Diagnostics agent. The NT service of Diagnostics
agent is configured to start automatically during the Windows startup.
The green status in SAP MMC only indicates that the agent is running. It doesn’t report if the agent is
connected to the Managing system. If the status is yellow after the agent start, it is probably due to the fact
that the agent process was stopped abnormally (see 7.3 Agent crash investigation)
Under UNIX with an agent OS User, the commands startsap and stopsap allow to operate the Diagnostics
agent.
Command Action
startsap SMDA<Instance_Number> [-vhost <virtual hostname>] Start the Diagnostics agent.
stopsap SMDA<Instance_Number> [-vhost <virtual hostname>] Stop the Diagnostics agent.
The sapstartsrv process of Diagnostics agent is automatically started during the boot sequence of system if the sapinit
program has been installed on system. In that case, you can start or stop the Diagnostics agent with a SAP MMC
(remote).
©SAP AG 2009
End-to-End Diagnostics 18
Diagnostic agent troubleshooting guide
5 Agent connectivity
It is RECOMMENDED to connect the Diagnostics agent to Solution Manager with the SPA J2EE message
server mode. To establish this connection, the information about the hostname of the J2EE Message server
(SCS instance) and the HTTP port of message server must be collected from the SCS instance profile.
A. During the installation of the Diagnostic agent, the SAPJ2EE Message server connection mode must be
selected.
B. This information is stored in the agent configuration (runtime.properties) and the credentials are stored in
the agent secure store file (secstore.properties).
C. When the Diagnostics Agent starts, the P4 framework will retrieve all J2EE entries point available from the
SCS message server (on HTTP port ex: 81xx).
D. Once the list of J2EE entries point has been collected, one P4 entry point is chosen from the list.
E. The Diagnostics agent will then establish a P4 connection to the selected J2EE entry point with the host
name and the port mapped to the P4 entry point.
©SAP AG 2009
End-to-End Diagnostics 19
Diagnostic agent troubleshooting guide
All connection problems are logged in a file named SMDSystem.X.log (see chapter 6.2.5). Check this log
to find the root exception of the issue: Once the exception is found, find the root cause of the exception by
locating the last “caused by” string.
Exception: com.sap.engine.services.jndi.persistent.exceptions.NamingException:
Exception while trying to get InitialContext. [Root exception is
com.sap.engine.interfaces.cross.DestinationException: there are no access points for
service: P4 registered on the message server]
No P4 entry point has been reported by the Message Server. This is probably due to the fact that it is not
the correct message server: it must be the Java and not the ABAP one. So check the content of the
Message server with the URL http://msgserver:81xx/msgserver/text/logon and verify if a P4 entry point is
available (as shown below).
Unknown host
This is a network resolution problem due to the fact that the selected P4 hostname retrieved from the SCS
Message server list cannot be resolved from the Managed system host. Retrieve the list of the P4 entries
point in the Message server as:
version 1.0
J2EE933894500
J2EE NCED6018XXXXA.dhcp.ncel.sap.corp 59300 LB=1
J2EES NCED6018XXXXA.dhcp.ncel.sap.corp 59301 LB=1
P4 NCED6018XXXXA.dhcp.ncel.sap.corp 59304 LB=1
P4S NCED6018XXXXA.dhcp.ncel.sap.corp 59306 LB=1
P4HTTP NCED6018XXXXA.dhcp.ncel.sap.corp 59305 LB=1
©SAP AG 2009
End-to-End Diagnostics 20
Diagnostic agent troubleshooting guide
If the host cannot be reached, then change the host definition in your DNS or in the /etc/hosts. You may
alternatively fix you engine installation to report the right host information in the message server (see
chapter 5.3).
If the solution manager system is installed on a High Availability environment, this direct connection
cannot be used because the agent would always establish a connection to the same java instance
corresponding to the same p4 port.
To enable HA, you must select the SAP J2EE Message server connection mode. In that case, the
connection of the diagnostics agent will be load-balanced to the different available Java instances.
©SAP AG 2009
End-to-End Diagnostics 21
Diagnostic agent troubleshooting guide
In this example we see that the p4 port is bound for all hosts where a p4 request can be emitted (* or
0.0.0.0), if the port is bound like “10.45.192.204:50304” only the p4 requests emitted from the host
10.45.192.204 will be accepted.
It explains why the Diagnostic agent must be installed on virtual host 10.45.192.204 with SAPInst. The
situation can be fixed by changing the profile property SAPLOCALHOST (see 6.2.3 Change the virtual
host name).
o After verifying the port in the OS configuration, check in the J2ee dispatcher configuration that the
property “bindHost” is set to 0.0.0.0. This should be visible with the J2EE configuration tool of the
managed system->Instance_xxx->dispatcher->services->p4. If the value is not configured to 0.0.0.0
(which accepts all hosts), add the agent IP or install the agent on one of the listed IP.
©SAP AG 2009
End-to-End Diagnostics 22
Diagnostic agent troubleshooting guide
Check if the agent can access the J2ee message server (SCS) of the Managed system with the host and the
http port stored in the agent configuration (see the next section). For example :
o Open a shell with the agent OS user (smdadm) on the managed system.
o Execute the command “msprot -l -mshost <host_j2ee_msg_srv> -msserv 39<SCS> or
36<SCS> -d J2EE –s”, the values of host and port must be retrieved from the Agent configuration
(see the next section).
o The command must return the following content :
SAP Message Server Protocol Program, Version 1.3 (built: Jan 24 2008 01:27:19)
INFO CLUSTER-ID HOST GROUP-ID STATE J2EE-SERVICE-MASK
----------------------------------------------------------------------------------------------
---> LIST SERVICE:00000 NAME:ConfigurationManager
---> LIST SERVICE:00001 NAME:_CacheManager
---> LIST SERVICE:00003 NAME:{service_manager_deploy_distributor}
---> LIST SERVICE:00004 NAME:{service_manager_internal_connection}
---> LIST SERVICE:00005 NAME:shell
---> LIST SERVICE:00006 NAME:jmx_notification
---> LIST SERVICE:00007 NAME:p4
---> LIST SERVICE:00008 NAME:webservices
---> LIST SERVICE:00010 NAME:iiop
---> LIST SERVICE:00011 NAME:r3startup
---> LIST SERVICE:00012 NAME:telnet
---> LIST SERVICE:00013 NAME:log_configurator
---> LIST SERVICE:00014 NAME:jmx
---> LIST SERVICE:00016 NAME:http
---> LIST SERVICE:00022 NAME:com.sap.security.core.ume.service
---> LIST SERVICE:00023 NAME:security
---> LIST SERVICE:00024 NAME:tc~sec~certrevoc~service
---> LIST SERVICE:00025 NAME:servlet_jsp
---> LIST SERVICE:00026 NAME:webdynpro
LIST 0004105250 ncevhost.mydomain 0000041052 RUNNING XXXXXXXXOXXOXXXXXOXXXXXXXXXXXX
LIST 0004105200 ncevhost.mydomain 0000041052 RUNNING XXXXXXOXXXXXXXXXXOOOOOOOOOOOOO
In this content, the P4 service is listed as well as the j2ee nodes with hostnames (e.g.
ncevhost.mydomain).
Check if those hostnames can be resolved on your network by executing the command “ping
ncevhost.mydomain”
o Open the J2EE Visual admin of the Managed system and connect with the j2ee user used by the Diagnostics
agent (agent configuration see next section) to check if the user can be authenticated and if it has the
Administrator role.
o Check also the Managed system defaulttrace file to find some exception linked to P4 connection.
©SAP AG 2009
End-to-End Diagnostics 23
Diagnostic agent troubleshooting guide
The following table lists all properties generated and updated by the Managed Setup Wizard allowing the Diagnostics
agent to connect to the Managed system in order to complete the E2E RCA operations.
Those properties are stored in the Diagnostics agent configuration under the scope named “server name”.
o Managed systems connection information:
o Credentials :
Those values might be only changed in the agent Admin tool in case of debugging. The general recommendation is to
update those values with the Managed system setup wizard.
©SAP AG 2009
End-to-End Diagnostics 24
Diagnostic agent troubleshooting guide
In order to enable this feature in Ehp1, please contact the Diagnostics Agent support team to get information on how to
setup the agent and on which patch level you can perform the installation.
©SAP AG 2009
End-to-End Diagnostics 25
Diagnostic agent troubleshooting guide
5.5 Self-Monitoring
During a self-monitoring setup of Solution Manager, some special configurations in the different setup wizard are
needed due to some restrictions about the local agent connectivity. All information about the setup configuration of the
“self-monitoring” is available in the following SAP Notes:
1292811 - Wily setup wizard is failing An error occurs when performing the setup of a wily introscope agent on
in auto-monitoring system solution manager itself (self-monitoring) although the user and password are
correct.
Exception:
com.sap.smdagent.plugins.connectors.p4.exceptions.P4AuthorizationException: Access is
denied: Please make sure the <user> and <password> parameters are correct.; nested
exception is:
com.sap.engine.services.jndi.persistent.exceptions.NamingException: Exception during
getInitialContext operation.No server is running. [Root exception is
com.sap.engine.services.security.exceptions.BaseLoginException: Exception in creating new
RemoteLoginContext instance.]
at
com.sap.smd.agent.plugin.connectors.p4.P4ConnectionService.getP4Connection(P4ConnectionServ
ice.java:69)
...
at java.lang.Thread.run(Thread.java:838)
Caused by: com.sap.engine.services.jndi.persistent.exceptions.NamingException: Exception
during getInitialContext operation.No server is running. Root exception is
com.sap.engine.services.security.exceptions.BaseLoginException: Exception in creating new
RemoteLoginContext instance.
at
com.sap.engine.services.security.remote.login.RemoteLoginContextExt.<init>(RemoteLoginConte
xtExt.java:34)
...
at java.lang.Thread.run(Thread.java:838)
Caused by: java.io.EOFException: End of stream is reached unexpectedly during input from
Socket [addr=/56.zzz.xx.xx,port=50204,localport=22326]
at com.sap.engine.services.rmi_p4.Connection.run(Connection.java:423)
The problem is linked to the value if the host name registered in the Solution Manager SCS message server.
Check the hostname stored in SCS message server with the following url
http://scs_host:81<SCS_instance_number>/msgserver/text/logon.
The agent hostname reported in agent admin and SCS hostname of entry points must be equal.
Since 7.01 Ehp1 SPS19, add the property <SID>/selfmonitoring/enabled=true in the agelet global configuration
of the Diagnostics agent XD XD which do the self monitoring to avoid some auto-monitoring connection issue.
©SAP AG 2009
End-to-End Diagnostics 26
Diagnostic agent troubleshooting guide
6 Agent Maintenance
For specific agent issues, you might be asked to upgrade the SAP kernel binaries of the Diagnostics agent (Ex: This is
requested when upgrading saposcol). In that case, follow the procedure:
Determine the SID and instance number of the Diagnostics agent to upgrade.
Determine the SAP Kernel version by opening a shell with <sid>adm for Unix or command prompt Windows in
folder /usr/sap/<SID_AGT>/exe
Execute the command “sapcontrol -prot NI_HTTP -nr <Instance_Number_AGT> -function
GetVersionInfo”
GetVersionInfo
OK
Filename, VersionInfo, Time
C:\usr\sap\SMD\J98\..\exe\sapstartsrv.exe, 700, patch 144, changelist 957098, optU, NTintel,
C:\usr\sap\SMD\J98\..\exe\msg_server.exe, 700, patch 144, changelist 957098, optU, NTintel,
C:\usr\sap\SMD\J98\..\exe\enserver.exe, 700, patch 144, changelist 957098, optU, NTintel,
C:\usr\sap\SMD\J98\..\exe\jcontrol.exe, 700, patch 144, changelist 957098, optU, NTintel,
C:\usr\sap\SMD\J98\..\exe\jlaunch.exe, 700, patch 144, changelist 957098, optU, NTintel,
Stop all Diagnostics agents with same SID (because they share the binaries)
Download the latest version of the SAP Kernel on service market place. Be careful if the agent kernel version is
700 you must upgrade to the latest available version of the 700 kernel. You shouldn’t upgrade a 700 kernel to
the latest version of the 701 kernel.
Extract the SAR File (ex: SAPEXE_179-20000978.SAR) in folder /usr/sap/<SID_AGT>/exe
For 711
Determine the SID and instance number of the Diagnostics agent to upgrade.
Determine the SAP Kernel version, by opening a shell with <sid>adm for Unix or command prompt Windows in
folder /usr/sap/<SID_AGT>/SYS/exe/uc/<OS>.
Execute the command “sapcontrol -prot NI_HTTP -nr <Instance_Number_AGT> -function
GetVersionInfo”
6.2 Configuration
This section describes all the procedures to update the Diagnostics agent configuration elements which cannot be
changed centrally from Solution Manager.
©SAP AG 2009
End-to-End Diagnostics 27
Diagnostic agent troubleshooting guide
For 7.11
As the Diagnostics agent 711 runs only on SAPJVM5, it is not recommended to change the path of the JDK.
For 7.11
©SAP AG 2009
End-to-End Diagnostics 28
Diagnostic agent troubleshooting guide
To find out what is the version of the smdsetup script, you have to execute the command “smdsetup.sh” or
“smdsetup.bat” without any parameters
o If the command output asks 5 parameters like “smdsetup.sh $JAVA_HOME smdserverhost 53004
j2eadmin abc123 myhost”, it is a smdsetup with a version less than SPS13.
o If the output proposes some action as “managingconf”, the version of smdsetup version is greater than
SPS14.
©SAP AG 2009
End-to-End Diagnostics 29
Diagnostic agent troubleshooting guide
In this version the script permits only to change the connection information and the credentials at the same time. It
means that all the input parameters are mandatory.
Classpath error
In case of a classpath error, you need to adapt the classpath of the smdsetup script SP12 or lower, because
in SPS13 the logging.jar has moved from the SMDAgent/lib/launcher directory to the SMDAgent/lib directory.
In 7.0 SR3 and 7.0 the smdsetup script in this version is located in the following folder:
o /usr/sap/<SID_AGT>/J<Instance_Number>/script
MANAGINGCONF SYNTAX
To execute this command you need to stop the agent. The command updates the connection settings to the Managing
system:
Optionally, you can add the j2ee user information in the command line to update also the agent secure store:
smdsetup managingconf hostname:”myhost.domain,corp” port:”53004” user:”SMD_ADMIN”
pwd:”init1234”
©SAP AG 2009
End-to-End Diagnostics 30
Diagnostic agent troubleshooting guide
SLDCONF SYNTAX
To execute this command you need to stop the agent. The command updates the connection settings to the SLD
system of the agent registration:
Connect the agent to the SLD system by the http port of java stack.
smdsetup sldconf hostname:”mySLDhost.domain.corp” port:”50000”
Optionally, you can add the sld user information in the command line to update the agent secure store:
smdsetup sldconf hostname:”mySLDhost.domain.corp” port:”50000” user:”slddsuser” pwd:”xxxxx”
SECSTOREJEE SYNTAX
To execute this command you need to stop the agent. The command updates the credentials of the connection to
Managing system:
SECSTORESLD SYNTAX
To execute this command you need to stop the agent. The command updates the credentials of the connection to the
SLD system:
CHANGESERVERNAME SYNTAX
To execute this command you need to stop the agent. The command updates the “servername” attribute of the agent:
SUPPORTLOGS SYNTAX
The Diagnostics agent must be started before executing this action. This command retrieves all agent log files and
executes some basics tests to check the agent pre-requisites as:
jdk version check
jvm parameters check
hostname resolution check
tcp port check
p4 protocol check
message server connectivity check
©SAP AG 2009
End-to-End Diagnostics 31
Diagnostic agent troubleshooting guide
When changing the log level of the agent logging, you need to consider two cases:
o The Diagnostic agent is connected to the Solution Manager System:
For Filename
SMDSystem.log <log-controller effective-severity="INFO" maximum-severity="ALL" minimum-
severity="DEBUG" name="/SMDlogger/System">
SMDAgentApplication.log <log-controller effective-severity="WARNING" maximum-severity="ALL" minimum-
severity="DEBUG" name="/SMDlogger/AgentApp">
P4.log <log-controller effective-severity="NONE" maximum-severity="ALL" minimum-
severity="ALL" name="com.sap.engine.services.rmi_p4">
©SAP AG 2009
End-to-End Diagnostics 32
Diagnostic agent troubleshooting guide
If the J2EE user used by the Diagnostic agent cannot be authenticated (wrong password, missing role assignment,
user locked), the agent will shutdown automatically to avoid locking the corresponding account.
Authentication failed
Exception: at com.sap.engine.core.thread.impl3.SingleThread.run
(SingleThread.java:170)
Caused by:
com.sap.engine.services.security.exceptions.BaseLoginException:
Authentication did not succeed.
at
com.sap.engine.services.security.login.ModulesProcessAction.run
(ModulesProcessAction.java:175)
... 13 more
Before restarting the agent It is important to execute some checks related to the J2EE user as follow:
In dev_smdagent.log, if you find the exit code -11112, it is an authentication problem as described above.
©SAP AG 2009
End-to-End Diagnostics 33
Diagnostic agent troubleshooting guide
The following table contains a list of SAP notes which are now deprecated:
The Diagnostics agent has been installed with SAPInst SR3, Ehp1 or 7.11.
The OS limit for Unix platform are compliant with the agent OS user (<AgentSID>adm),
JDK vendor and version is supported by Diagnostics agent,
JVM parameters of Diagnostics agent are compliant,
The Diagnostics agent connection to the Managing system is of type J2EE Message Server connection,
Recommendations for the auto-monitoring scenario Managed setup wizard execution have been applied.
The Java dispatcher of Solution Manager is correctly sized to avoid some agent disconnection (see part 8.1
Managing java stack settings.)
If those check points cannot solve the problem, follow the SAP Note 1076573 to create the OSS message. If the
LMService version is greater or equal to NW04S SPS17 Patch 3, attach the support logs Zip file generated by
the smdsetup script (see part 6.2.4).
©SAP AG 2009
End-to-End Diagnostics 34
Diagnostic agent troubleshooting guide
Go in folder /usr/sap/<SID_AGT>/J<INSTANCE_NUMBER>/work
Open the log file dev_jcontrol (This is the log file of the jcontrol process which is the controller of the
java agent process) to check if the jcontrol has started the jlaunch process as described below:
If the jlaunch process has been started, open the file dev_SMDAgent which corresponds to the jlaunch
process output :
Thr 3860] JLaunchISetState: change state from [Initial (0)] to [Initial (0)]
[Thr 3860] JLaunchISetState: change state from [Initial (0)] to [Waiting for start (1)]
In this file, all information about the java of the Diagnostics agent is stored. You will information related to
JVM loading, process state, crash of VM or bad JVM parameters. In case of process crash, you will find in
this file, the corresponding Exit Code or Error message.
Error: [Thr 1084238144] *** ERROR => DlLoadLib: dlopen()= libjvm.so: cannot open shared
object file: No such file or directory -> DLENOACCESS (0, Success) [dlux_mt.c 314]
[Thr 1084238144] *** ERROR => Can't load VM shared library (libjvm.so) (rc=-2)
[jhvmxx_mt.c 1576]
[Thr 1084238144] *** ERROR => Cannot load DLL for Java VM [jlnchxxi_mt.717]
The SAP Note 940893 - Analysis of errors within the startup of J2EE Engine 6.40 can help to troubleshoot
JVM loading problems.
If the JVM is loaded correctly, now check the file std_SMDAgent.out and jvm_SMDAgent.out to find some
errors like OutOfMemory, StackOverflow or Nullpointer which could have stopped the agent process.
©SAP AG 2009
End-to-End Diagnostics 35
Diagnostic agent troubleshooting guide
The Diagnostics agent is like any other SAP system, available in the SAP MMC.
In SAP MMC, open the node “AS Java Process Table” of the Diagnostics agent identified by the SID and the instance
number. Only one process is displayed in the right part: It is the agent process.
Select this process and right click on it to display the context menu, press the item “Dump stack Trace”.
©SAP AG 2009
End-to-End Diagnostics 36
Diagnostic agent troubleshooting guide
Start in an UNIX shell with the OS user of the Diagnostics agent. Execute the command “smdadmin.sh XX” (XX is the
instance number of Diagnostics agent).
For old agent installation, it is necessary to execute the command “../smdadmin.sh” from the folder
/usr/sap/<SID_AGT>/J<InstanceNumber>/script.
Once the command is executed, the JCMON menu is displaying, select the entry “20: Local administration menu” then
execute the action “10: Dump stacktrace” on process 0 (This is the process of the SMDAgent).
Once the thread dump is done, the output is written in file /usr/sap/<SID_AGT>/J<InstanceNumber>/work/
std_SMDAgent.out for Sun and HP-UNIX JDK.
For IBM JDK, the thread dump output is written in java.core.<timestamp>.txt in folder
usr/sap/<SID_AGT>/J<InstanceNumber>/SMDAgent.To find the absolute path of an IBM thread dump, open the file
std_SMDAgent.out and find the line beginning with “Java Dump written to”.
The procedure to enable the P4 logs on the Diagnostics agent is the following:
Once the p4 log enabled on agent, go to Managing system or Managed system to execute the following instructions:
Once all P4 locations are configured, restart the agent to reproduce the problem and attach the agent logs (use the
command ‘smdsetup supportlogs’) and the current defaulttrace.log of the Managing or the Managed system to the OSS
message.
Performance Impact
It is important to restore All log locations changed to their default level because the procedure above has a
severe impact on the performance of the Managed system or the Managing system.
©SAP AG 2009
End-to-End Diagnostics 37
Diagnostic agent troubleshooting guide
To use those commands, start a telnet client to the SAP J2EE server of Solution Manager (default port 5xx18) and go
on server node with the command ‘jump <nodeid>’. Add the group smdserver to enable the SMD commands by typing
use the command ‘add smdserver’.
Once the group smdserver is added, execute the command ’man –g smdserver’ to see all available SMD server
commands.
8 Scalability
The Java dispatcher has an important role in the agent connection’s stability. Therefore, you need to adapt the
maximum number of threads in the pool and in the heap size configuration of the dispatcher to avoid some timeout
connection issues.
After an installation of Solution Manager, the default value of parameter MaxThreadCount in Java Dispatcher
configuration is set to 70. These settings allow by default to connect a maximum of 40 agents.
©SAP AG 2009