Changing the Default Ports with Offset¶
When you run multiple runtimes on the same server or virtual machines (VMs), you must change their default ports with an offset
value to avoid port conflicts. An offset defines the number by which all ports in the runtime (e.g., HTTP/S ports) are increased.
For example, if the default HTTP port is 9763 and the offset is 1, the effective HTTP port changes to 9764. For each additional WSO2 product instance running on the same machine, you set the port offset to a unique value.
There are two ways to set an offset to a port: Update the server configurations, or pass the port offset during server startup. See the instructions given below to port offset the three runtimes of WSO2 API Manager.
Before you begin¶
See the complete list of default ports in all the API Manager components.
Note that most of the runtime ports change automatically based on the offset you specify here.
Changing the default API-M ports¶
The default port offset in the WSO2 API-M runtime is 0
. Use one of the following two methods to apply an offset to the API-M runtime.
Update the server configurations¶
-
Stop the API-M server if it is already running.
-
Open the
<API-M-HOME>/repository/conf/deployment.toml
file. -
Uncomment the
offset
parameter under[server]
and set the offset value.
Pass the port offset during server startup¶
-
Stop the API-M server if it is already running.
-
Restart the server with the
-DportOffset
system property.-
Linux/Mac OS
-
Windows
-
When you offset the server's port, it automatically changes all ports.
Changing the default SI ports¶
The default port offset in the WSO2 Streaming Integrator (SI) runtime and the SI Tooling runtime are 0
and 3
respectively. Setting a port offset changes the thrift, binary, and management ports of the SI runtimes.
Follow the steps given below.
-
Open the
deployment.toml
file of the SI runtime or the SI Tooling runtime (stored in the<SI_HOME>|<SI_TOOLING_HOME>/conf/server/deployment.yaml
directory). -
Update the port offset parameters in the following configurations:
What's Next?¶
You need to restart the server for these changes to take effect.