Handling Port Conflicts

If the configured port for the service (server.port) or for management endpoints (management.server.port) is already in use, the service may fail to start. Follow the steps below to resolve the issue for either port.

Step 1: Check If a Port Is Occupied

Use the following commands to check if the specific port (e.g., 9443 or 8081) is currently in use:

On Windows (Command Prompt):

netstat -aon | findstr :<port>

On Linux/macOS:

lsof -i :<port>

Replace <port> with the port number you’re troubleshooting (e.g., 9443 or 8081).

If the port is in use, these commands will show the process ID occupying it. You can then:

  • Kill the process (if safe), or

  • Change your application’s configuration to use a different free port.

Step 2: Choose a New Available Port

Common alternative ports for HTTPS include 9444, 8443, 10443, etc. Pick a port that is not currently in use.

To check if a port (e.g., 9444) is available, run:

nc -zv localhost 9444

If the port is available, it will return "Connection refused" or "succeeded" depending on the tool used — either way, it indicates the port is free.

Step 3: Update Application Configuration

Update your application configuration to use the new port.

In application.properties

To update the main server port:

server.port=9444

To update the management endpoint port:

management.server.port=8090

Step 4: Restart the Resolution Service

After updating the port configuration, restart the Resolution Service. The application should now start successfully using the new port(s).