How to configure as Router/Message Processor bind (listen) on a specific interface

Not applicable

Hi Team,

Could someone let me know about a question from a customer on OPDK setup property "BIND_ON_ALL_INTERFACES"?

Apigee docs says that If it's set to "y" then the Router/Message Processor bind (listen) on all interfaces (IPs). If set to “n” then the Router/Message Processor bind (listen) on a specific interface, the IP returned by the "hostname -i" command).

However on Private Cloud 4.17.09 even if it's 'n' all the interfaces IPs seem to listen port 9001 in case of MP.

# netstat -an | grep 9001
tcp 0 0 192.168.99.100:9001 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:9001 0.0.0.0:* LISTEN
tcp 0 0 10.0.2.15:9001 0.0.0.0:* LISTEN

Are there any differences on 4.17.x from the older releases about this config?
And how can we configure it as to listen only on the ip of 'hotname -i'?

We want to configure ExternalIP and InternalIP of RMP server differently and make server only listen on ExternalIP. Please advise me how to configure it?

Regards,
Toshi
0 4 510
4 REPLIES 4

There should be no change in the config in 4.17.x and it should work as expected. However can you specify if you ran setup org from a different config file than component setup file? Was the property BIND_ON_ALL_INTERFACES present in setup org file as well.

Please check the virtualhosts using management api and see the interfaces they are associated with.

To get the list of interfaces in the box, run the command -> ifconfig -a

You can rerun your virtualhhosts using management api with interface of your chose. If you choose lo, it will only listen to localhost.

@Rajesh Mishra Thank you for the response! My understanding is that BIND_ON_ALL_INTERFACES property is only used for RMP component setup, not by org configuration:
https://docs.apigee.com/private-cloud/latest/onboard-organization

Do you mean that we can try it with adding 'BIND_ON_ALL_INTERFACES=n' to the setup org file?

And there seems to be some differences between 4.15.7.x and 4.16.01 or later including:
The property file '/opt/apigee4/conf/apigee/router/ec2.properties' is no more created during setup.

So, I would also want to know how the equivalent settings like ec2_public_ipv4, ec2_public_hostname are handled on 4.16.01 or later. If the file is no more needed, how are the listening IPs managed on 4.16.x or later releases?



Give it a try and let me know it it helped. BIND_ON_ALL_INTERFACES should be used only during virtual host creation step which happens during org provisioning. I'm not sure if we store any interface information anywhere else.

/opt/apigee4/conf/apigee/router/ec2.properties are not done . Please refer here https://community.apigee.com/questions/53624/the-value-corresponding-to-ec2-public-ipv4-and-ec2.html for how to handle them if they need to be handled.

@Rajesh Mishra Thank you for the comment.

I tested with adding BIND_ON_ALL_INTERFACES=n on the configFile for org setup and executed:

/apigee-service apigee-provision setup-org


with the config file

But the result is the same as above and all IPs are listening.

And then,

curl -u <sysAdminEmail:pw> -X PUT http://ms_IP:8080/v1/servers/<uuid>; -d <property>=<value> 

with configuring ExternalIP as property doesn't make any changes to the LISTEN IPs.

Could you advise what else I can check and test?