Enabling the RMI Port for the Order Management Server Container

Complete the following steps to enable the RMI port for the Order Management Server Docker container.

Prerequisites

You must have already executed $OM_HOME/docker/copy-required-files.sh. The following steps talk about the files kept at that specific docker context.

Procedure

  1. Open the $OM_HOME/docker/oms/5.0.0-LR/omsServer/standalone/bin/start.sh file in edit mode and create the following new variable JMX_RMI_ARGS in the script:
    JMX_RMI_ARGS="-Dcom.sun.management.jmxremote 
    -Djava.rmi.server.hostname=<host-ip-address> 
    -Dcom.sun.management.jmxremote.port=<port-number> 
    -Dcom.sun.management.jmxremote.rmi.port=<port-number> 
    -Dcom.sun.management.jmxremote.local.only=false 
    -Dcom.sun.management.jmxremote.authenticate=false 
    -Dcom.sun.management.jmxremote.ssl=false"
    <host-ip-address> must be updated with the IP address of your host machine and <port-number> with the port number where you want to access the RMI services exposed by Order Management Server.
  2. Use the created variable JMX_RMI_ARGS and add it to the line where the application invokes Java and passes the required arguments. For example:
    java $JMX_RMI_ARGS -cp
    $CLASS_PATH $JVM_OPTIONS $CLASS_NAME ${ARGUMENTS[@]}
    In case the port number you are using is behind the firewall, make sure to make the exception for this port number. In case you have IP tables, make a new rule in IP tables for this port.
  3. Expose the port number you have mentioned in Step 1 in the Order Management Server Docker file $OM_HOME/docker/oms/5.0.0-LR/Dockerfile.
  4. In $OM_HOME/docker/docker-compose-run-oms.yml map the port, which you have exposed for JMX under ports (maintain the white-spaces). For more information on how to map the port, refer to this step in the "Running the Order Management Server Container on a Predefined Port" topic.
  5. Build the oms docker image as mentioned in Building Docker Images.