Possible to change the router port 8081 to something else?

Is it possible, either before or after having installed Apigee Edge, to change the port the router listens on, for management, from 8081 to something else? Is this documented?

If so please explain how, or cite the relevant docs for me.

Thank you.

@Maudrit @Paul Mibus

Solved Solved
4 3 1,031
1 ACCEPTED SOLUTION

If you have Edge already installed (All-in-one), then here is how you can change the router's port:

From the box on which Edge is installed (AIO), run these steps:

1. query the router's port:

/opt/apigee/apigee-service/bin/apigee-service edge-router configure -search conf_webserver_http.port

(it should show 8081)

2. using vi, or whatever, create-or-edit the file /opt/apigee/customer/application/router.properties to include a line like this:

conf_webserver_http.port=9094

You can use whatever available port you like. Check that it does not conflict with other services.

3. restart all Edge processes:

/opt/apigee/apigee-service/bin/apigee-all restart

4. query the router's port again:

/opt/apigee/apigee-service/bin/apigee-service edge-router configure -search conf_webserver_http.port

(it should show 9094, or whatever you set)

5. Then tickle the port with curl to verify:

curl -i http://localhost:9094/v1/buildinfo

You should get a 200 with a valid payload.

curl -i http://localhost:9094/v1/servers/self

You should get a 200 and the payload should indicate this is the Edge router. Like this:

HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 14 Sep 2016 16:54:24 GMT
Content-Length: 1242
{
  "buildInfo" : {
    "buildNumber" : "jenkins-5G_Release_Sanity-531",
    "buildTimestamp" : "1465006549881",
    "rPMName" : "apigee-rpm-1.0.0.531.13a8bfd.1606040153-160330_01",
    "releaseID" : "160330_01",
    "sCMBranch" : "origin/OPDK_1605",
    "sCMRevision" : "13a8bfd7b591eee2d1c9ee01e66a75534e51778c"
  },
  "externalHostName" : "localhost",
  "externalIP" : "192.168.56.10",
  "internalHostName" : "localhost",
  "internalIP" : "192.168.56.10",
  "isUp" : true,
  "pod" : "gateway",
  "reachable" : true,
  "region" : "dc-1",
  "tags" : {
    "property" : [ {
      "name" : "jmx.rmi.port",
      "value" : "1100"
    }, {
      "name" : "loadBalancer",
      "value" : "nginx"
    }, {
      "name" : "http.management.port",
      "value" : "9094"
    }, {
      "name" : "started.at",
      "value" : "1473872033940"
    }, {
      "name" : "startup.interval",
      "value" : "7677"
    }, {
      "name" : "rpc.port",
      "value" : "4527"
    }, {
      "name" : "Profile",
      "value" : "Router"
    }, {
      "name" : "startup.time",
      "value" : "7 seconds "
    }, {
      "name" : "up.time",
      "value" : "22 seconds "
    } ]
  },
  "type" : [ "router" ],
  "uUID" : "52cd78a3-b6e7-4dfd-98b1-593976d9b219"
}

There is a general description of this "override" capability here: http://docs.apigee.com/private-cloud/latest/how-configure-edge

View solution in original post

3 REPLIES 3

If you have Edge already installed (All-in-one), then here is how you can change the router's port:

From the box on which Edge is installed (AIO), run these steps:

1. query the router's port:

/opt/apigee/apigee-service/bin/apigee-service edge-router configure -search conf_webserver_http.port

(it should show 8081)

2. using vi, or whatever, create-or-edit the file /opt/apigee/customer/application/router.properties to include a line like this:

conf_webserver_http.port=9094

You can use whatever available port you like. Check that it does not conflict with other services.

3. restart all Edge processes:

/opt/apigee/apigee-service/bin/apigee-all restart

4. query the router's port again:

/opt/apigee/apigee-service/bin/apigee-service edge-router configure -search conf_webserver_http.port

(it should show 9094, or whatever you set)

5. Then tickle the port with curl to verify:

curl -i http://localhost:9094/v1/buildinfo

You should get a 200 with a valid payload.

curl -i http://localhost:9094/v1/servers/self

You should get a 200 and the payload should indicate this is the Edge router. Like this:

HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 14 Sep 2016 16:54:24 GMT
Content-Length: 1242
{
  "buildInfo" : {
    "buildNumber" : "jenkins-5G_Release_Sanity-531",
    "buildTimestamp" : "1465006549881",
    "rPMName" : "apigee-rpm-1.0.0.531.13a8bfd.1606040153-160330_01",
    "releaseID" : "160330_01",
    "sCMBranch" : "origin/OPDK_1605",
    "sCMRevision" : "13a8bfd7b591eee2d1c9ee01e66a75534e51778c"
  },
  "externalHostName" : "localhost",
  "externalIP" : "192.168.56.10",
  "internalHostName" : "localhost",
  "internalIP" : "192.168.56.10",
  "isUp" : true,
  "pod" : "gateway",
  "reachable" : true,
  "region" : "dc-1",
  "tags" : {
    "property" : [ {
      "name" : "jmx.rmi.port",
      "value" : "1100"
    }, {
      "name" : "loadBalancer",
      "value" : "nginx"
    }, {
      "name" : "http.management.port",
      "value" : "9094"
    }, {
      "name" : "started.at",
      "value" : "1473872033940"
    }, {
      "name" : "startup.interval",
      "value" : "7677"
    }, {
      "name" : "rpc.port",
      "value" : "4527"
    }, {
      "name" : "Profile",
      "value" : "Router"
    }, {
      "name" : "startup.time",
      "value" : "7 seconds "
    }, {
      "name" : "up.time",
      "value" : "22 seconds "
    } ]
  },
  "type" : [ "router" ],
  "uUID" : "52cd78a3-b6e7-4dfd-98b1-593976d9b219"
}

There is a general description of this "override" capability here: http://docs.apigee.com/private-cloud/latest/how-configure-edge

Hi @Dino

Thank you for this post. I assume it is still applicable to my on premise version 4.16.09 and does it have any other impact. do i need to change any other configuration after changing port of edge-router ?

thank you.

Yes, still valid! I will update the tags on the Q to accentuate that.