Skip to content

Changing the Default Ports

When you run multiple WSO2 Micro Integrator instances or a cluster of instances on a single server or virtual machine (VM), you must change the default ports to avoid port conflicts.

Default ports

By default, the Micro Integrator is internally configured with a port offset of 10. Listed below are the ports that are effective in the Micro Integrator by default (due to the internal port offset of 10).

Default Port Description
8290 The port of the HTTP Passthrough transport.
8253 The port of the HTTPS Passthrough transport.
9201 The HTTP port of the Management API of WSO2 Micro Integrator.

Configuring the default HTTP port
If required, you can manually change the HTTP port in the deployment.toml file (stored in the MI_HOME/conf folder) as shown below.

[mediation]
internal.http.api.port = http_port

Note: With the default internal port offset, the effective port will be http_port + 10.
9164 The HTTPS port of the Management API of WSO2 Micro Integrator.

Configuring the default HTTPS port
If required, you can manually change the HTTPS port in the deployment.toml file (stored in the MI_HOME/conf folder) as shown below.

[mediation]
internal_https_api_port = https_port

Note: With the default internal port offset, the effective port will be https_port + 10.

Random ports

Certain ports are randomly opened during server startup. This is due to specific properties and configurations that become effective when the product is started. Note that the IDs of these random ports will change every time the server is started.

  • A random TCP port will open during server startup because of the -Dcom.sun.management.jmxremote property set in the server startup script. This property is used for the JMX monitoring facility in JVM.
  • A random UDP port is opened at server startup due to the log4j appender (SyslogAppender), which is configured in the <MI_HOME>/conf/log4j2.properties file.

Changing default ports

There are two ways to manually offset the default ports.

Tip

  • The internal offset of 10 is overriden by this manual offset. That is, if the manual offset is 3, the default ports will change as follows:
    • 8290 -> 8283 (8290 - 10 + 3)
    • 8253 -> 8246 (8253 - 10 + 3)
    • 9164 -> 9157 (9164 - 10 + 3)
  • Note that if you manually set an offset of 10 using the following method, you will get the same default ports.
  • Pass the port offset to the server during startup.

    ./micro-integrator.sh -DportOffset=3
    micro-integrator.bat -DportOffset=3
  • Open the deployment.toml file (stored in the MI_HOME/conf folder) and add the port offset as follows:

    [server]
    offset = 3
Top