Enabling the RMI Port for the OMS Server Container

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

Prerequisites

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

Procedure

  1. Open the $AF_HOME/docker/fom-oms/4.0.0/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 OMS 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 OMS server Docker file $AF_HOME/docker/fom-oms/4.0.0/Dockerfile.
  4. In $AF_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 OMS Server Container on a Predefined Port" topic.
  5. Build the fom-oms docker image as mentioned in Building Docker Images.