English

Error: FLEXlm: Cannot connect to license server-UNIX systems

Error Message

When running ARC from the command line, the following error is returned:

"FLEXlm Error: Cannot connect to license server".

Cause

ArcInfo cannot start until it is able to connect to the license server and check out a license.

Solution or Workaround

Use the steps below to determine if the license manager is running. These steps are for use on a UNIX server and most should be executed in the $ARCHOME/sysgen directory.

Note:
Be sure to log in as either root, the application owner, or as a member of the group that owns the lmutil executable before performing these steps.

  1. Verify that the License Manager is running:

    Code:
    % lmutil lmstat -a -c license.dat


    If it is up then shut it down with the command below.

    Code:
    % lmutil lmdown -c license.dat


    Verify there are no left-over lmgrd and ESRI daemon processes still running.

    Code:
    % ps -ef | grep lmgrd
    % ps -ef | grep ESRI


    There should be no lmgrd and ESRI processes; the grep process may be returned. If there is an lmgrd or ESRI process, kill it.

    Code:
    % kill -9 <pid#>


    Change directory to /var/tmp.

    Code:
    % cd /var/tmp


    Look for a lockESRI file in the directory.

    Code:
    % ls -l lockESRI
    sample output
    -rw-r--r-- 1 lmuser other 0 Nov 14 2006 lockESRI


    If a lockESRI file exists, remove it.

    Code:
    % rm lockESRI


    Go back to $ARCHOME/sysgen and start the license manager.

    Code:
    % cd $ARCHOME/sysgen
    % lmgrd -c license.dat &

  2. Verify the lmutil is running on the server it was licensed for.

    Display the server's hostid and hostname. The hostid is a unique code used to identify UNIX servers and is not affected by server name changes.

    To display the hostid, type:

    Code:
    % hostid
    sample output
    840df765
    %


    or

    Code:
    % $ARCHOME/sysgen/lmutil lmhostid
    sample output
    lmutil - Copyright (C) 1989-1999 Globetrotter Software, Inc.
    The FLEXlm host ID of this machine is "840df765"
    %


    To display the hostname, type:

    Code:
    % hostname
    sample output
    samplesvr
    %


    Verify the hostname and hostid in the license.dat file match those of the server it is running on.

    Display the first line of the license.dat file.

    Code:
    % head -1 license.dat
    SERVER samplesvr 840df765 27004
    %


    The SERVER line above means the license file was generated for a server named samplesvr with hostid 840df765 and listens for requests on port 27004.

    If all match, continue.

    If the hostid is different, call Customer Service and request a new license file be generated for the hostid.

    If the hostname is different but the hostid is the same, add the old hostname to the /etc/hosts file and recycle lmutil as displayed in step 1 above.
  3. Verify the following optional license file environment variables are set correctly.

    Use each command below to display the environment variable if either exists.
    Code:
    % echo LM_LICENSE_FILE
    sample output
    LM_LICENSE_FILE=27004@<hostname>


    or

    Code:
    % echo ESRI_LICENSE_FILE
    sample output
    ESRI_LICENSE_FILE=27004@<hostname>


    If set, the first value, 2005, is the port the license manager is listening on and <hostname> is the name of the server where the license manager is running.
  4. Check the permissions on the license.dat file.
    Code:
    % ls -l license.dat
    sample output
    -rwxr-xr-x 1 lmuser other 0 Nov 14 2006 lockESRI


    The correct permissions are:

    -rwxr-xr-x

    If the permissions are not correct, change them with the chmod command:

    Code:
    % chmod 755 license.dat


    Note:
    It is necessary to be logged in as either root, the file owner, or as a member of the group that owns the license file to change the file's permissions.

  5. If the license manager server is running on a server other than the system being used, start ArcInfo on that server.

    If ArcInfo starts on the server, check the date and time on both servers. The maximum time difference between the two systems cannot be greater than four hours.

    If all is correct, the problem is likely the network itself.

    Use the '/usr/sbin/ping <hostname>' command to see if the server is online. If 'hostname is alive' is not returned, there is a problem with the network and it is necessary to contact the network administrator.

    Code:
    % /usr/sbin/ping samplesvr
    sample output
    samplesvr is alive
    %