Enabling the max_line_length property

The -Dcom.ibm.csi.netcool.integrations.max_line_length property of the Transport module allows you to limit the amount of data that can be read at one time. Making the reading from files bounded in this way allows you to prevent unbounded reads from files being exploited in a denial of service attack.

Note: The max_line_length property is specified in bytes.

UNIX and Linux operating system

If you are running the probe on UNIX or Linux operating systems, customize the probe scripts using the following steps:

  1. Update nco_p_message_bus.env by adding the following line at the end of the file:
    NCO_PROBE_JAVA_ARGS=-Dcom.ibm.csi.netcool.integrations.max_line_length=xxxx
  2. Update nco_jprobe by updating the following command:

    exec "$JAVA" $NCO_PROBE_JAVA_ARGS $NCO_JPROBE_JAVA_FLAGS -cp "$CLASSPATH" -DOMNIHOME="$OMNIHOME" -DKERN_ARCH="$KERN_ARCH" com.ibm.tivoli.netcool.omnibus.oidk.Probe "$@"

Windows operating system

If you are running the probe on Windows operating systems, update nco_p_message_bus.bat using the following steps:

  1. Add the following line before the line discussed in Step 2:

    set TRANSPORT_EXTRA_ARGS=-Dcom.ibm.csi.netcool.integrations.max_line_length=xxxx

  2. Add the TRANSPORT_EXTRA_ARGS variable to the following line:

    %JAVA_EXEC_USED% -DOMNIHOME=%NEWOMNIHOME% ^ -cp %PROBE_CLASSPATH%;%CP_CLASSPATH%;%FW_CLASSPATH%;%PS_CLASSPATH%;%NS_CLASSPATH%;%TS_CLASSPATH%;%MESSAGEBUS_CLASSPATH%;%TRANSPORT_EXTRA_ARGS% ^ com.ibm.tivoli.netcool.omnibus.oidk.Probe %*

Selecting a value for the max_line_length property

If you set max_line_length to a relatively small value (for example 100 bytes), and if the probe reads a line from the data file that is greater than max_line_length, the probe shuts down and writes the following exception to the error log:

Error: E-JPR-000-000: Line length exceeds maximum size of %d chars. Increase this value using the property com.ibm.csi.netcool.integrations.max_line_length. Snippet of parsed line: '%s'

If the RetryCount property is set to a value greater than 0, the probe restarts and reopens the data file. When the probe reaches the line that triggered the IOException, it shuts down again and restarts.

To avoid this type of shutdown and restart loop, perform one of the following steps:
  • Either remove the lines from the data file that trigger the probe restarting.
  • Or set max_line_length to a value greater than the longest line length in the data file.