search cancel

API Developer Portal: startup script runs in loops when not using default/known tenant ID for first (and only) tenant in environment.


Article ID: 189523


Updated On:


CA API Developer Portal


This article discusses a rare issue that is found in the script used for starting up the API Developer Portal ("Portal"). A workaround is provided, and it is a known issue that will be resolved in a future release. This will usually only occur when a non-default tenant ID is used for the first and only tenant in the environment. In this situation, it can appear that the script never completes, going in loops because it never finds the default tenant ID.


There is a hardcoded part of the script that is expecting a known/default tenant ID. When an environment only has one tenant and that tenant is not one recommended in the documentation / expected by the script, it will run in a loop. 


This articles applies to Portal 4.5 and below.


This will be fixed in a future release of the Portal. In the meantime, a workaround exists to manually edit the script to allow for a new line to be added in a particular section:

As of Portal 4.4, the line number to add the statement below is below line 518, however this line number may be different in other versions of Portal. Be sure to look for the entire fragment to ensure this is being done in the right spot. Also, a backup is critically important.

Workaround steps:
  1. Append the following line after line 518 (as of Portal 4.4) in the script: echo "TSSG_TENANT_ID={{ user.PORTAL_TENANT_ID }}" >> ${DOCKER_CONFIG}/env-db
  2. Save the file.
After modification, the block of code should look similar to the following:

function config {
    tag_line=$(grep -n '^UUE:$' "$0" | cut -d ':' -f 1)
    if [[ -z $tag_line ]]; then
    DOCKER_CONFIG=$(mktemp -d)
    tail -n +$((tag_line + 1)) "$0" | base64 -d | tar xzC "$DOCKER_CONFIG"
    echo "TSSG_TENANT_ID={{ user.PORTAL_TENANT_ID }}" >> ${DOCKER_CONFIG}/env-db