How to configure the port utilized by TomEE (the Command Server service, an Apache Tomcat web server), to assign it to use a different TCP port other than the default '8005':
You can configure the port utilized by TomEE (the Command Server service, an Apache Tomcat web server, that uses process name 'TomEE.amd64.exe'). To do so, on the Command Server node, edit the config file for TomEE, which is the 'server.xml' config file: 'C:\Program Files\NovaStor\DataCenter\tomee\conf\server.xml'. Note: If you have installed DataCenter Command Server to custom folder, you'd have to navigate to that root folder structure to access this file, inside the '..\tomee\conf\' folder. The configuration line to change, around line 20, begins with the text <Server port="8005". You can change the TCP port in that config file to a TCP port that is not being utilized on the system, which can be confirmed by running the 'netstat -a' command on the Command Server, to look at what ports are in use. This screenshot is showing the server.xml using the default Server port="8005" value:
After the config file change in order to utilize this change go to Windows Services ('services.msc' command) on the Command Server system and restart the "NovaStor DC Command Server" service (which is the process named 'TomEE.amd64.exe'):
Once that service has restarted and you have waited between 3 and 5 minutes (and the process named 'TomEE.amd64.exe' is running as a task seen in Task Manager > Details), if you have trouble stopping this service using services.msc, you can go to Windows Task Manager and then click on the Details tab and locate the task named 'TomEE.amd64.exe' and right-click end task on it, and then start the service using services.msc. Once the service has been restarted and is in the "Running" state, then do a 'netstat -a' on the Command Server node via a Command Prompt session there, and look for the output of the port that you just specified as the new "Server port" in the config file, and it should show the "LISTENING" status for that new port. If when on a Command Server system that uses the name "ag-backupserver", using the default "Server port" value of 8005, we should see in the 'netstat -a' output:
TCP 127.0.0.1:8005 ag-backupserver:0 LISTENING
Then after the config.xml file is edited to change the Server port, to a value of 8020, then the result after restarting the "NovaStor DC Command Server" service will show in 'netstat -a' as:
TCP 127.0.0.1:8020 ag-backupserver:0 LISTENING
If you do not see the port that you changed the setting to listed in the 'netstat -a' output it is likely because you did not wait about 3 to 5 minutes as instructed earlier after restarting the Command Server service. This is because it takes a bit for the service to show it is using this port after starting the service, normally about 3-5 minutes.
Note: After making this type of port change for a DataCenter software service, you may have to look at adding an allowance in your hardware firewall, or any firewall other than the Windows Firewall on the Command Server, for the TCP port that you just changed from the default 8005 to whatever the new value is, for the new port that you just changed the Command Server service to utilize on the Command Server machine. As part of the Command Server installation process a Windows Firewall rule was created to allow the NovaStor DC Command Server component (the TomEE Apache Tomcat web server process, 'TomEE.amd64.exe'), to utilize any TCP port that process name is assigned to, and in that case you should not have to make any change to the Windows Firewall on the Command Server if you want to change the port utilized by that service in these instructions. However, if you have an external firewall that is not just the Windows Firewall software, that is locked down to only allow communication to certain ports from client nodes to communicate to the Command Server node, then in that case you will need to modify the firewall port configuration on the hardware level for instance to allow the new port to work. The Windows Firewall rule that is created automatically for you when the Command Server software is installed in Windows, via command line, is: 'netsh advfirewall firewall set rule name="NovaStor DC Command Server" new dir=in action=allow program="C:\Program Files\NovaStor\DataCenter\tomee\bin\TomEE.amd64.exe" profile=any protocol=tcp