Task Schedule FAQ

  • Last update:  2023-10-27
  • Overview

    When a scheduled task fails to execute, there is a  on the right side of the corresponding log in Task Execution Detail of Running Surveillance. The corresponding error is displayed when you click.

    This document introduces some errors and solutions in scheduled tasks.

    Attachment Generation Failure Due to Too Long File Name

    Error:

    Result file creation failed: Attachment name

     2.png

    This error will cause the loss of the error attachment or the size of the attachment sent being 0 KB when you process subsequent attachment tasks (like sending emails).

    Cause:

    Attachments, whose names are from File Name, in formats such as .CPR, .PDF, .XLS are generated when scheduling tasks are executed.

    The actual file name calculated by a formula may exceed the limit of the operating system on the file name length (usually around 255 characters), resulting in file generation failure.

    iconNote:
     For details about formulas, see Supported Formulas in Task Schedule.

    Solution:

    Use shorter file names by modifying the scheduled task settings.

    Dataset Configuration Error

    Query: wait millis 100000, active 10, maxActive 1000

    Error:

    Dataset configuration error: Query: wait millis 100000, active 10, maxActive 1000.

     4.png

    Cause:

    Data Connection used by templates needs to be connected to retrieve data when template calculations are executed in Task Schedule. When the connection times out, a dataset configuration error will be reported.

    Solution:

    Log into FineBI as the admin, click System Management > Data Connection > Data Connection Management, go to the data connection used by the template in the scheduled task, and increase Max Wait Time.

    Already too many clients

    Error:

    ERROR: dn_6003_6004: [FATAL] Already too many clients

     6.png

    Cause:

    As the scheduled task generates separate results for many users, the number of data connections generated when calling the template exceeds the maximum connection limit, causing excessive database pressure and finally resulting in the failure of the scheduled task.

    Solution:

    Modify the maximum number of threads and of connections in Task Schedule by the super admin to reduce the concurrent pressure on the database through the FINE_CONF_ENTITY Visual Configuration plugin.

    • When the parameter value of QuartzConfig.threadCount is changed to 10, the number of threads for executing scheduled tasks simultaneously is limited.

    •  When the parameter value of QuartzConfig.maxConnections is changed to 5, the maximum number of connections is limited.

    The settings take effect after the server is restarted.

    Configuration Item

    Definition

    Modification Rule

    QuartzConfig.threadCount

    Maximum number of threads in Task Schedule

    The parameter value must be a positive integer (default to 100).

    QuartzConfig.maxConnections

    Maximum number of connections in Task Schedule

    The parameter value must be a positive integer.

    Scheduled Task Timeout

    Error:

    TimeoutException

     7.png

    Cause:

    When the scheduled task is running for more than 5 minutes (default), the above prompt will appear without interrupting task execution. The task will be logged if it succeeds later.

    Solution:

    Disable the timeout prompt or extend the time that the timeout prompt appears by the super admin through the FINE_CONF_ENTITY Visual Configuration plugin. The settings take effect after the server is restarted.

    Configuration Item

    Definition

    Modification Rule

    ScheduleSettingConfig.taskTimeout

    Set the timeout for scheduled tasks (default to 5 minutes with the unit of milliseconds).

    The timeout set must not exceed the forwarding timeout configured in Nginx.

    The parameter value must be a positive long integer (default to 300000).

    ScheduleSettingConfig.timeoutRemind

    State of monitoring log timeout reminder for scheduled tasks

    Canceling the timeout check and reminder does not affect the execution flow of the task.

    JAR files of 2020/1/15 or later versions are supported.

    The parameter value needs to be Boolean (default to false).

    false: not enable the monitoring log timeout reminder for scheduled tasks.

    true: enable the monitoring log timeout reminder for scheduled tasks.

    Email Sending Error

    535 Error: authentication failed

    Error:

    535 Error: authentication failed

     8.png

    Cause:

    The username or password for connecting to the SMTP server is incorrect.

    Solution:

    Check the username and password for connecting to the SMTP server. For most mailboxes, the username and password of the SMTP server are different from those of the email account. There is a configuration option in the email settings page.

    Couldn't connect to host

    Error:

    Couldn't connect to host

     9.png

    Cause:

    Failed connection to SMTP server due to network issues

    Solution:

    Check if the configured SMTP server address and port number are correct and if they can be connected. You can ping the address to get the IP address and confirm whether it can be connected through the command telnet ip port.

    1. Ensure that the email server address and port number you entered are correct and send a test email. If the test email cannot be sent successfully, there is a problem with the mail server. Check again in the email client.

    2. If the test email is successfully sent by the mail server, occasional task failures (with the same error message) may be caused by poor network connectivity at that time and thus failed connection to the mail server.

    3. It may also be due to the mail server being overloaded with concurrent connections, causing it to be unresponsive and unable to be connected.

    Solution: Improve the performance of the mail server or stagger the task intervals for sending emails in the project (avoiding the concurrency within a time period).

    Invalid Addresses

    Error:

    Invalid Addresses

     10.png

    Cause:

    An invalid email address is contained in Recipient, CC or Bcc. The specific address (like notexist12345@163.com) is also prompted together.

    Solution:

    1. Check and remove the invalid email address from Recipient, CC, or Bcc.

    2. It is difficult to troubleshoot if there are many recipients in the scheduled task. In this case, you can tick In addition to the general results, members of the default user group will receive individual results.

    In Run Monitoring, only Recipient with the invalid email address fails to be sent. You can remove or modify the invalid email address.

     

    response: 421

    Error:

    com.fr.schedule.output.EmailException: javax.mail.MessagingException: Could not connect to SMTP host: SMTP.163.com, port: 25, response: 421;

    Cause:

    • There is a problem with the mail server address and port number configuration.

    • SMTP host has reached the maximum number of connections.

    Solution:

    • The recipient and the email admin confirm if the mail server on the receiving end is functioning properly.

    • If the recipient SMTP host refuses to provide service (because the host has exceeded its maximum service capacity), you can improve the frequency of the SMTP server or divide tasks into smaller parts.

    com.sun.mail.smtp.SMTPSendFailedException: 554

    Error:

    com.sun.mail.smtp.SMTPSendFailedException: 554

    Cause:

    The email has been considered as spam by the mail server.

    Solution:

    Each mailbox has its own anti-spam function with various rules.

    1. Open the recycle bin in your mailbox and retrieve the email.

    2. Add the email address of the sender into the contact in your mailbox to prevent the email from being mistakenly classified as spam.

    SMTP Server Error

    Error:

    The error content is shown as follows.

     12.png

    Cause:

    The platform sends the email information (like Recipient, CC, Bcc, Subject, and Mail Content) to the SMTP server which sends the email according to the information.

    The email number of Recipient, CC, or Bcc has exceeded the number limit of the SMTP server. Different SMTP servers may have different number limits.

    Solution:

    1. Reduce the user number in Default User Group. Due to different number limits for different SMTP servers, you are advised to set the user number within 500.

    2. Enhance the number limit of the SMTP server for the recipient by the SMTP server admin in client end.  Due to different modification methods for different SMTP servers, this document does not provide a specific method.

    Receiving No Email with Successful Sending

    Error:

    The email is sent successfully in Run Monitoring, but the recipient does not receive (no error message).

    Cause:

    The email sent by the SMTP server is rejected by the mailbox of the recipient. Log in the mailbox (configured in System Management) corresponding to the SMTP server and check if there are any bounce emails.

    Solution:

    Investigate the reasons for the bounce based on the corresponding mailbox's bounce rules.

    Email Thread Restrictions

    Error:

    Error in the Outlook mailbox: STOREDRV.ClientSubmit; sender thread limit exceeded

    Cause:

    Microsoft only allows three threads to send emails concurrently at the same time. If the limit is exceeded, the above exception will appear. Outlook mailbox has this limit by default.

    Email Notification in Task Schedule is multi-thread. There may be a situation exceeding three threads.

    Solution:

    Modify the maximum number of thread in Task Schedule by the super admin through the FINE_CONF_ENTITY Visual Configuration plugin in the report server with JAR version on 2019/8/16 or later.

    According to the limit of Microsoft, change the value of QuartzConfig.threadCount into 3 or less than 3 to avoid exceeding the thread limit.

    The settings take effect after the server is restarted.

    Configuration Item

    Modification Rule

    QuartzConfig.threadCount

    The parameter value must be a positive integer (default to 100).

    .

    Garbled Codes in Attachment

    Problem:

    In Linux, the Object Type of the scheduled task is BI Template. The PDF files (in attachments), chart components, and table components have garbled codes.

    Cause:

    The system does not install the corresponding font.

    Solution:

    Install the corresponding font.

    Space Displaying Problem in Email Body

    Problem:

    Multiple spaces in the email body are merged into one and leading spaces are not displayed.

    Solution:

    Replace the spaces (needed at the beginning of a line or within a line in the email body) with an equal number of  .

     13.png

     

    Redirecting for Result Link Failure

    Problem:

    In the settings of the email for the scheduled task, Text plus result link has been ticked. When the recipient clicks the result link, the following errors appear: Sorry, you cannot view the page. To access, please contact the administrator.

     14.png

    Cause:

    You probably ticked Clearing at the end of the task in Dispatcher Object.

    Solution:

    Tick Remaining only 1 times, Remaining only 5 times, Do not clean up, or Custom, rather than Clearing at the end of the task.

    Sending Email Failure After FineDB Database Migration

    Problem:

    There is no either Run Monitoring or messages in email sending for the scheduled task.

    An error appears in the backstage: couldn't store job: Packet for query is too large (35045785>4194304).You can change this value on the server by setting the max_allowed_packet' variable.

    Cause:

    You have migrated the built-in FineDB database to the local MySQL database, in which the set max_allowed_packet value is too small. This will cause the failure to write the single record into the database when the limit is exceeded. Subsequent record writing will also fail.

    Solution:

    One:

    In the my.ini file under the MySQL installation directory, modify max_allowed_packet = 1M in the mysqld field to max_allowed_packet = 500M. Then restart MySQL.

    Two:

    1. Set the value of max_allowed_packet to 500 MB through the statement set global max_allowed_packet = 524288000;.

    2. Check whether the modification is successful through the statement show VARIABLES like '%max_allowed_packet%';.

    Task Execution Failure Due to Shared FineDB Database

    Problem:

    1. The scheduled task can be executed manually (like Immediate execution after configuration and execution of the task created right now).

    2. A scheduled task is regularly executed, occasionally not executed or never executed. But the next execution time of the task changes normally.

    3. The scheduled task is executed regularly and the email is sent successfully. But the size of the attachment is 0 KB.

    4. There is no time record of a scheduled task that is not executed in Run Monitoring. There is no log and error in the backstage either.

    5. Although Start Time is set for the scheduled task, the task is stopped after the start time, and no available button to make the task continue. Even if the task is executed successfully, a prompt will pop up indicating that the task has been deleted when it is executed again.

    Cause:

    The FineDB database is connected to multiple projects, causing the scheduled task is executed in other projects at the regular time you set.

    Solution:

    1. Check how many machines are connected to the FineDB database in the platform.

    Query how many machines are connected to the FineDB database through corresponding MySQL statements. Check whether there are deployment projects in other machines (if there are multiple connected machines).

    • MySQL:

    select * from information_schema.processlist where DB like '%Name of the database migrated%';

    • Oracle:

    select sid,serial#,username,program,machine,terminal,osuser,process,client_info from v$session where username is not null order by username,program,machine;

    • SQLServer:

    select t2.name, t3.client_net_address, t1.host_name, t1.login_time, t1.status, t1.last_request_start_time from master.sys.dm_exec_sessions t1 inner join master.dbo.SYSDATABASES t2 on t1.database_id=t2.dbid inner join master.sys.dm_exec_connections t3 on t1.session_id=t3.session_id where t2.name = 'Database name';

    2. Check whether there are multiple running containers in the machine.

    Check if there are multiple containers that start the report project under the server through the command ps -ef | grep java. If any, troubleshoot the corresponding FineDB databases one by one.

    3. Troubleshoot the configuration of virtual directories.

    This solution is only suitable for containers (like Tomcat and Resin) that can be configured with virtual directories.

    The webroot folder in the webapps directory can be automatically started by Tomcat. If a virtual directory is configured to point to the webroot directroy, the directory will be started twice.

    • Search under the path conf/server.xml to view whether there is a docBase pointing to Context.

    • Search under the path conf/Catalina/localhost to view whether there is a file with the XML format pointing to the webroot directory.

    Timeout Error

    Problem:

    The email fails to be sent in Task Schedule. The error is as follows:

    com.fr.restriction.MemoryAlarmException:Sorry, long SQL runtime has triggered protection mechanism. Please try again later. If you are the administrator, you can edit this restriction in Intelligent O&M > Load Management > Template Limit.

    Solution:

    Disable all template limits.

    Starting with localhost in the URL of Email Result Link

    Problem:

    In Dispatcher Object, select Report Template as Object Type. In File Process, select Email Notification as the Processing method and tick Text Plus Result Link in email settings. The recipient clicks the result link in the email and finds the link starting with localhost which should be the actual IP address. ..

     15.png

    Solution:

    1. Modify the URL in the decision-making platform into the actual IP address (like http://IP address:Port number/Project name/decision).

    2. Create a scheduled task or re-edit the former task. Then click the result link in the email, the URL of the link is changed.

     17.png

    Executing Scheduled Tasks a Few Hours Ahead/Delayed

    Problem:

    The scheduled task is always executed a few hours (usually a fixed value like eight hours) ahead or delayed.

    Cause:

    1. Check if the time zone of the machine where FineDB is located is correct. On Windows, the time zone is correct if America Standard Time is echoed by using tzutil /g in the command prompt. On Linux, the time zone is correct if +0800 is included in the echo by using date -R in Bash.

    2. Check if the time zone of the machine where the platform project is located is correct (with the same method).

    3. Check if the time zone of the JVM (Java Virtual Machine) where the platform project is located is correct. Create a class file called Test (with the codes below), compile into the Test.class file, and upload to the machine where the platform project is located. Execute Java Test. If Asia/Shanghai is echoed, then the time zone is correct.

    import java.util.TimeZone;
    public class Test{
      public static void main(String[] args) {
       System.out.println(TimeZone.getDefault()); 
      }
    }

    The time zone echoed is based on your actual location.

    Solution:

    If the machine time zone is incorrect, modify the system time zone.

    If the JVM time zone is incorrect, you need to add the JVM startup parameter -Duser.timezone=Europe/British. If it is a container (like Tomcat) startup, add the parameter to the JAVA_OPTS (same as the location of -Xmx/-Xms for setting memory size) in the container. If it is the direct startup of a designer/installation version of FineBI, add the parameter to the designer.vmoptions or finebi.vmoptions under the launcher directory.

    Deleting Error Prompts for User Information in Scheduled Tasks

    In the settings of the scheduled task, users, departments, and roles in the system can be configured in Basic Setting > Default User Group.

    If the admin deletes the relevant users, departments, and roles in the task, an error will pop up in the log file fanruan.log when the scheduled task is executed again.

    The specific error logic is as follows.

    Deletion Content

    Specific Scenario

    Error

    User is deleted.

    Platform user:

    One deleted user: one line error.

    200 deleted users: one line error with the prompt indicating that 200 users have been deleted.

    Over 200 deleted users: one line error with the prompt only indicating that 200 users have been deleted.

    Custom user:

    As long as users (at most 200) are not matched with the field, an error will pop up.

    Format:

    Some users do not exist in Default User Group, please check the scheduled task: [Peter(Peter)].

    Example:

    Some users do not exist in Default User Group, please check the scheduled task: [Billy(Billy), Cherry(Cherry)].

    Role is deleted.

    One deleted role: one line error.

    Multiple deleted roles: one line error.

    Some roles do not exist in Default User Group, please check the scheduled task.

    Department is deleted.

    One deleted department: one line error.

    Multiple deleted departments: one line error.

    Some departments and positions do not exist in Default User Group, please check the scheduled task.

    Position is deleted.

    One deleted position: one line error.

    Multiple deleted positions: one line error.

    Some departments and positions do not exist in Default User Group, please check the scheduled task.

    Attachment Language in Task Schedule

    If you tick Appendix Archive in Dispatcher Object, the language of the attachment generated after the task can be modified.

    Modify the attachment language by the super admin through the FINE_CONF_ENTITY Visual Configuration plugin. The settings take effect after the server is restarted.

    ID

    VALUE

    Attachment Language

    LanguageConfig.locale

    zh_CN

    Simplified Chinese

    zh_TW

    Traditional Chinese

    en_US

    English

    ja_JP

    Japanese

    ko_KR

    Korean

    Inconsistent Data Table Code in MySQL

    Error:

    Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='

    Cause:

    The encoding method of the data table in MySQL database is inconsistent, which prevents comparison after data retrieval and thus causes failed execution of the scheduled task.

    Solution:

    Modify the codes of MySQL database and of data tables to UTF-8.

    1. Check the rules of encoding and sorting for the MySQL database.

    View the character set SHOW VARIABLES LIKE 'character%';.

    View the sorting way SHOW VARIABLES LIKE 'collation_%';.

    2. Modify the character set code (if it is not UTF-8) through the following steps:

    Modify the key value of the character set in the my.ini file of MySQL.

    default-character-set = utf8 character_set_server = utf8

    Restart MySQL service after the modification.

    service mysql restart

    You can use the command to check if the code has been changed to UTF-8.

    mysql> SHOW VARIABLES LIKE 'character%';

    3. Check the rules of coding and sorting in all columns of the data table if the database code is normal.

    show full COLUMNS from Table name;

    4. Modify the abnormal codes in the data table to UTF-8.

    ALTER TABLE `Table name` CONVERT TO CHARACTER SET utf8;

    附件列表


    主题: System Management
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy