The SAP Message Server (MS) is a vital component of any SAP system, especially in distributed environments with multiple application servers. It acts as the central communication hub, managing internal communication between application servers, distributing work, and providing load balancing for user logons.
Without a functioning Message Server, application servers cannot communicate with each other, and users cannot log on to the system using load balancing groups.
Key Roles of the Message Server:
- Load Balancing: When users connect via SAP Logon Pad and select a "Group/Server" (Logon Group), the Message Server is responsible for directing the user's connection to the application server with the best performance and lowest load within that group.
- Internal Communication: It facilitates communication between various SAP services and processes running on different application servers (e.g., passing requests between dialog, update, and background work processes on different instances).
- Application Server Registration: Each application server registers itself with the Message Server upon startup, providing its capabilities (e.g., number of dialog work processes, available memory) so the MS can intelligently distribute the load.
- Enqueue Server Location: It informs application servers about the location of the Enqueue Server (which manages the SAP lock table).
Message Server Configuration in SAP Basis
The Message Server is configured primarily through profile parameters in the SAP system. It runs as part of the Central Instance (CI) or, in an ASCS (ABAP SAP Central Services) setup, as a standalone instance.
Key Profile Parameters (Managed via RZ10, displayed via RZ11):
These parameters are usually set in the Default Profile (DEFAULT.PFL) to ensure consistency across all application servers in the SAP system.
-
rdisp/mshost
:- Purpose: Specifies the hostname or IP address of the machine where the Message Server is running.
- Value:
hostname
(e.g.,saphostprod
,192.168.1.10
) or$(SAPGLOBALHOST)
if the Message Server runs on the global host. - Criticality: Crucial. All application servers must be able to resolve this hostname to the correct IP address and reach it. This is typically configured in the OS
hosts
file (/etc/hosts
on Unix/Linux,C:\Windows\System32\drivers\etc\hosts
on Windows) or via DNS. - Location: Usually in
DEFAULT.PFL
.
-
rdisp/msserv
:- Purpose: Specifies the service name (or port number) on which the Message Server listens for connections.
- Value:
sapms<SID>
(e.g.,sapmsPRD
,sapmsDEV
). The actual port number is usually derived from this service name, which should be defined in the OSservices
file (/etc/services
on Unix/Linux,C:\Windows\System32\drivers\etc\services
on Windows). The standard port is36NN
, whereNN
is the SAP system number (e.g.,3600
for system number00
). - Criticality: Crucial. All application servers and external clients connecting via Message Server must use this correct service name/port.
- Location: Usually in
DEFAULT.PFL
.
-
rdisp/msserv_internal
:- Purpose: (Optional, for security) If set to a value not equal to
0
, the Message Server opens another port for internal communication only with application servers. This separates internal communication from external queries. - Value: A specific port number (e.g.,
3900
). - Criticality: Enhances security. If configured, application servers must use this internal port for registration, while
rdisp/msserv
can still be used for queries. Firewalls must be configured accordingly. - Location: Can be in
DEFAULT.PFL
or instance profiles.
- Purpose: (Optional, for security) If set to a value not equal to
-
ms/server_port_<xx>
:- Purpose: Defines ports for HTTP/HTTPS communication with the Message Server, typically used by the SAP Web Dispatcher to retrieve server lists for load balancing.
- Value:
PROT=<HTTP/HTTPS>,PORT=<port_number>
(e.g.,ms/server_port_0 = PROT=HTTP,PORT=8100
,ms/server_port_1 = PROT=HTTPS,PORT=44400
). - Criticality: Relevant for Web Dispatcher integration and web-based load balancing.
- Location: Typically in the Default or Message Server instance profile.
-
ms/monitor
:- Purpose: Controls whether external monitoring programs (like
msmon
or other third-party tools) are allowed to connect and monitor the Message Server. - Value:
0
(Only application servers can change internal memory, restricted external access) or1
(External programs also allowed). - Criticality: Security parameter.
- Location: Message Server instance profile.
- Purpose: Controls whether external monitoring programs (like
-
ms/admin_port
:- Purpose: Defines a dedicated TCP port for external administration of the Message Server.
- Value: A port number (e.g.,
8199
). Default is0
(deactivated). - Criticality: Security parameter. Allows external clients with proper authorization to perform administrative tasks.
- Location: Message Server instance profile.
OS Level Configuration Files:
-
hosts
file: (/etc/hosts
on Unix/Linux,C:\Windows\System32\drivers\etc\hosts
on Windows)- Content: Maps IP addresses to hostnames. Crucial for resolving the hostname defined in
rdisp/mshost
. - Example:
192.168.1.10 saphostprod
- Content: Maps IP addresses to hostnames. Crucial for resolving the hostname defined in
-
services
file: (/etc/services
on Unix/Linux,C:\Windows\System32\drivers\etc\services
on Windows)- Content: Maps service names to port numbers. Crucial for resolving
sapms<SID>
to the correct port. - Example:
sapmsPRD 3600/tcp
- Note: Always ensure a blank line at the end of the
hosts
andservices
files on Windows, otherwise the last entry might not be read.
- Content: Maps service names to port numbers. Crucial for resolving
SAP Logon Pad (Client-Side):
When configuring an entry in SAP Logon Pad, for a load-balanced connection:
- Application Server: Leave blank.
- System ID: Enter the SAP System ID (SID).
- System Number: Leave blank.
- Message Server: Enter the hostname of the Message Server (from
rdisp/mshost
). - SAProuter String: (If applicable)
- Group/Server: Enter the Logon Group name (configured in
SMLG
).
Message Server Administration and Monitoring (SMMS)
SMMS (Message Server Monitor) is the primary transaction for monitoring and administering the Message Server in an ABAP system.
Key Functions in SMMS:
- Server List (GoTo -> Servers -> Display): Shows all application servers currently registered with the Message Server, their status, number of work processes, and current load.
- Logon Groups (GoTo -> Logon Groups -> Display): Displays the configured logon groups (from
SMLG
) and which application servers are assigned to them. - Parameters (GoTo -> Parameters -> Display/Change): Displays the active Message Server parameters and allows dynamic changes for some (though these are not persistent across restarts).
- Trace File (GoTo -> Trace -> Display/Reset/Level): Accesses the Message Server's developer trace file (
dev_ms
). This is crucial for troubleshooting. - Security Settings (GoTo -> Security Settings): Manage ACL files (
ms/acl_file_...
) that control which hosts are allowed to connect to specific Message Server ports. - Statistics (GoTo -> Statistics): Provides various statistics on Message Server activity.
- Services (GoTo -> Services): Displays the HTTP/HTTPS services opened by the Message Server (configured by
ms/server_port_<xx>
).
Common Message Server Issues and Troubleshooting Steps:
-
Issue: "Connect to message server failed: service 'sapms<SID>' unknown" or "hostname '...' unknown"
- Reason: The SAP system or client cannot resolve the Message Server's hostname or service name to an IP address and port.
- Troubleshoot:
- Verify
rdisp/mshost
: CheckDEFAULT.PFL
(via RZ10) forrdisp/mshost
parameter. - OS
hosts
file: On the OS of the affected application server(s) and client machines (if using SAP Logon Pad with Message Server hostname), verify thatrdisp/mshost
hostname is correctly mapped to the Message Server's IP address. - Verify
rdisp/msserv
: CheckDEFAULT.PFL
forrdisp/msserv
parameter. - OS
services
file: On the OS of the affected application server(s) and client machines, verify thatsapms<SID>
is correctly mapped to port36NN
(whereNN
is system number). - DNS: If using DNS for name resolution, ensure DNS entries are correct and reachable.
- Ping/Telnet: From the affected server/client,
ping <rdisp/mshost_value>
andtelnet <rdisp/mshost_value> <rdisp/msserv_port>
(e.g.,telnet saphostprod 3600
). If these fail, it's a network/DNS/OS file issue.
- Verify
-
Issue: Application servers not registering with the Message Server, or not showing in SMMS.
- Reason: Message Server not running, incorrect
rdisp/mshost
orrdisp/msserv
in the application server's profile, network issues, firewall. - Troubleshoot:
- Check Message Server Process: On the Message Server host (CI or ASCS), verify the
msg_server
process is running (ps -ef | grep msg_server
on Unix/Linux, Task Manager on Windows). If not, restart the instance. - Check
dev_ms
: Examine thedev_ms
trace file (viaSMMS
or directly on OS) for errors during startup or registration attempts. - Check Application Server Profile: For the problematic application server, verify its instance profile (
RZ10
) for correctrdisp/mshost
andrdisp/msserv
values. - Check Application Server
dev_w0
: Look at thedev_w0
(dispatcher trace) anddev_ms
(if local MS process) of the application server itself for connection attempts and errors. - Firewall: Ensure no firewall is blocking communication between the application server and the Message Server's port (36NN).
- Check Message Server Process: On the Message Server host (CI or ASCS), verify the
- Reason: Message Server not running, incorrect
-
Issue: Users cannot log on via Logon Group or experience poor load balancing.
- Reason: Incorrect logon group configuration, application servers not properly registered, Message Server load balancing issues.
- Troubleshoot:
- SMMS -> Logon Groups: Verify the logon group exists and has application servers assigned.
- SMMS -> Server List: Check if all expected application servers are registered and their status is "active."
- SMLG (Logon Group Maintenance): Verify the logon group configuration, including the instance assignments and response time limits.
- Work Process Status (SM50/SM66): Check if work processes on application servers are available and not overloaded.
- Message Server Trace (
dev_ms
): Look for warnings or errors related to load balancing or group assignments.
-
Issue: "MSEACCESSDENIED" errors in traces.
- Reason: Message Server is denying access, likely due to ACL (Access Control List) configuration or
rdisp/msserv_internal
being set without application servers using it. - Troubleshoot:
rdisp/msserv_internal
: If this parameter is set (not0
), ensure all application servers are configured to use this internal port for registration.- ACL Files: Check parameters like
ms/acl_file_ext
,ms/acl_file_int
, etc., in the Message Server's profile. If these files exist, they must explicitly allow the connecting hosts. You can view/reload ACLs inSMMS -> GoTo -> Security Settings -> ACL file
.
- Reason: Message Server is denying access, likely due to ACL (Access Control List) configuration or
General Troubleshooting Tips:
- Restart Instance: For most profile parameter changes related to the Message Server, a restart of the Message Server instance (CI or ASCS) is required. For changes to
rdisp/mshost
orrdisp/msserv
on dialog instances, those instances will also need to be restarted. - Developer Traces: The
dev_ms
(Message Server) anddev_w0
(Dispatcher) trace files are your primary debugging tools. Increase trace levels (SMMS -> GoTo -> Trace -> Trace Level
) for more detailed information during troubleshooting, but remember to reset them afterward in production to avoid performance impact. - SAP Notes: Always search SAP Notes for specific error messages or scenarios.
- Network Team: Collaborate closely with your network team, especially for firewall issues or DNS problems.
The Message Server is a cornerstone of SAP system stability and performance. A thorough understanding of its configuration and troubleshooting is essential for any SAP Basis administrator.
Comments
Post a Comment