Release: 4.x
Component: APIPRD
To resolve this:
1) Make sure the host is resolvable
curl -v <HostName>
Additionally, please ensure you have followed the documentation to 'Configure Your DNS Server' prior to creating the tenant.
2) Be sure all data is filled in when running the script. Omitting items like the admin or reply email address will result in failures
3) Update the POST command in "create-tenant.sh" script with the "PORTAL_TENANT_ID" which is set in portal.conf file, before executing "create-tenant.sh" script.
Eg:- If "test" is the "PORTAL_TENANT_ID" which is configured in conf/portal.conf , then POST command in "create-tenant.sh" script will look like...
function create_tenant {
apim=$(get_conf PORTAL_TENANT_ID)
apim=${apim:-apim}
if [ -z "$data" ]; then
STATUSCODE=$(curl --silent --output ./tenant_info --write-out "%{http_code}" \
-X POST -k https://<TenantName>.${DOMAIN}:9443/provision/tenants \
--cert ${KEY_FILE} --key ${KEY_FILE} -H "Accept: application/json" \
-H "Content-Type: application/json" -d "$(generate_post_data)")
if test $STATUSCODE -ne 201; then
echo "There was an error while creating the tenant. Please check your connection to the servers and/or your json payload."
exit 1
else
print_steps
fi
elif [ -f "$data" ]; then
STATUSCODE=$(curl --silent --output ./tenant_info --write-out "%{http_code}" \
-X POST -k https://<TenantName>.${DOMAIN}:9443/provision/tenants \
--cert ${KEY_FILE} --key ${KEY_FILE} -H "Accept: application/json" \
-H "Content-Type: application/json" -d @${data})
if test $STATUSCODE -ne 201; then
echo "There was an error while creating the tenant. Please check your connection to the servers and/or your json payload."
exit 1
else
print_steps
fi
else
echo "${data} Does not exist"
fi
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Update /etc/hosts file by adding an entry with the "PORTAL_TENANT_ID".
<IP> <TenantName>
Substitute <IP> with the IP to your instance and example.com with "PORTAL_SUBDOMAIN" name accordingly.