Api proxy url not set after deployment to private cloud

/****

Apigee Version: Private Cloud/OPDK 4.15.04.00

REHL 6.6

Oracle JDK 1.7

Installation Type: AIO

***/

Successfully able to create and deploy proxy but unable to reach it. I noticed the deployment url is not being set after deployment.

Deployments:

Environment Revision URL

dev 1 NA

When I query for deployments using management apis, it returns success.

{
    "environment": "dev",
    "name": "apiproxy1",
    "organization": "org1",
    "revision": [
        {
            "configuration": {
                "basePath": "/",
                "steps": []
            },
            "name": "1",
            "server": [
                {
                    "status": "deployed",
                    "type": [
                        "message-processor"
                    ],
                    "uUID": "3c2ca30c-fed8-494f-91d7-133636bacd69"
                },
                {
                    "status": "deployed",
                    "type": [
                        "router"
                    ],
                    "uUID": "dc9e6175-4f5a-42b6-af19-7b710eb0d705"
                }
            ],
            "state": "deployed"
        }
    ]
}

are you able to connect to http://host:<vh_port>?

is it connection timeout? or any HTTP error code like 404?

what do you mean by this? ‘I noticed the deployment url is not being set after deployment.’ – is it not showing in the UI? – have you configured HostAlias in your VH

what is VH port? 9001? or something else

  1. Yes

  2. No 404

  3. Yes, the url is set to NA in Edge UI (under API Proxies > {Proxy} > Deployments table. No host alias was configured for VH. Would it not show http://IP:port in this case?

  4. VH port is 6001 for our dev environment.

/v1/organizations/{org}/environments/dev/virtualhosts/default

{
    "hostAliases": [],
    "interfaces": [],
    "name": "default",
    "port": "6001"
}
 

Have you set up a virtual host yet? If you havnt you need to. There is a script that comes with private cloud that will dot his for you, but you can also just do this via an api call.

Some Examples (shamelessly stolen from a communication from Bernhard W)

get:

[root@Centos64-101 ~]# curl -u $CRED http://:/v1/o/acme/e/test/virtualhosts/default

{

“hostAliases” : ,

“interfaces” : ,

“name” : “default”,

“port” : “9001”

}

update:

[root@Centos64-101 ~]# curl -u $CRED http://:/v1/o/acme/e/test/virtualhosts/default -X PUT -d ‘{“hostAliases”:[“api.test.myserver.de:9001”], “name”:“default”, “port”:9001}’ -H “Content-Type:application/json”

{

“hostAliases” : [ “api.test.myserver.de:9001” ],

“interfaces” : ,

“name” : “default”,

“port” : “9001”

}

set:

[root@Centos64-101 ~]# curl -u $CRED http://:/v1/o/acme/e/test/virtualhosts -d ‘{“hostAliases”:[“api.secure-test.myserver.de:9443”], “name”:“secure”, “port”:9443}’ -H “Content-Type:application/json” -X POST

{

“hostAliases” : [ “api.secure-test.myserver.de:9443” ],

“interfaces” : ,

“name” : “secure”,

“port” : “9443”

}

See virtual hosts:

[root@Centos64-101 ~]# curl -u$CRED http://:/v1/o/acme/e/test/virtualhosts

[ “default”, “secure” ]

[root@Centos64-101 ~]# curl -u $CRED http://192.168.56.101:8080/v1/o/acme/e/test/virtualhosts/default

{

“hostAliases” : [ “api.test.myserver.de:9001” ],

“interfaces” : ,

“name” : “default”,

“port” : “9001”

}

[root@Centos64-101 ~]# curl -u $CRED http://:/v1/o/acme/e/test/virtualhosts/secure

{

“hostAliases” : [ “api.secure-test.myserver.de:9443” ],

“interfaces” : ,

“name” : “secure”,

“port” : “9443”

}

Update again:

[root@Centos64-101 ~]# curl -u $CRED http://:/v1/o/acme/e/test/virtualhosts/default -X PUT -d ‘{“hostAliases”:[“api.test.myserver.de:9001”, “api2.test.myserver.de:9001”], “name”:“default”, “port”:9001}’ -H “Content-Type:application/json”

{

“hostAliases” : [ “api.test.myserver.de:9001”, “api2.test.myserver.de:9001” ],

“interfaces” : ,

“name” : “default”,

“port” : “9001”

}

NOTE: you need to have at least one legit virtual host entry per environment or you wont be able to process requests (or at least thats my experience)

Yes, as you can see in #4 of my reply above, we do have a VH setup at port 6001.

im pretty sure it wont listen unless you give it a host alias. I would need to check that - but i seem to remember that being the case.

see examples below (in my answer)

,

And the host alias will have to be VALID :slight_smile:

,

OK I will try that. Thx for the suggestion

,