IBM Support

Address already in use

Troubleshooting


Problem

This technote explains why attempts to perform IBM® Rational® ClearCase® operations using local ClearCase server processes results in a failure producing errors such as, albd_server.exe: Error: bind: WINSOCK address already in use, on Microsoft® Windows® or Error: bind: Address already in use, on UNIX® and Linux®.

Symptom


  • On Windows the Atria Location Broker Daemon (ALBD) service is terminating immediately following startup and the following errors are reported in the Windows® Application log:

    ---
    Albd(9640): Error: Unable to setup "udp" RPC service.
    Albd(9640): Error: bind: [WINSOCK] Address already in use

    ---

    as well as

    ---
    albd_server.exe: Error: bind: WINSOCK address already in use.
    ---
  • On Unix or Linux you may see the following errors in the albd log:

  • albd_server Error: bind: Address already in use
    albd_server Error: Unable to setup "udp" RPC service

  • Error reported:

    Port: 371 is being used by PID:nnn /opt/rational/clearcase/etc/albd_server

Cause

  • There may be another application that is using port 371 (TCP/371 and UDP/371) which is reserved for ClearCase, thus, causing a conflict.

  • For the error:

    Port: 371 is being used by PID:nnn /opt/rational/clearcase/etc/albd_server

    If you are seeing this error, it may be due to delays in the ALBD service starting, the startup script will try and restart ClearCase again. This process can continue until the processor is running at 100% or until the ALBD service is started. As only one process can lock a port, the first instance of the ALBD process will own the lock and any subsequent instances will be unable to lock the port and, therefore, will report the error.

Diagnosing The Problem

Windows

To determine the process holding the port open on Windows:

  1. Shut down ClearCase
  2. Download tcpview from http://technet.microsoft.com/en-us/sysinternals/bb897437.aspx
  3. Run the tool
  4. Click File/Save as.
  5. Save the text out and open it in an editor.
  6. Search for "371." This should show you the process with the ports open.

Unix and Linux

At this time, there is no "standard" method to determine the process using a port. Thus, the process is Operating system (and possibly version/distribution) specific.

To determine the process using the albd port on Linux or AIX.

  1. Log in as root on the problem server
  2. Shut down ClearCase
  3. Open a new shell and run

    netstat -an | more
  4. When you get output, type

    /371

    to find the port. Press "n" to move to the next occurrence of this string in case you are not seeing the port.

    Note: Each Unix variant and version can have slightly different output for netstat, so care is advised in reading the output.

To determine the process using the port using Solaris:

  1. go to the following URL and collect the script linked to "How can you determine which process is using that port? Otherwise, you must use LSOF."

    http://sysunconfig.net/unixtips/solaris.html#ports
  2. Copy the script somewhere the root user can access and ensure that it is executable.
  3. Run the script as follows

    ./port2pid 371
  4. Observe output similar to:
    -------------------------------------------------------------------------
    Port: 371 is being used by PID: 541 /opt/rational/clearcase/etc/albd_server

Any application listening on port 371 will cause problems for ClearCase. From this output it should be simple to identify and shut down the process in question.

Resolving The Problem

Determine which application is conflicting with ClearCase and shut it down.



Windows


You should be able to use the Windows task manager to kill that process, or you could use the "tcpview" tool to kill the process as well.

Note: One Windows application that has been found listening on the albd port is BackWeb (http://www.backweb.com).




Unix and Linux

One possible cause of this issue is that the albd port may not be registered in the /etc/services or NIS services map may have another application using port 371. To verify this, run one of the following commands:

  • ypcat services | grep 371 (if the services are managed via NIS)
  • cat /etc/services | grep 371 (if not)

Correct output should look similar to the following:

albd      371/udp    #   Atria   albd_server
albd      371/tcp    #   Atria   albd_server

Lack of output, or multiple assignments of this port, could cause this issue.



For the following error the resolution is to kill the process related to port 371 and restart ClearCase:

Port: 371 is being used by PID:nnn /opt/rational/clearcase/etc/albd_server


[{"Product":{"code":"SSSH27","label":"Rational ClearCase"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"ALBD","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"2002.05.00;2003.06.00;7.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
29 September 2018

UID

swg21123787