Configuring MettleCI Workbench to use a Custom Port Number
Using a custom port while running the MettleCI Setup Wizard
The following is as a temporary work-around for port conflicts when setting up Workbench for the first time. Set permanent alternative ports afterwards using these instructions.
Create a file /opt/dm/mci/setupEnv.sh containing the following line, replacing <port-number> with the alternative port you wish to use:
export JAVA_OPTS=-Ddw.server.applicationConnectors[0].port=<port-number>
Ensure this file is owned by the account you have devoted to Workbench (usually mciworkb) and has permissions 755 (-rwxr-xr-x). For example,
$> sudo chmod 755 /opt/dm/mci/setupEnv.sh
$> sudo chown mciworkb /opt/dm/mci/setupEnv.sh
$> ls -l /opt/dm/mci/setupEnv.sh
-rwxr-xr-x 1 mciworkb dstage 64 Sep 30 09:02 /opt/dm/mci/setupEnv.sh
$> cat /opt/dm/mci/setupEnv.sh
export JAVA_OPTS=-Ddw.server.applicationConnectors[0].port=5678
$>
Once /opt/dm/mci/setupEnv.sh has been created restart your Workbench service using the Service Manager utility on Windows, or this command on Unix:
$> sudo service dm-mettleci-workbench restart
The MettleCI Workbench Setup Wizard will now be accessible via the specified port number (5678 in the example above).
Once the MettleCI Setup Wizard is complete, delete the setupEnv.sh file and complete the steps in the following section to ensure that Workbench continues to use your preferred ports .
Changing ports after completing the MettleCI Setup wizard
Workbench is served on two ports: one for the developer-focused UI and another for support investigation purposes only. You can make Workbench operate on any ports you like by updating the port values in the server section of your <METTLECI-HOME-DIRECTORY>/config.yml file. This example exposes the main Workbench UI over HTTP on port 9090 and the support UI on port 8087:
server:
applicationConnectors:
- type: http
port: 9090
...
adminConnectors:
- type: http
port: 8087
When HTTPS has been configured, the server section will contain additional HTTPS-specific properties. In this case, you must only update the HTTPS port numbers that are in conflict, leaving all other properties unchanged.
Once you have made the port configuration changes, restart the Workbench service using the Service Manager utility on Windows, or the following command on Unix: .
$> sudo service dm-mettleci-workbench restart
Verify Workbench is up and running on the appropriate ports for HTTP and/or HTTPS by navigating to https://<host-url>:<http-port> or http://<host-url>:<https-port> in your browser, as appropriate.