Unable to start Dev Console Server - java.net.BindException: Address already in use for the Broker
search cancel

Unable to start Dev Console Server - java.net.BindException: Address already in use for the Broker

book

Article ID: 7339

calendar_today

Updated On:

Products

CA Continuous Application Insight (PathFinder) Service Virtualization

Issue/Introduction

When starting the Broker the following error is in the pfbroker.log.

Unable to start Dev Console Server
- java.net.BindException: Address already in use

Environment

All supported DevTest releases and platforms.

Cause

Another process is using Dev Console Server port.


Depending on your exact configuration there could be many different causes for this issue.

Resolution

The first step is to determine which process is using the port (assumes default port number of 2099):

Shutdown the Broker or BrokerService. Then...

Windows:

Open a command prompt and run the following two commands:

netstat -ano | findstr 2099
tasklist /v /fo csv | findstr /i "<pid>"


where <pid> is the process id found with the first command.

Unix:
netstat -tulpn | grep 2099

Each of the above commands should give you the process that is holding port 2099.

There are three possible conditions for a process to be holding this port.

  1. The port is held by a program other than the DevTest Broker.
    The port for one of the programs needs to be changed.
    See below for changing the Dev Console Server port.
  2. The port is held by the Broker and there is only one instance of DevTest on the machine.
    The Broker process has become orphaned. To kill this process...
    Windows: Use Task Manager or in the command prompt:
         taskkill /pid <pid>

    Unix:
         kill -9 <pid>

    Once the orphaned process is stopped, restart the Broker.
  3. The port is held by the Broker and there are multiple instance of DevTest on this machine, usually using Virtual Machines.
    The Dev Console Server cannot bind to a specific IP address like other DevTest processes.
    You must change the port used by the Dev Console Server.

Changing the Dev Console Server Port:

In the rules.xml file on the Registry machine and this line to the <broker> section. Change the port to any unused port:
<property comment="The Dev Console HTTP server port number" key="lisa.broker.devconsole.server.port" value="2099"/>

Restart the Broker.