Error Handling

Configuration of the SMTP Server

If errors occur in Lobster_data, email notifications can be sent. As a prerequisite, an SMTP server must be set up in configuration file ./etc/startup.xml. The following listing shows the relevant section. All error notifications are sent via this SMTP server.


<!-- mail server settings -->
<Call name="addApplication">
<Arg>
<New class="com.ebd.util.net.mail.HubStartupConfiguration">
<Call name="setMailSettings">
<!-- Uncomment the next line if SMTP via TLS should be used -->
<Arg>smtps</Arg>
<Arg>win-mx.example.com</Arg>
<!-- Port -->
<Arg type="int">587</Arg>
<Arg>username</Arg>
<Arg>password</Arg>
</Call>
<!-- Uncomment the next line and set with fitting values to
change the list of mechanisms to be used for authentication -->
<!--<Set name="sMTPAuthMechanisms">NTLM LOGIN PLAIN MD5-DIGEST</Set>-->
</New>
</Arg>
</Call>

Configuration of the Error Email Recipients


There are three different entries in Lobster_data, in which the recipients of error emails can be configured. In principle, all three entries send emails independently of each other if the respective conditions apply. Exceptions are specifically mentioned below.

Configuration File ./etc/startup.xml

The following setting applies to all profiles in Lobster_data and to errors in phase 1.


...
<Call name="enableErrorMail"><Arg type="boolean">true</Arg></Call>
<Set name="MailSender">info@example.com</Set>
<Set name="MailRecipient">admin@example.com;other@example.com</Set>
...


If enableErrorMail has the value true, Lobster_data sends an email for each error entry in the General Messages (with the content of the error entry) to the specified recipients in MailRecipient (so even if no job has been created yet). Important note: Since this can generate a large number of emails very quickly, this functionality should only be used with caution. Note: This address is also used, for example, to send a notification if the disk space of the computer on which the Integration Server is installed is running low.

On Page 'Clients'


The following settings apply to all profiles of this client and to errors in phases 1-6.

On the Clients page, it is possible to define email recipients for errors in all six phases of a profile.

The email contains the job number, the profile name, the name of the input file and the error message. Existing input files are attached to the email. This default behaviour can be prevented by setting the system property -Dhub.datawizard.error_mail.no_attachment to true.

Note: The entered email address for phases 2-5 in the profile overwrites the email addresses for phases 2-5 in the client if an error occurs.


images/download/attachments/44939751/Mandanten_EN-version-1-modificationdate-1579670668250-api-v2.png

Here on Page 'Error Handling' - Phases 2-5


The following settings only apply to this profile and to errors in phases 2-5.

The email contains the job number, the profile name, the name of the input file and the error message. Existing input files are attached to the email. This default behaviour can be prevented by setting the system property -Dhub.datawizard.error_mail.no_attachment to true.

Note: The entered email address for phases 2-5 in the profile overwrites the email addresses for phases 2-5 in the client if an error occurs.



images/download/attachments/44939751/Zusatzaktion_1_EN-version-1-modificationdate-1579670668263-api-v2.png


(1) You can specify a profile to be called if an error has occurred in phases 2-5. The profile needs to be active and have an Input Agent of type Message. The Context and Queue are irrelevant. The input file and all variables are passed on. If an error occurs before phase 3, variables only contain the defined default values, but you can always access the system variable VAR_FILENAME. The system variable VAR_SYS_EXCEPTION contains the error message and VAR_SYS_CURRENT_RECORD contains the number of the record in which the error occurred (only relevant in phase 3, otherwise, it is always 0). Note: See also section Passed Variables, Lists and Maps.

(2) Here you can set the email addresses to which an error email is sent if errors have occurred in phases 2-5.

Here on Page 'Error Handling' - Phases 2-6


The following settings only apply to this profile and to errors in phases 2-6.

The content of the email can be freely edited. Note: You may use variables, but depending on the phase in which an error occurs, they may not yet have been initialised.


images/download/attachments/44939751/Zusatzaktion_2b_EN-version-1-modificationdate-1579670668269-api-v2.png


(3) If an error has occurred during the profile run, an email can be sent to one or more recipients.

(4) You can use constants and system variables (e.g. VAR_PROFILENAME, VAR_JOBNR, VAR_SENDER, VAR_MAILSUBJECT, VAR_FILENAME and VAR_SYS_EXCEPTION) if they have been defined in the profile (in (3) as well).

(5) This option decides whether the input file is attached to the email. Note: The system property -Dhub.datawizard.error_mail.no_attachment hat has no influence on this setting and the setting also has no influence on the system property.

Further Settings


Here on Page 'Error Handling' - Checkboxes


The following settings only apply to this profile and to errors in phases 1-6.


images/download/attachments/44939751/Zusatzaktion_0_EN-version-1-modificationdate-1579670668260-api-v2.png


(6) If this checkbox is set, calling this profile is interpreted as an error if it is suspended. The profile must have an Input Agent of type Message. Error emails are sent to the recipients in the error handling for phases 2-6 (see above) and the recipients on page Clients for phase 1 (see above). No error emails are sent to the recipients in configuration file ./etc/startup.xml (see above). This setting does not create error entries on pages Errors and General Messages, but it does create them on page Overview.

(7) If this checkbox is set, no error emails are sent for errors in phases 2-6. Error entries are not created on page Errors, but they are created on page Overview. Error emails for errors in phase 1 are still sent to the recipients specified in ./etc/startup.xml (see above) (but not to the email addresses specified for phase 1 on page Clients).

Phase 1/'Options' in Time-driven Input Agents - Checkboxes


The following settings only apply to this profile and to errors in phase 1.

You will find them in the tab Options of time-driven Input Agents.


images/download/attachments/44939751/Phase_1_Optionen_EN-version-1-modificationdate-1579670668255-api-v2.png


(8) If this checkbox is set, it is interpreted as an error if the Input Agent does not produce data. If (7) is not set, error emails are sent to the recipients defined in configuration file ./etc/startup.xml (see above), the recipients in the error handling for phases 2-6 (see above) and the recipients on page Clients for phase 1 (see above). If (7) is set, emails are only sent to the recipients defined in configuration file ./etc/startup.xml. These errors are not shown on pages Overview and Errors, only on page General Messages.

(9) Connection errors in phase 1 will also trigger error emails (usually that would only trigger emails to the recipients in configuration file ./etc/startup.xml, see above). If (7) is not set, error emails are sent to the recipients defined in configuration file ./etc/startup.xml (see above), the recipients in the error handling for phases 2-6 (see above) and the recipients on page Clients for phase 1 (see above). If (7) is set, emails are only sent to the recipients defined in configuration file ./etc/startup.xml. These errors are not shown on pages Overview and Errors, only on page General Messages.

See Also


Automatic Error Correction


See section Automatic Error Correction.


Evaluation of Logs


Not all log messages, which may be problematic, are classified as errors by Lobster_data. If you want to react to certain (possibly self-generated) log messages, it is possible to set up a so-called Log Listener. A Log Listener 'listens' to certain keywords in the error messages and if necessary sends a notification email.

You can react to Comm Log events with the Input Agent CommLog.