Hitachi

uCosminexus Service Platform Setup and Operation Guide


7.4.6 Debug information

If collection of debug information is enabled, the debug information that is output consists of the following three sections:

Debug information is output in the following formats:

[Figure]

This section describes how to view the user message traces (debug information) that have been output. For details about how to collect debug information, see 7.3.2(6) Collecting debug information.

Important note

The debug information that is output to files includes raw message content. Therefore, you must take special care to prevent security problems such as information leakage.

Organization of this subsection

(1) Output destinations of user message traces (debug information)

The following shows the output destinations of user message traces (debug information).

(a) Debug information that is output when the data transformation API is used

In this case, user message traces (debug information) are output to the path specified for the csc.dt.debugtrace.filepath property in the usrconf.properties file (user property file for the J2EE server). The output files are named in the following patterns:

  • In wraparound mode

    cscdebug_group-name_N.log
  • In shift mode

    cscdebug_group-name_.log

In the group-name portion, the instance (group) name of the data transformation API is inserted.

In the N portion, the sequence number of the file is inserted. Note that this number does not exceed the number of files specified in the usrconf.properties file (user property file for the J2EE server).

(b) Debug information that is output during data transformation on the HCSC server

In this case, user message traces (debug information) are output to the path specified for the telegramtrace-filepath property in the HCSC server runtime definition file. If the specified path does not exist or is invalid, traces are output to the default output destination.

The trace files are named in the following patterns:

  • In wraparound mode

    csctelegram_HCSC-server-name_N.log
  • In shift mode

    csctelegram_HCSC-server-name_.log

In the N portion, the sequence number of the file is inserted. Note that this number does not exceed the number of files specified in the HCSC server runtime definition file.

(c) Debug information that is output during execution of data-transformation unit test commands

In this case, user message traces (debug information) are output to the path specified in the data-transformation unit test command (csctransform, cscbinaryparse, or cscgenbinary). The trace files are named in the following pattern:

cscdebug_dtcommand_N.log

In the N portion, the sequence number of the file is inserted. The maximum number of files is 16 and the maximum file size is 2,147,483,647 bytes. The maximum number of files, maximum file size, and rotation mode cannot be changed.

(2) Output format and output items of a user message trace (debug information): Start section

(a) Output format

The following figure shows the output format of the start section of a user message trace (debug information).

Figure 7‒31: Output format of a user message trace (debug information): Start section

[Figure]

(b) Output items

The following table shows the items that are output in the start section of a user message trace (debug information).

Table 7‒53: Output items of a user message trace (debug information): Start section

Item

Contents

Number

The sequence number of each trace record is output.

Date

The date on which the trace record was collected is output in YYYY/MM/DD format.

Time

The time at which the trace record was collected is output in local time at the millisecond precision in hh:mm:ss.SSS format.

Product ID

A string that identifies the product is output.

  • CSCDT: CSC data transformation

Pid

The identifier of each process is output.

Tid

The identifier of each thread is output.

ID

This item is not output.

Information identifying the point for collecting the start section of a message trace

Start of a message trace

The string debugtrace started, which indicates the start of a user message trace, is output.

Collection position

The information that identifies the trace collection point is output:

  • DT: Data transformation processing

Protocol type

This item is not output.

Precise position

More precise trace collection point information is output:

  • RED: Processing to read binary data

  • WRT: Processing to generate binary data

Message common ID

This item is not output.

Additional information

The following information is added.

(a) For binary data

  • Data type (Binary)

  • Size of the entire input data

  • Read position (offset) in the event of an error

  • Root application information#1

(b) For DOM

  • Data type (DOM)

  • Absolute path of the node at which processing was being performed when the error occurred#2

  • Root application information#1

CRLF

The record end code is output.

#1

This item is not included in the debug information for the csctransform and cscbinaryparse commands.

#2

If there are multiple elements whose names are the same in the path, a subscript starting with 1 is added to each of them as follows:

Example: node-name[element-occurrence-position]

Note that node tags are not output if binary data remains after the read of binary data is completed.

(3) Output format and output items of a user message trace (debug information): Data section

In the data conversion base, the information about the messages that are processed before an error occurs can be included in user message traces as debug information.

The following table shows the items that are output in debug information.

Table 7‒54: Items that are output in debug information

Output timing

Debug information to be output

Purpose

When binary data is read (during binary-to-DOM data transformation)

Binary data that was read successfully and information about DOM

If invalid data is included in the data being processed, you can use this information for investigation.

Size of the entire input data

You can identify the section where an error exists in the input data.

Current read position for the input data (the position at which data was being read when an error occurred)

Absolute path of the node at which processing was being performed when an error occurred

Root application information

You can use this information to identify the section for which an error message was output based on the root application information in the message logs.

When binary data is generated (during DOM-to-binary data transformation)

Information about the DOM tree up to the node where an error occurred

If invalid data is included in the data being processed, you can use this information for investigation.

Absolute path of the node at which processing was being performed when an error occurred

You can identify the section where an error exists in the input data.

Root application information

You can use this information to identify the section for which an error message was output based on the root application information in the message logs.

Note that the direct cause of the error does not always exist in the node indicated in the debug information. Therefore, see also the information about the preceding and following nodes and the binary data for those nodes.

(a) Output format

The following figure shows the output format of the data section of a user message trace (debug information).

Figure 7‒32: Output format of a user message trace (debug information): Data section

[Figure]

(b) Output items

The following table shows the items that are output in the data section of a user message trace (debug information). Note that trace data is not output if debug information does not exist (if the data length of binary data or DOM is 0 or null).

Table 7‒55: Output items of a user message trace (debug information): Data section

Item

Contents

Number

The sequence number of each trace record is output.

Date

The date on which the trace record was collected is output in YYYY/MM/DD format.

Time

The time at which the trace record was collected is output in local time at the millisecond precision in hh:mm:ss.SSS format.

Product ID

A string that identifies the product is output.

  • CSCDT: CSC data transformation

Pid

The identifier of each process is output.

Tid

The identifier of each thread is output.

ID

This item is not output.

Information about message trace data

Output position (in hexadecimal format)

The offset from the beginning of a user message is output (in hexadecimal format).

Data (in hexadecimal format)

The content of a user message (binary data or DOM) is output in hexadecimal format.

Data (in ASCII format)

The content of a user message (binary data or DOM) is output in ASCII format.

For the codes 0x20 to 0x7E, the corresponding ASCII characters are output. For the other codes, periods (.) are output.

CRLF

The record end code is output.

(4) Output format and output items of a user message trace (debug information): End section

(a) Output format

The following figure shows the output format of the end section of a user message trace (debug information).

Figure 7‒33: Output format of a user message trace (debug information): End section

[Figure]

For additional information, the maximum data length indicated is a guideline. No truncation is made even if the length exceeds the maximum.

(b) Output items

The following table shows the items that are output in the end section of a user message trace (debug information).

Table 7‒56: Output items of a user message trace (debug information): End section

Item

Contents

Number

The sequence number of each trace record is output.

Date

The date on which the trace record was collected is output in YYYY/MM/DD format.

Time

The time at which the trace record was collected is output in local time at the millisecond precision in hh:mm:ss.SSS format.

Product ID

A string that identifies the product is output.

  • CSCDT: Data conversion base

pid

The identifier of each process is output.

tid

The identifier of each thread is output.

ID

This item is not output.

Information identifying the point for collecting the end section of a message

End of a message trace

The string debugtrace ended, which indicates the end of a user message trace, is output.

Collection position

The information that identifies the trace collection point is output:

  • DT: Data transformation processing

Protocol type

This item is not output.

Precise position

More precise trace collection point information is output:

  • RED: Processing to read binary data

  • WRT: Processing to generate binary data

Message common ID

This item is not output.

Additional information

The length of the user message is additionally output in decimal. If there is no user message, null is output. If the length is 0 bytes, 0 is output.

CRLF

The record end code is output.

(5) Times at which to output user message traces (debug information)

The times at which to output debug information differ depending on the function as follows.

(a) Debug information output when the data transformation API is used

Debug information is output if an error occurs during transformation of binary data via the data transformation API.

(b) Debug information output during data transformation on the HCSC server

If output of debug information for data transformation on the HCSC server is enabled (telegramtrace-trigger=DTERR is specified in the HCSC server runtime definition file), debug information is output at the times shown in the following table.

Table 7‒57: Times at which to output user message traces (debug information) and information that is output

Timing

Debug information that is output

At the time of the processing to read binary data (during binary-to-DOM data transformation)

Messages (binary and DOM) that were processed before occurrence of the error

At the time of the processing to generate binary data (during DOM-to-binary data transformation)

Messages (DOM) that were processed before occurrence of the error

(c) Debug information output during execution of data-transformation unit test commands

Debug information is output if an error occurs during execution of a data-transformation unit test command (csctransform, cscbinaryparse, or cscgenbinary).

(6) Collection points of user message traces (debug information)

The following describes the points at which to collect user message traces (debug information).

The following figure shows the points at which user message traces (debug information) are collected if an analysis error occurs during binary data transformation.

Figure 7‒34: User message trace (debug information) collection points (if an analysis error occurs during binary data transformation)

[Figure]

The following table lists trace collection points. The numbers in the Number in figure column correspond to the circled numbers in the preceding figure.

Table 7‒58: User message trace collection points (if an analysis error occurs during binary data transformation)

Number in figure

Trace collection point

1

Position where an error occurred during the processing to read binary data

2

Position where an error occurred during the processing to generate binary data

(7) Output of detailed information messages

If an error occurs during binary data transformation, detailed information messages (KDEC40312-I and KDEC40313-I) are output regardless of whether output of debug information is enabled or disabled.

The detailed information messages provide the following information, which can be used to identify the location of the error in the input data:

Also, check for exception messages output before and after the detailed information messages. These exception messages might indicate the cause of the error.