REST/JCP wont start U00045102 Error: All defined ports in the configuration file are already in use
search cancel

REST/JCP wont start U00045102 Error: All defined ports in the configuration file are already in use

book

Article ID: 251763

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine CA Automic One Automation

Issue/Introduction

We tried to start additional JCP/REST process. It did not start and we saw the following error messages in the process log:

20221007/152751.414 - 32     U00003487 ListenSocket with port number '2221' could not be created.
20221007/152751.415 - 32               Address already in use
20221007/152751.416 - 32     U00003487 ListenSocket with port number '2222' could not be created.
20221007/152751.417 - 32               Address already in use
20221007/152751.417 - 32     U00045058 Failed to get a free port for this 'JCP'. Check the [PORTS] section of the configuration file.
20221007/152751.420 - 32     U00045102 Error: All defined ports in the configuration file are already in use.
20221007/152756.438 - 36     U00003432 Termination of Server 'DEV21#CP' initiated.

Using the default JCP.PORTS=2317 throws error:

20221007/152751.416 - 32     U00003487 ListenSocket with port number '2317' could not be created.
20221007/152751.417 - 32               Address already in use

Environment

Release : 21.0x

Component: Automation Engine

Sub-Component: REST-API/JCP server process

Cause

The UCSrv.ini had JCP.PORTS=2221-2222 defined and hence there were only 2 ports available for use and since it was already occupied by 2 JCP process - The REST and additional JCP processes did not  start.

Resolution

If you use JCP and REST processes, make sure you define the corresponding number of ports in the JCP.PORTS parameter. Otherwise, not all processes can establish the connection.

By default, the setting is JCP.PORTS=2317 - this means by default if this is not commented out, only one of either the JCP or REST process can start, both are required though for a running system.

If you are starting more process - Ensure the JCP.PORTS parameter has a larger pool of port range for the processes to bind to for instance - Setting the parameter as JCP.PORTS=2221-2225 – Will give you 5 ports and thereby allowing you start 5 server processes [Combination of REST and JCP].

If you intend to have more REST and JCP processes then the parameter needs to be altered accordingly.

Note:

If there are no ports defined in the JCP.PORTS parameter in the [PORTS] section of the AE INI file, the JCP and REST processes bind randomly to another port, which is necessary for the internal communication between WP and JCP/CP or REST process. When the JCP/REST start, they open a random port and send it internally via the database to the WPs so that WPs can reach the JCPs/CPs and/or REST process.

Additional Information

Please refer to : https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/21.0/Automic%20Automation%20Guides/Content/_Common/Security/Security_Hardening_AEFirewallPorts.htm 

Important! If you use JCP and REST processes, make sure you define the corresponding number of ports in the JCP.PORTS parameter. Otherwise, not all processes can establish the connection.