Error during sample setup

Not applicable

Hi,

I am getting error while doing sample examples. Here is the error msg, please help me.

$ sh deploy_all.sh

This script deploys all sample API proxies under ./sample-proxies to your organization on the Apigee API Platform.
Be sure to populate values in setenv.sh in this directory before running this script.
Using smar4460@gmail.com in smar4460-eval.
Enter your password for the Apigee Enterprise organization smar4460-eval, followed by [ENTER]: Verifying credentials...
Verfied!
Proceeding with deployment.
Deploying all samples to test using smar4460@gmail.com and smar4460-eval
Creating caches
curl: (6) Could not resolve host: api.enterprise.apigee.com
curl: (6) Could not resolve host: api.enterprise.apigee.com
Writing images/postman-oauth.png to ./postman-oauth.png
Traceback (most recent call last): File "../tools/deploy.py", line 201, in <module>

Thank you.

0 6 643
6 REPLIES 6

Hi @Smar S

Welcome to the community !!

Can you confirm you are using the trial org in Apigee Cloud ? Also can you confirm you are able to ping api.enterprise.apigee.com ?

Also - can you run this curl on your machine or POSTMAN

curl -X GET \
  https://api.enterprise.apigee.com/v1/organizations/smar4460-eval/ \
  -H 'authorization: Basic <base64 encoded value of username:password' 

and let me know what response you got along with the response code ?

Thank you Sai, I am using trial org.


I am not able to ping api.enterprise.apigee.com, its giving error as "Ping request could not find host api.enterprise.apigee.com. Please check the nam e and try again."

I am trying to ping it from corporate network, is it the cause for this?

When I run the get command through Postman

I am getting following message

{

"createdAt": 1510639881912,
"createdBy": "accounts_apigee_admin@google.com",
"displayName": "smar4460-eval",
"environments": [
"prod",
"test" ],

"lastModifiedAt": 1510639881912,
"lastModifiedBy": "accounts_apigee_admin@google.com",
"name": "smar4460-eval",
"properties":
{
"property": [
{
"name": "features.isSmbOrganization",
"value": "false"
},
{ "name": "features.isCpsEnabled",
"value": "true"
}

]

},
"type": "trial"
}

Thanks. Can you run the curl command I shared on your terminal ?

Sai,

Sorry forgot to include that in earlier reply. Its giving host not resolved error.

curl: (6) Could not resolve host: api.enterprise.apigee.com

Can you please do a couple of commands?

The http://whatismyipaddress.com/hostname-ip gives me

The api.enterprise.apigee.com resolves into
Lookup IPv4 Address: 52.40.84.137
Lookup IPv4 Address: 52.89.253.102

can you

ping 52.40.84.137

even if the result is negative (frequently ping port is firewalled), can you please do:

please use double-quotes when on Windows command/cmd terminal. and give us output.

you can omit :<yourorgadminpassword>, it will ask you password on the prompt. edit out Authorization: Basic header value, it will contain your password.

curl -k https://52.89.253.102/v1/organizations/<yourorg>; -H "Host: api.enterprise.apigee.com" -v -u <yourorgadminmail>:<yourorgadminpassword>



Depending on the result, you still might need to add https proxy setting for CLI curl command that would be, as per: https://community.apigee.com/articles/37598/configuring-https-proxy-for-dev-and-runtime-compon.html

curl --proxy <proxy server:port>

so the next command to run:

curl -k https://52.89.253.102/v1/organizations/<yourorg>; -H "Host: api.enterprise.apigee.com" -v -u <yourorgadminmail>:<yourorgadminpassword> --proxy <proxy server:port> 

you night need -k as curl would not automatically know your certs trust of chain.

you can take your proxy settings from the Internet Settings/Connection tab. or alternatively by navigating to the Chrome's wegpage

chrome://net-internals/#proxy

Thank you @ylesyuk

unfortunately i am not able to see my proxy details as I do not have access to view them. Tried other options and its not working.

I tried from my personal machine and its working.

Thanks for your help.