Press "Enter" to skip to content

vRealize Automation 8.x – Accessing vRO Scripting.log

For anyone getting started with vRealize Automation (vRA) 8.x you’ve probably noticed (or will soon notice) a lot has changed under the hood. The appliance now runs everything in containers. This makes certain things like troubleshooting actions in vRealize Orchestrator a bit more difficult– at first.

In the vRA 7.x world you just need to ssh into the vRA appliance and find the log in /var/log/… In 8.x with containers, the process is similar however you need to first get a shell on the appropriate container. That process is described in this article.


Overview:
When using ‘External Values’ with a vRA custom form element, you may occasionally run into non-descript errors that require additional investigation to identify the cause. There is in vRA 8.x there is quick way to view a aggregate of the logs and a slower process to access the scripting.log and other logs. Both processes are outlined below.

Step-by-step guide

Logging into the appliance

SSH into the vRA appliance.

Aggregate log method

This method displays an aggregate of the log files in the container. It’s good for quickly looking for an issue, but can be quite busy depending on the source.

  1. List all available pods in the prelude namespace, locate the name of the ‘vco’ pod (This is the Orchestrator pod). This process can be used for other pods as well.
    kubectl -n prelude get pods 
  2. To view and tail a log use the following command:
    kubectl -n prelude logs <pod_name> -f 
  3. If a pod contains multiple containers, you will be presented with an error which requires additional input.


    To specify a specific container use the following command:
    kubectl -n prelude logs <pod_name> -f <container name> 

    Examples:
    kubectl -n prelude logs vco-app-56858bccf6-hrcj4 -f vco-server-app 
    kubectl -n prelude logs vco-app-56858bccf6-hrcj4 -f vco-server-app | grep -A 1 -B 1 "is null" 

In container logs method

  1. List all available prelude pods, locate the name of the ‘vco’ pod (This is the Orchestrator pod). This process can be used for other pods as well.
    kubectl -n prelude get pods 
  2. Find the which containers are present in the pod by running the describe command. This will present a verbose output of the makeup of the pod which includes the container names.
    kubectl describe pod/<pod_name> -n <namespace>

    Example: 
    kubectl describe pod/vco-app-56858bccf6-hrcj4 -n prelude 

    The output we are interested will be formatted and show the container names like this. Here are the container names which are needed for the next step.
Containers:
  vco-polyglot-runner:
    ...
  vco-server-app:
    ...
  vco-controlcenter-app:
    ...
  1. Get a shell on the container running in the pod
    kubectl -n <namespace> exec -ti <pod_name> -c <container_name> <command>

    Example:
    kubectl -n prelude exec -ti vco-app-56858bccf6-hrcj4 -c vco-server-app bash

  2. Locate and enjoy the logs
    find . -name "*.log"


  3. Tail the log of your choice
    tail -f /usr/lib/vco/app-server/logs/scripting.log 

Sharing is caring!

Leave a Reply

Your email address will not be published. Required fields are marked *

forty two − = forty