Skip to main content
Do checkout my poem section. You are going to love it.

SAP Message Server

 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:

  1. 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.
  2. 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).
  3. 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.
  4. 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.

  1. 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.
  2. 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 OS services file (/etc/services on Unix/Linux, C:\Windows\System32\drivers\etc\services on Windows). The standard port is 36NN, where NN is the SAP system number (e.g., 3600 for system number 00).
    • Criticality: Crucial. All application servers and external clients connecting via Message Server must use this correct service name/port.
    • Location: Usually in DEFAULT.PFL.
  3. 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.
  4. 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.
  5. 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) or 1 (External programs also allowed).
    • Criticality: Security parameter.
    • Location: Message Server instance profile.
  6. ms/admin_port:

    • Purpose: Defines a dedicated TCP port for external administration of the Message Server.
    • Value: A port number (e.g., 8199). Default is 0 (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
      
  • 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 and services files on Windows, otherwise the last entry might not be read.

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:

  1. Issue: "Connect to message server failed: service 'sapms&lt;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: Check DEFAULT.PFL (via RZ10) for rdisp/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 that rdisp/mshost hostname is correctly mapped to the Message Server's IP address.
      • Verify rdisp/msserv: Check DEFAULT.PFL for rdisp/msserv parameter.
      • OS services file: On the OS of the affected application server(s) and client machines, verify that sapms<SID> is correctly mapped to port 36NN (where NN 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> and telnet <rdisp/mshost_value> <rdisp/msserv_port> (e.g., telnet saphostprod 3600). If these fail, it's a network/DNS/OS file issue.
  2. Issue: Application servers not registering with the Message Server, or not showing in SMMS.

    • Reason: Message Server not running, incorrect rdisp/mshost or rdisp/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 the dev_ms trace file (via SMMS 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 correct rdisp/mshost and rdisp/msserv values.
      • Check Application Server dev_w0: Look at the dev_w0 (dispatcher trace) and dev_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).
  3. 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.
  4. 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 (not 0), 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 in SMMS -> GoTo -> Security Settings -> ACL file.

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 or rdisp/msserv on dialog instances, those instances will also need to be restarted.
  • Developer Traces: The dev_ms (Message Server) and dev_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

Popular posts from this blog

An experiment with the life

"Best Thing about experiment is that it only improves the outcome." Well, I am Rakshit, hope you already know. I am not special and surely not especially gifted. Neither things go according to my wish. Neither I am the best writer.  But I am myself who is totally unique from anyone else. And I am Rakshit Ranjan Singh. I have my own fun, fights and fall in the most fundamentalistic way. Mechanical is my degree. IT is my Job. Beauty in nature is what I search. Words of my heart are what I write. Four different things I carry on my shoulder and a smile on my face, hope you might have seen that. What do I care for? Family, friends and nature. Do I have regrets? More than I can imagine. Let us move further to see what really is my life.

Learn Java

Hello Friends, You might already know what Java is. Without taking much of your time, I would like to ask you to please click below if you are ready to learn it from end to end. The Material over here is available on the internet and is free to access.  I would request you to bookmark this page and follow it. Please comment if you are happy with the learning. click here

Driving

My Driving Journey: From Zero to (Almost) Hero! Hello everyone! I'm excited to share my ongoing adventure of learning to drive. It's been a mix of nervous excitement, hilarious near-misses, and the slow but steady feeling of progress. Buckle up, because here's a peek into my journey behind the wheel! The First Lesson: Clutch Confusion! My first time in the driver's seat was... memorable. Let's just say the clutch and I weren't immediate friends. Lots of jerky starts and a few stalls later, I began to understand the delicate dance between the pedals. My instructor was incredibly patient (thank goodness!). Mastering the Steering Wheel (Sort Of) Steering seemed straightforward enough, but navigating turns smoothly was a different story. I definitely had a few moments of feeling like I was wrestling with the wheel. Slowly but...