Search this blog for other interesting articles

Thursday 23 June 2016

How to resolve, if J2EE system is failing to start throwing “exit code 503” error?


This article answers following queries:

·         What is the reason for J2EE system failing with “exitcode 503”?
·         How to resolve, if J2EE system is failing to start throwing “exit code 503” error?
·         How to fix com.sap.engine.bootstrap.SynchronizationException: Database connection initialization error?
·         What is the location of log_bootstrap file?
·         How to prevent J2ee system start up failure with exit code 503?

-----------------------------------------------------------------------------
Sometimes, while bringing up sap netweaver java system, it fails to start. Upon investigation, we may notice following errors in dev_serverX file (i.e. dev_server0 or dev_server1)

*******************************************************

F [Thr 3408] *** LOG => SfCJavaVm: exit hook is called. (rc = 503)

F [Thr 3408] *** LOG => exiting (exitcode 503, retcode 1).

M [Thr 3408] CCMS: CCMS Monitoring Cleanup finished successfully.

********************************************************

 Analysis & Solution:

Exit code 503 means that the system couldn’t connect to the database. If we check log_bootstrap file located under /usr/sap/<SID>/<inst name>/work directory, following errors can be noticed

Message: [Exception occurred:]

com.sap.engine.bootstrap.SynchronizationException: Database connection initialization failed. Check if the database is running and the database properties.

 Reasons for this issue could be due to
i)             Unavailability of database: In this scenario, we need to check the database and make sure it is up. If required, we may have to restart it
ii)            Parameters maintained to connect to the database are wrong: In this scenario, we need to cross check parameters used to connect to the database for any typos or wrong locations or paths mentioned.

Wednesday 22 June 2016

How to fix “Address already in use: JVM_Bind” error?


This article answers following queries:

·         How to resolve if dispatcher or server node of the J2ee application server fails to start?

·         How to fix “Address already in use: JVM_Bind” error?

·         How to address “Address already in use: JVM_Bind” error in std_dispatcher.out or std_server0.out log?

·         What is the location of std_server0.out file?

·         What is the location of std_dispatcher.out file?
---------------------------------------------------------------------------


In SAP Netweaver 7.0 environment, sometimes, dispatcher or server0 node of the J2EE application server fails to start. Please check various logs under work directory.

std_server0 and std_dispatcher.out files will be under /usr/sap/<SID>/inst_name/work directory.

Mainly, If we notice “Address already in use: JVM_Bind” errors in these files, then the issue is with port number. That particular port is being used by another process thus preventing java node to start.

To resolve this issue, we need to

i)             Go through above mentioned logs and identify the port that is being blocked

ii)            Identify the process that is using the port and kill that process. Various network tools like netstat can be used to identify the problematic process

iii)           Kill the problematic process or restart the HOST to release that port

iv)           Once that problematic port is released, restart the J2EE system

Friday 17 June 2016

How to fix when j2ee system stops with exit code 11?


This article answers following queries:
·         How to fix when j2ee system stops with exit code 11?
·         What was the cause for java issue with exit code 11?
·         How to resolve if java error exit code 11 is encountered?
·         How to prevent exit code 11 issue in SAP?
·         Server0 failed with exit code 11. How to resolve this issue?
·         Exit code 11 errors found in dev_jstart file. What was the reason? How to fix?
·         What is the reason for signal 17 error in dev_jstart log of sap Netweaver java?
·         What is the path for java instance controller trace file (dev_jstart)?

=================================================

 In real time, SAP Netweaver Java system (or application server) which was running may fail or go down abruptly. When we check trace files, we find following errors in dev_jstart file which is located under /usr/sap/<SID>/inst_name/work:

 =================================================

F [Thr 140289385400128] *** LOG => Send SIGINT to server0 (pid 24282).

F [Thr 140289385400128] *** LOG => Process server0 stopping (pid 24282).

F [Thr 140289385400128] *** LOG => Instance state is "All processes running" (RUNNING @ 3, ACTIVE).

F [Thr 140289385400128] *** LOG => Signal 17 SIGCHLD.

F [Thr 140289385400128] *** WARNING => process server0 (pid 24282) killed (signal 11). [sfuxlib.hpp 838]

F [Thr 140289385400128] *** LOG => Process server0 stopped (pid 24282).

F [Thr 140289385400128] *** WARNING => Node server0 failed: result 1, exit code 11. [sfxxnode.hpp 1024]

 
-----------------------------------------------------------------------

The most probable reason or cause for this failure is incompatibility between specific versions of the Kernel and the SAP JVM.
To prevent this issue, we should have ATLEAST the following versions for SAP JVM and Kernel of sap system.
SAP JVM - Release 6.1.043
Kernel    - Release 7.20 Patch Level 63

Thursday 16 June 2016

How to fix when j2ee system stops with exit code 721035?


This article answers following queries:
 
·         How to fix when j2ee system stops with exit code 721035?

·         What was the cause for java issue with exit code 721035?

·         How to resolve if java error exit code 721035 is encountered?

·         How to prevent exit code 721035 issue in SAP?

·         Server0 failed with exit code 721035. How to resolve this issue?

·         Exit code 721035 errors found in dev_jstart file. What was the reason? How to fix?

·         What is the location of dev_jstart file in sap Netweaver java?

·         What is the path for java instance controller trace file (dev_jstart)?

===================================================


 In real time, SAP Netweaver Java system (or application server) which was running may fail or go down abruptly. When we check trace files, we find following errors in dev_jstart file which is located under /usr/sap/<SID>/inst_name/work:
 
=======================================

F [Thr 01] *** LOG => Send SIGINT to server0 (pid 696444).

F [Thr 01] *** LOG => Process server0 stopping (pid 696444).

F [Thr 01] *** LOG => Instance state is "All processes running" (RUNNING @ 1, ACTIVE).

F [Thr 01] *** LOG => Signal 20 SIGCHLD.

F [Thr 01] *** WARNING => process server0 (pid 696444) killed (signal 11). [sfuxlib.hpp 832]

F [Thr 01] *** LOG => Process server0 stopped (pid 696444).

F [Thr 01] *** WARNING => Node server0 failed: result 1, exit code 721035. [sfxxnode.hpp 1009]

======================================================

 The most probable reason or cause for this failure is incompatibility between specific versions of the Kernel and the SAP JVM.

To prevent this issue, we should have ATLEAST the following versions for SAP JVM and Kernel of sap system.

SAP JVM - Release 5.1.064

Kernel    - Release 7.10 Patch Level 206 or Release 7.11 Patch Level 141

How to create a java thread dump?


This article answers following queries :

Ø  How to create a java thread dump?
Ø  How to thread dump using SAP management console (MMC) ?
Ø  Explain the process to create java thread dump
Ø  How to create stack dump in SAP?
Ø  Explain the process to dump stack trace
 


1)    Start the SAP Management Console.
2)    Navigate to AS Java process table under respective server node
3)    Select the process for which you want to create a stack dump in the java process table ( Process can be SDM / dispatcher / server0)
4)    Right click on the process and from the context menu, choose “Dump stack trace”
 
 
 
 
 
 
 
 
 
 
 
 
5)    System prompts to enter user id/ password credentials (as shown below)
 
 
 
 
 
 
 
 
 
 
6)    Please provide sidadm credentials of respective server
7)    The stack dump is written to the std_<component>.out file located in the /usr/sap/<SID>/<inst_name>/work directory.
If you have selected server0 process earlier, filename will be std_server0.out

 
 
 
 
 
 
 
 
 
 
 
Please note that the location of the stack dump may differ depending on the java SDK being used.
 

Monday 13 June 2016

SAP Buffer types


This article answers following questions:

ü  What are different SAP Buffer types?

ü  What are the functions of various buffers in SAP?

===========================================
There are following seven main groups of buffers found in shared memory.

v  Repository Buffers

v  Table Buffers

v  Program Buffer

v  SAPgui Buffers

v  Roll and Paging Buffers

v  SAP Calendar Buffer

v  SAP Cursor Cache


 
1)   Repository Buffers: 

The Repository buffer is mainly known as the nametab buffer (NTAB), but it is also known as the ABAP Dictionary buffer.

 This buffer contains the table and field definitions that are activated in the SAP System. An entry is made in the Repository buffer when a mass activator or a user (using the ABAP Dictionary, Transaction SE11) requests to activate a table. The corresponding name table is then generated from the information that is managed in the Repository.

 The description of a table in the Repository is distributed among several tables (for field definition, data element definition and domain definition). This information is summarized in the name table. The name table is saved in the following database tables:

·         DDNTT (table definitions)

·         DDNTF (field descriptions)

The Repository buffer consists of four buffers in shared memory, one for each of the following:
 
Table definitions
TTAB buffer
Table DDNTT
Field descriptions
FTAB buffer
Table DDNTF
Initial record layouts
IREC buffer
Contains the record layout initialized depending on the field type
Short Nametab
SNTAB buffer
A short summary of TTAB and FTAB buffers

 
The Short nametab and Initial record layouts are not saved in the database. Instead, they are derived from the contents of tables DDNTT and DDNTF.

 When access to a table is requested, the database access agent embedded in each work process first reads the Short nametab buffer for information about the table. If the information is insufficient (for example, the SELECT statement uses a non-primary key) it accesses the Table definitions buffer and then the Field descriptions buffer. By reading the Repository buffers, the database access agent knows whether the table is buffered or not. Using this information, it accesses the table buffers (partial buffer or generic buffer) or the database.

The IREC buffer is read:

·         When a REFRESH command is executed in an ABAP program

·         At an INSERT command, when a record is created in the buffers before the data is inserted and the fields are initialized with the values found in IREC buffer

You can set the buffers mentioned above by editing the parameters in the instance profile.

 2)   Table Buffers
There are two kinds of table buffers

·         Partial table buffers: Stores single table entries, that is, one record with its field values

·         Generic table buffers: Stores a range of table entries, that is, a range of records with their field values. The generic table buffer can also store all the entries (records) in a table. This is known as resident (or full) buffering

 Whether a table is partially buffered, generically buffered, or fully buffered depends on its attribute settings. You can change the buffer attributes of a table using Transaction SE13

3)   Program Buffer:
It is also known as SAP Executable buffer or ABAP buffer or PXA (Program Execution Area). Stores the compiled executable versions of ABAP programs (loads).The contents of this buffer are stored in tables D010L (ABAP loads), D010T (texts) and D010Y (symbol table).The program buffer has a hash structure and supports LRU (Least Recently Used) displacement.

4)   SAPgui Buffers:
There are two kinds of SAPgui buffers

 ·         Presentation buffers: Also known as Screen buffer or Dynpro buffer. Stores the generated screens (DYNPRO loads).The presentation buffer is adjusted by changing its instance profile parameters

·         Menu buffers: Also called as CUA buffer. Stores objects from the SAPgui. For example, menus, pushbutton definitions. These objects are from tables D345T (CUA texts) and D342L (CUA loads). The buffer has directory structure and supports LRU displacement. The menu buffer is adjusted by amending its instance profile parameters

5)   Roll and Paging Buffers

The roll and paging buffers are the preferred working area of the roll and paging areas for an instance (application server). The remaining area is located on disk as roll and paging files. The user context is stored in the extended memory and the roll area (when the job is "rolled out" of a work process). The paging area stores special data for the ABAP processor, while the extended memory stores a large portion of the internal tables of a program.

You set the roll and paging buffers, as well as the extended memory using the parameters in the instance profile

6)   SAP Calendar Buffer
The SAP calendar buffer stores all defined factory and public holiday calendars. Calendars are stored in the database tables TFACS and THOCS. The buffer has a directory structure. This means that if the shared memory is configured too small, only the required data is loaded; there is no LRU displacement of the contents of the buffer. You can change the calendar buffer by editing the parameter in the instance profile 

7)   SAP Cursor Cache
The SAP cursor cache helps to improve system performance by reducing the number of parsing of SQL statements; it is database-dependent. The SAP cursor cache is only slightly different for Oracle, Informix and SAP DB. It is totally different for AS/400 and MS SQL Server.

There are two types of cursor caches:

·         Statement ID cache
·         Statement cache

Changing the SAP cursor cache parameter value in the default profile will affect other areas as well. You are therefore advised not to tune it without the recommendation of a qualified SAP expert


 

Search this blog for other interesting articles

Please subscribe & activate link received to your email id to receive latest articles

Enter your email address:

Delivered by FeedBurner