Problems with Creating a Stack

The creation of a cloud stack will fail if an error occurs during the creation of any of the resources that comprise the new stack. By default Oracle Cloud Stack rolls back (deletes) any resources that were created prior to the error.

Some Oracle-defined templates provide additional troubleshooting resources. See Get Help for a Specific Template.

Follow this procedure in the Oracle Cloud Stack console to help identify the source of the stack creation error:

  1. Create the same stack again, but select the On Failure Retain Resources checkbox on the Create New Oracle Cloud Stack — Stack Details page. When the creation of this stack fails, any resources that were created will not be automatically deleted.

  2. From the main Stacks page of the console click Activity.

  3. Verify that the Service Type is set to Oracle Cloud Stack. Search for and locate your failed Create Service operation.

  4. Click Right arrow to the left of the operation to view its log.

  5. From the log identify the resource in the stack that caused the failure and note its Service Type. For example, Oracle Java Cloud Service.

    Alternatively, from the main Stacks page click the name of the failed stack. Then use the Stack Details page to identity the type of the failed resource.

  6. From the same Activity page change the Service Type to the type of the failed resource. Search for and locate the failed Create Service operation for this specific cloud resource.

  7. Click Right arrow to the left of the operation to view its log. Use this information to determine the exact cause of the resource creation failure.

  8. Take an appropriate corrective action:

    • If the resource creation problem was due to the value of a template parameter, you will need to delete the stack and create it again with a different parameter value. See Deleting a Cloud Stack.

    • If the resource creation problem was due to some external issue in the environment and you can correct it, Oracle Cloud Stack can attempt to create the failed resource again. Return to the Stacks page, click the Stack menu icon menu to the right of the stack and select Resume.

To troubleshoot a stack failure from the command line interface (CLI):

  1. Turn on the debug logging level in the CLI:

    psm log -l debug
  2. Run the same stack create command again, but specify the RETAIN option:

    psm stack create -f RETAIN . . .

    The output includes the Oracle Cloud Stack job ID.

  3. Monitor the progress of your stack by using the stack operation-status command. From the output of this command identify the resource in the stack that caused the failure.

    For example:

    "message":"Failed to create service MyApp-JCS. Please refer to the service activity logs for more details"
  4. Use the operation-status or similar command for the specific cloud service that failed.

    For example, if the failed resource is an Oracle Java Cloud Service instance refer to psm jcs operation-status in PaaS Service Manager Command Line Interface Reference.

    Use this information to determine the exact cause of the resource creation failure.

  5. Take an appropriate corrective action:

    • If the resource creation problem was due to the value of a template parameter, you will need to delete the stack and create it again with a different parameter value.

    • If the resource creation problem was due to some external issue in the environment and you can correct it, use the stack resume command. Oracle Cloud Stack will attempt to create the failed resource again:

      psm stack resume -n YourStackName