Page tree
Skip to end of metadata
Go to start of metadata

Problem

AS Java stops with exit code -2106.

Symptom

  • AS Java does not start
  • Traces contain exit code -2106

Keywords

  • exit code -2106
  • P4
  • P4 port
  • configuration
  • System Profile

Description

The services that provide core functionality must always be running.
If one of the core services cannot be started due to mis-configuration, the Service Manager exits.
The whole AS Java cannot operate without any of core services.
Exit code -2106 is used when core service is mis-configured and cannot start due to configuration issue.

Solution

Step 1
In the server processes traces, search for ServiceConfigurationException. The traces can be found in:

  • /usr/sap/<SID>/<Instance_Name><Instance_Number>/j2ee/cluster/server<X>/log/

If there is more than one server process in your Java instance, you can provide the logs of all of them or just the ones that failed to start.

Step 2
Follow the instructions provided in the exception. For example:

#2.0#2008 05 19 17:53:30:503#+0300#Error#com.sap.engine.core.service630.container.ServiceRunner#
#BC-JAS-COR#kernel.sda#001125F52D3900010000000900001BCC#14847350000000002#
#com.sap.engine.core.service630.container.ServiceRunner#####55d0487925b311ddc601001125f52d39##0#Service Runner [p4]#Java#
#Service [p4] error. Nested exception is: [com.sap.engine.frame.ServiceConfigurationException:
P4 core service could not start because of missing or wrong port configuration]#1
#com.sap.engine.frame.ServiceConfigurationException: P4 core service could not start because of missing or wrong port configuration
	at com.sap.engine.services.rmi_p4.server.P4ServiceFrame.start(P4ServiceFrame.java:146)
	at com.sap.engine.core.service630.container.ServiceRunner.startFrame(ServiceRunner.java:155)
	at com.sap.engine.core.service630.container.ServiceRunner.startService(ServiceRunner.java:113)
	at com.sap.engine.core.service630.container.ServiceRunner.run(ServiceRunner.java:60)
	at com.sap.engine.frame.core.thread.Task.run(Task.java:73)
	at com.sap.engine.core.thread.impl5.SingleThread.execute(SingleThread.java:162)
	at com.sap.engine.core.thread.impl5.SingleThread.run(SingleThread.java:260)

#

#2.0#2008 05 19 17:53:30:503#+0300#Fatal#com.sap.engine.core.Framework#com.sap.ASJ.krn_frm.000019
#BC-JAS-ADM-LOG#kernel.sda#001125F52D3900010000000B00001BCC#14847350000000002#
#com.sap.engine.core.Framework#####55d0487925b311ddc601001125f52d39##0#Service Runner [p4]#Plain#
#Critical shutdown with exit code [-2106] was requested due to [AS Java cannot be started; core service [p4] failed to start
because of incorrect configuration [P4 core service could not start because of missing or wrong port configuration]]#

Step 3 (optional)
If the ServiceConfigurationException is not about P4 core service, refer to Kernel's troubleshooting page:
Here

Step 4
If the ServiceConfigurationException is for "P4 core service could not start because of missing or wrong port configuration" - check configuration in your system profile, before create a CSN to BC-JAS-COR-RMT component.

This Exception during P4 core service start means that P4 core service cannot retrieve opened server port for RMI-P4 protocol from JStartup and ICM.
P4 service cannot start unless ICM open port for RMI-P4 communication.

Reason may be mis-configuration after update or upgrade in system profile. What to check?

System profile is located in: /usr/sap/<SID>/SYS/profile/

Open profile in format:
<SID><Instance_Name><Intance_Number><Host_Name>
Note: Profile ending to .1, .2, etc. are backups of previous state of the system profile. They are not used when system starts.

In profile search for key "icm/server_port_". Something like:

# Wrong configuration is to configure HTTPS port on slot 1 and not to configure P4 port.

# http port configuration
icm/server_port_0 = PROT=HTTP, PORT=5$(SAPSYSTEM)00, TIMEOUT=600
icm/server_port_1 = PROT=HTTPS, PORT=5$(SAPSYSTEM)01, TIMEOUT=1200

If HTTPS port is configured in configuration slot 1 - this is the root cause for the problem.

You may simply add all other ports that you need. For example:

# HTTP port configuration
icm/server_port_0 = PROT=HTTP, PORT=5$(SAPSYSTEM)00, TIMEOUT=600
icm/server_port_1 = PROT=HTTPS, PORT=5$(SAPSYSTEM)01, TIMEOUT=1200

# P4 port configuration
icm/server_port_2 = PROT=P4, PORT=5$(SAPSYSTEM)04

# IIOP/Telnet port configuration
icm/server_port_3 = PROT=IIOP, PORT=5$(SAPSYSTEM)07
icm/server_port_4 = PROT=TELNET, PORT=5$(SAPSYSTEM)08, HOST=localhost

Or you may correct current configuration. For example:

Keeping in mind that by default:

  • HTTP is on slot 0,
  • P4 is on slot 1,
  • IIOP is on slot 2 and
  • Telnet is on slot 3,

You may correct your current configuration not to override these 4 slots (from 0 to 3).
For instance use slot 4 for HTTPS custom configuration and use slot 5 for SMTP.

icm/server_port_4 = PROT=HTTPS, PORT=5$(SAPSYSTEM)01, TIMEOUT=1200

Note: It is recommended to use consecutive numbers.
We recommend configuring all used protocols in system profile.

http://help.sap.com/saphelp_nwpi711/helpdata/en/48/3ae05299c172d0e10000000a42189c/frameset.htm - For more details regarding key "icm/server_port_<zz>"

However, in rare cases ICM does not open port for RMI-P4 protocol because of some internal for ICM issue, or because the port may be busy (occupied by another process). Please try to restart once the ICM process and try to start the server process again. If this doesn't help, write a CSN in the ICM component : BC-CST-IC, where the ICM experts will check what is the reason not to open port for RMI-P4 protocol, while P4 core service is starting.

Step 5

Check if P4 port is taken by another process 

Note: If the port is taken by installation/upgrade tool you will have to close it, to restart the server, and finally to repeat the last step from installation/upgrade procedure.

For windows - use command:
netstat /o | find "50004"

  • netstat shows all open ports;
  • - o switch includes the PID (Process Identification) in the list;
  • | find "50004" would filter the data by the RMI-P4 port.

It will allocate the Process ID of the process, which occupies "50004" port. If your RMI-P4 port is different use your RMI-P4 port in | find attribute.

Then you can find the process in Task Manager and End Process.

  • Open Task Manager;
  • Navigate to "Processes" tab;
  • (Optional) Make PID visible if PID is not displayed:- navigate to View;
        - select "Select Columns...";
        - click in check box in front of "PID (Process Identifier);
        - click "OK" button.
        - now PID column is visible in "Processes" tab.
  • Find the PID of the process that occupies RMI-P4 port (according to netstat command output);
  • Select it;
  • Click on "End Process" button;
  • Click on "End process" button in dialog box;
  • Close Task Manager.

Now restart ICM and server processes.

If the port is taken by PID of installation/upgrade tool you will need to exit it, to start the server and then to repeat the last step.

Legend:

The symbols used on this page have the following meaning:

  • <SID> as the name of the SAP "System ID". For instance: J2E, Q1M, PT1, etc.
  • <Instance_Name> as the name of the instance. For example: J, JC, DVEBMGS, D.
  • <Instance_Number> as the number of the instance. For example 00, 60, 01, 40, 90, etc.
  • <X> as the number of the server process in particular instance. For example 0, 1, 2, etc.
  • <zz> as the number of slot in ICM's port configuration. For example 0, 1, 2, etc.


  • No labels