All Products
Search
Document Center

Realtime Compute for Apache Flink:View the logs of a historical deployment

Last Updated:Sep 12, 2024

Realtime Compute for Apache Flink allows you to view the logs of a historical deployment on the Logs tab in the development console of Realtime Compute for Apache Flink. You can also view the logs in the Object Storage Service (OSS) or Simple Log Service console. This topic describes how to view the logs of a historical deployment in these three consoles.

Background information

You need to view the logs of a historical deployment in the following scenarios:

  • You want to view, search for, or analyze the operational logs of a historical deployment. By default, the system retains only 5 MB of the operational logs.

  • The web UI of Realtime Compute for Apache Flink cannot be accessed and you want to check the logs of the JobManager to identify an error.

Prerequisites

  • The log archiving feature is enabled for the historical deployment. To check whether log archiving is enabled for the historical deployment, perform the following operations: Go to the deployment details page and click the Configuration tab. In the Logging section, check whether Enabled is displayed in the Log Archiving field. By default, log archiving is enabled.查看历史作业实例日志2.jpg

  • You have configured the parameters to export the logs of the historical deployment to OSS or Simple Log Service before you view the logs of the historical deployment in the OSS console or the Simple Log Service console. For more information, see Configure parameters to export logs of a deployment.

Limits

  • In Ververica Runtime (VVR) 3.X, only VVR 3.0.7 and later allow you to view the logs of the TaskManagers of a historical deployment.

  • In VVR 4.X, only VVR 4.0.11 and later allow you to view the logs of the TaskManagers of a historical deployment.

Usage notes

  • If a TaskManager or the JobManager is started, logs are written to Simple Log Service or OSS. However, if no TaskManagers are started and the JobManager is also not started, logs are not written to Simple Log Service or OSS.

  • If you cannot find the relevant log file on OSS because the JobManager and TaskManagers fail to start, contact Alibaba Cloud technical support.

  • Two log files are retained in the configurations of Realtime Compute for Apache Flink. The default size of each of the log files is 5 MB. We recommend that you do not modify the file size. If the file size does not meet your business requirements, you can export the logs to OSS.查看历史作业3.jpg

    Note

    The log files displayed on the Configuration tab of the Deployments page do not include the log files to which data is being written. If you set the DefaultRolloverStrategy max parameter to 1, a maximum of two files are saved. One file is saved in the memory, and the other is saved to your local disk.

View the logs of a historical deployment on the Logs tab

  1. Log on to the Realtime Compute for Apache Flink console.

  2. find the workspace that you want to manage and click Console in the Actions column.

  3. In the left-side navigation pane, click O&M > Deployments.

  4. On the Deployments page, find the deployment that you want to manage and click its name.

  5. Click the Logs tab.

  6. In the left-side pane, click the Logs tab. On the Logs tab, select a deployment from the Job drop-down list.

    查看历史作业实例日志.jpg

  7. View the logs of the JobManager and TaskManagers

    Click the Job Manager tab to view the logs of the JobManager and click the Task Managers tab to view the logs of the TaskManagers.

View the logs of a historical deployment in the OSS console

  1. Log on to the OSS console.

  2. In the left-side navigation pane, click Buckets.

  3. Find the bucket that you configure when you activate Realtime Compute for Apache Flink and click its name.

  4. In the Objects section of the page that appears, view the logs in the related directories.

    Folder

    Description

    artifacts

    Stores the uploaded JAR packages.

    flink-jobs

    Stores the checkpoints of Realtime Compute for Apache Flink deployments.

    flink-savepoints

    Saves the final savepoint file that is generated by the savepoint operation when you click Savepoint in the upper-right corner of the development console of Realtime Compute for Apache Flink.

    logs

    Stores the logs of the deployment for which the Logging Profile parameter is set to OSS.

    Note

    The logs of deployments in the logs folder are stored in the following path: logs/${Workspace ID}/${Deployment ID}/${Job ID}. You can find the logs of the JobManager and TaskManagers of the related deployment based on this directory structure.

View the logs of a historical deployment in the Simple Log Service console

  1. Log on to the Simple Log Service console.

  2. In the Projects section, find the project whose logs you want to view and click its name.

  3. In the Logstores section, find the Logstore in which all logs are stored and click its name.

  4. On the page that appears, enter the query and analysis statements, specify a time range, and then click Search & Analyze.

    For more information, see Query and analyze logs.