IBM Support

Starting license server reports error: failed to open the tcp port number in the license file

Troubleshooting


Problem

This technote explains how to resolve an error, failed to open the tcp port number in the license file, that can occur when using IBM Rational Licensing.

Symptom

When starting the Rational License Server on Unix, the server does not stay running, and the following error appears in the license server log or in the local shell if starting the license server interactively:

{current time} (lmgrd) Failed to open the tcp port number in the license.

Cause


The most common causes of this issue are:
  1. Port selected in the license file is in use by another process.
  2. Network configuration issues, primarily revolving around hostname configuration.
  3. SELinux settings may be blocking the ability to open ports.
  4. Rational License Server restarted too soon after shutdown.

Environment

Linux
Unix
Rational License Key Server
IBM License Key Server

Resolving The Problem

For Cause 1 (Port Conflicts)
The first thing to do is look at the license file. A standard Rational License Server license file begins with the following line (potentially after a header of comment lines beginning with "#"):

SERVER myserver.ibm.com 0adddeaddead 27000

The first thing to check is that the port number (the last item in the line) is not in use by another process. The command to verify this is the "netstat" command. To verify the port is not in use, run:

netstat -anp | grep 27000


ANY output indicates that there may be a port conflict.

For Cause 2 (Host name configuration)
If there is no port conflict, verify that the current host name is listed in /etc/hosts. This is particularly important if the license server host name or domain name has recently changed. For example if /etc/hosts reads:

127.0.0.1     localhost myserver.oldcompany.com myserver
::1    localhost.localdomain localhost myserver

and the actual fully-qualified host name is "myserver.ibm.com," you may get this error. The error may occur as the lmgrd process performs a DNS lookup to verify that it is running on the correct host. Additionally, if the file is missing either the "127.0.0.1" or the "::1" lines, this same error may occur as the lmgrd may actually try to perform a DNS name lookup on "localhost".

For Cause 3 (SELinux configuration)
The simplest thing to do here it to verify that the SELinux configuration is either set to "Disabled" or "Permissive" by running:

cat /etc/sysconfig/selinux

There should be a line reading either "SELINUX=disabled" or "SELINUX=permissive".
If this file does not exist (possible depending on your distribution, try running "sestatus -v" when logged in as root. You should see a line reading "SELinux status: disabled" or "SELinux status: permissive".

For Cause 4 (Rational License Server restarted too soon after shutdown)
Wait at least 60 seconds from the time the Rational License Server is shutdown until restarting it to allow the underlying operating system (Unix or Linux) to recognize that the license server port is available once more. This is particularly true if the server was shut down using kill -9 `pgrep lmgrd` as opposed to using the lmdown command.

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSTMW6","label":"Rational License Key Server"},"ARM Category":[{"code":"a8m0z0000001i5rAAA","label":"Rational licensing->License Key Server->Configuration"}],"ARM Case Number":"","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"}],"Version":"8.1.1;8.1.2;8.1.3;8.1.4;8.1.5","Line of Business":{"code":"LOB45","label":"Automation"}}]

Product Synonym

Rational license key server; ibm license key server; RLKS; LKS

Document Information

Modified date:
21 July 2020

UID

swg21443455