How to bind to specific IP address for message processor port 8998

Hello everyone,

In my Message processor node, there are two interfaces. Let's say IP#1 and IP#2. 

My "hostname -i" command give a IP#1. But I would like to run port 8998 on IP#2. I also don't want to make "hostname -i" command to output IP#2. Moreover, I don't want to run the install script again.

I would like to know how can I bind to IP#2 for port 8998. Thanks.

0 2 238
2 REPLIES 2

Message processor by default picks IP address of the local host. This is achieved by retrieving the name of the host from the system, then resolving it into an IP address.

Following can potentially be done to override the IP address picked by Message processor. Note that there is no way to specify a specific network interface - that feature is only available in virtual hosts. The steps will have to be followed in every message processor. Also, if the message processor IP changes in the future, the steps will have to be repeated for the Message processor to pick the new IP. Also, with this, Message processor will register itself in the Apigee cluster using the IP address specified - so other Apigee components will interact with message processor on this IP address.

Step 1 Create a file (let's say /opt/apigee/customer/application/message-processor/ip.properties) with the following contents:

public_ipv4=X.X.X.X
ipaddress=X.X.X.X
hostname=myhost


Here, put IP#2 for both public_ipv4 and ipaddress. You can skip hostname property if you're happy with the hostname being picked by default.

Ensure this file is readable and owned by "apigee" user

Step 2 Configure the following for message processor (by creating or editing file /opt/apigee/customer/application/message-processor.properties)

conf/registration.properties+ip.address.file=/opt/apigee/customer/application/message-processor/ip.properties

Ensure the file is readable and owned by "apigee" user.

Step 3 Restart message processor and check if the port is binding to the specified address. You can also query the Message processor UUID via management API and verify that message processor is registering itself with the specified IP address.

Hello @neeldey ,

Thanks for your answer. It perfectly answer my questions.

But I need to mention more context. My message processor's two interfaces are intended for different use cases. User Transactions like Port 8998 is used by one interface. Management traffic like Port 8082 is used by another interface. So, if I used above methods you mentioned, will it be okay for management traffic (Port 8082)?