This is one of the technical article in the series. – How to View Logs-SAP Business Technology Platform

How to Download MTA Deployment Logs from SAP Business Technology Platform Cloud Foundry Environment

 

Prerequisites :

I assume that you’ve already set up your SAP Business Application Studio and created the needed dev space.

 

if you are trying in Local Machine (Windows/Mac. ) then

 

Prerequisites for Local Machine(Windows , Mac ..)

 

You’ve downloaded and installed the cf command line client for Cloud Foundry as described in the tutorial Install the Cloud Foundry Command Line Interface (CLI).

 

 

In SAP Business Application Studio

 

  1. Login to Cloud Foundry Environment cf CLI using the cf login command and chose the CF organization and space you want to inspect.

 

  1. If you deployed MTA using SAP Business Application Studio or from a local machine, then when MTA Deployed failed, you would have noticed the below instructions.

          Proceeding with automatic retry… (1 of 3 attempts left)

          …

           Execution of task “deploy” on application “your app name” failed.

 

Download the application logs via the dmol command and check them for more information.

        A step of the process has failed. Retrying it may solve the issue.

Process failed.

       Use “cf deploy -i 79b44796-4ec0-11ed-bf4b-eeee0a9258c0″ -a abort” to abort the process.

       Use “cf deploy -i 79b44796-4ec0-11ed-bf4b-eeee0a9258c0″ -a retry” to retry the process.

       Use “cf dmol -i 79b44796-4ec0-11ed-bf4b-eeee0a9258c0” to download the logs of the process.

For convenience i have created folder with the name “logs”

From Terminal you enter cf dmol -i <operation id> command to download logs in your desired directory

You can download the logs with the download-mta-op-logs command (or  short command dmol)

 

Instead of manual deployment, if your scenario is if you would have chosen CI/CD then you can find this operation id in Jenkin Logs.

Another approach  to find the operation id and download the logs using the below commands.

 

  1. List recent deployment processes using the cf mta-ops –all command and note the mta id or operation id.

 

Below command prints active multi-target app operations in current org-space

cf mta-ops

Take the operation id

  1. Download the logs of the deployment operation based on operation id of mta id as per the following examples:
    1. cf dmol -i <operation id>
    2. cf dmol –mta <mta id>
  2. Logs will be downloaded into the folder mta-op-<operation id> in current  folder executed from Terminal

Here you can open a file or download a folder to your local system for further analysis of why the deployment failed . You can search logs with keywords like Exception  or  Error  or Fail…. to find root cause analysis

 

Note : You can also try below command to monitor trail logs in terminal

cf deploy -i 79b44796-4ec0-11ed-bf4b-eeee0a9258c0 -a monitor

 

Thank you for reading this blog post. If you find this material useful, please leave your feedback in the comments section below.

Feel free to also ‘Like’ ,‘Share’ , ‘Follow’ me to get new updates.

Sara Sampaio

Sara Sampaio

Author Since: March 10, 2022

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x