How to Change SMP HTTPS Port from 8443 to 443?

How to Change SMP HTTPS Port from 8443 to 443?

By default, the SMP uses port 8443 for incoming HTTPS connections. More information about the SMP default ports is available here. Sometimes, it may be required to change the HTTPS port from 8443 to 443 (or to something else).

Step-by-step guide

The SMP default HTTPS ports can be changed by following the steps below.

  1. Open "/etc/harmony-smp/tomcat-conf/server.xml" for editing.

  2. Update the "Connector" element's "port" property from "8443" to "443" (or to something else).

    <Connector SSLEnabled="true" protocol="org.apache.coyote.http11.Http11NioProtocol" port="443"
  3. (This step is only necessary for SMP versions less than 2.0.0).
    By default, port numbers below 1024 are so called privileged ports that are not allowed to be used by non-root users, such as "harmony-smp". Therefore, the "harmony-smp" Java process must be allowed to listen on a privileged port.

    sudo setcap cap_net_bind_service+ep /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
  4. Restart the "harmony-smp" service.

    sudo systemctl restart harmony-smp
  5. The SMP should now listen on port 443.

  6. Also, remember to update the new port in the PMode configuration file and communicate about the change to all data exchange partners.

Related articles