I am unable to bind my server on port XXXX (which was previously used for the embedded web server) on Windows

  • 26 May 2023
  • 1 reply
  • 92 views

Userlevel 6
Badge

One issue that comes up infrequently but can be inscrutable to troubleshoot is a situation where you are unable to start the web server hosting CData Arc on a port that you have previously used for the embedded web server provided with the application. For the purposes of this thread, we will refer to port 8001 here, since this is the default port assigned to the embedded web server distributed with CData Arc.

 

Most commonly, issues with binding to a specific port are due to an existing process that is already listening on that port, but you may find that even after you run a check for ports in the listening state

netstat -a

 

You do not see anything listening on that port. One possibility is that the URL for the port you are selecting has already been reserved on the system and cannot be assigned to another server. To check for this, run: 

 

netsh http show urlacl

 

This will list all of the reserved entries on the machine. If the URL that you are trying to bind shows up like this:
 

Reserved URL            : XXXXXXXXX
        User: Everyone
            Listen: Yes
            Delegate: No

 

You can use another netsh command to remove the reservation:

 

netsh http delete urlacl XXXXXXXXX

 

Note that the URL freed here should match the reserved URL from the listing. 


1 reply

Userlevel 4
Badge

Great tip! Of note, this solution also works for other applications that use an embedded web server, such as API Server and Connect Server. These will show a “503 Service Unavailable” error when the port has a binding, and removing the binding as shown above will also resolve this issue.

Reply