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.
Before you begin You must have already run$OM_HOME/docker/copy-required-files.sh. The following steps talk about the files kept at that specific docker context.
- Procedure
- 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 the Order Management Server. - 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 the IP tables for this port. - Expose the port number that you have mentioned in step 1 in the Order Management Server Dockerfile$OM_HOME/docker/oms/5.0.0-LR/Dockerfile.
- In $OM_HOME/docker/docker-compose-run-oms.yml map the port, which you have exposed for JMX under the 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.
- Build the oms docker image as mentioned in Building Docker Images.