In the robot.cfg file (Nimsoft installation folder\robot), you can use the following syntax to change the controller AND the spooler port as well as the first_probe_port:
First, stop the robot.
niminit stop
check for any leftover Nimsoft processes
ps -ef | grep nim
stop/kill any leftover Nimsoft processes if necessary to ensure the robot is down.
Make the changes to the robot.cfg controller section. For example,
controller_port = 48005
spooler_port = 48001
first_probe_port = 48004
Start the robot
niminit start
Check again for the presence of the controller, hdb and spooler processes with the ps command.
Once the changes are made you should see the ports listed in the Infrastructure Manager/Admin Console:
If the controller_port = 48005, setting is working you should see some entries like this in the controller.log:
nimSessionServer - port = 48005
Jun 19 19:10:47:175 [4652] Controller: SSL - skipping SSL server setup - ssl_mode is 0 (off) Jun 19 19:10:47:175 [4652] Controller: sockCheckLocalPort: port=48005, non-strict binding, checking all
Jun 19 19:10:47:175 [4652] Controller: sockCheckLocalPort: port=48005 sock=488, trying addr=-- Jun 19 19:10:47:175 [4652] Controller: sockCheckLocalPort - closesocket 488 Jun 19 19:10:47:175 [4652] Controller: sockServer:0000000000E1AA60:0.0.0.0/48005
Jun 19 19:10:47:175 [4652] Controller: MyPutEnv NIM_CONTROLLER_PORT=48005
Jun 19 19:10:47:175 [4652] Controller: NIM_CONTROLLER_PORT=48005
Jun 19 19:10:47:175 [4652] Controller: thrwq - WQ[0000000000E16D50] - paused
Jun 19 19:10:47:175 [4652] Controller: thrwq - WQ[0000000000E16D50] - set workers: avail=1 max=25 (was avail=0 max=0)
Jun 19 19:10:47:175 [4652] Controller: thrwq - WQ[0000000000E16D50] - resumed
Jun 19 19:10:47:175 [4652] Controller: thrwq - tohub - set max queue length to 100
Jun 19 19:10:47:175 [4652] Controller: Controller on <hostname> port 48005 started
and also
Jun 19 19:10:47:253 [4652] Controller: portRegister - name=controller, port=48005, ip=<none>, pid=5008 Jun 19 19:10:47:253 [4652] Controller: FindNamePid controller - 5008 Jun 19 19:10:47:253 [4652] Controller: reserve_port (controller) - assigned to 48005
For the spooler_port = 48001, if its working, you should see some entries like this;
Jun 19 19:10:48:704 [4652] Controller: RREQUEST: port_register <-10.xxx.xx.xxx/53357 h=116 d=32
Jun 19 19:10:48:704 [4652] Controller: head mtype=100 cmd=port_register seq=0 ts=1529449848 frm=10.xxx.xx.xxx/53357 tout=20 addr=
Jun 19 19:10:48:704 [4652] Controller: data name=spooler port=48001 Jun 19 19:10:48:704 [4652] Controller: port_register (spooler) from ##.###.##.###/53357
Jun 19 19:10:48:704 [4652] Controller: portRegister - name=spooler, port=48001, ip=##.###.##.###, pid=0 Jun 19 19:10:48:704 [4652] Controller: FindNamePid spooler - 0
Jun 19 19:10:48:704 [4652] Controller: reserve_port (spooler) - updated
If the first_probe_port is working as expected, it will start at the defined port and +1 trying to find a port for a given probe that is free, e.g., from the log you will see something like this:
Controller: reserve_port (<probe_name>) starting at 48004
Another log entry that tells you the port change is working is this:
Controller: sockClose:000000000226E080:<robot_ipaddress>/48005
showing you that the controller is using the configured port and NOT 48000.
There should be no sockClose entries showing port 48000 for the robot ip.
Note that the robot.cfg parameters must be defined as listed above but other ports may be used. This is just a working example.