Overview
This article describes how to connect an instance of STAR-CCM+ on your local machine to a remote license server. This is a common occurrence if you use your local workstation for pre and post processing, while solving on a remote cluster or HPC located in an office.
Background
Simcenter STAR-CCM+ is a licensed software product that requires you to install and configure the license during the installation process. You cannot use the STAR-CCM+ application until the license, license server, and associated settings have been configured correctly.
The license operates through a license server, which is a separate process that runs continuously on a machine of your choice that you have access to. This may be the same machine that you use for performing pre/post process or running CFD simulations. Likewise, it could be a companywide server dedicated to hosting licenses and associated license servers. If you desire to share licenses among multiple users, then you are recommended to choose a single machine to host the license and license server.
On Windows, the LMTOOLS utility provides a convenient method that creates and runs the license server.
On Linux, the product installer does not set up the license server for you. You must download the FLEXlm licensing tools and set up the license server manually.
License Request Process
The following steps describe how STAR-CCM+ requests a license from the license server, as shown in the below figure.
- The application looks at the server settings to determine where the license server is located.
- The application connects to the license server manager (lmgrd) to find the port where the vendor daemon is located.
- The lmgrd daemon determines which port corresponds to the vendor daemon and sends the information back to the client.
- The client proceeds by establishing a connection with the vendor daemon and sends a request for a license.
- The vendor daemon checks its memory to determine if any licenses are available and sends either a grant or denial of the license request back to the client.
- The vendor daemon records the grant or denial of the license request in the debug log file. This file, which has a .log extension, is in your installation directory.
- The license module in the client application grants or denies the use of the feature as appropriate.
STAR-CCM+ communicates directly with the vendor daemon (cdlmd or saltd) rather than using the license server manager (lmgrd) entirely as a middleman. Lmgrd still acts as middleman in the sense that it is contacted first by STAR-CCM+ to determine the port via which it should try connecting to cdlmd/saltd, but the license check out request is then made directly from STAR-CCM+ to cdlmd/saltd rather than from STAR-CCM+ to lmgrd to cdlmd/saltd.
Check Your License File
Your license file must be valid for the license server to run.
The SERVER line contains the details of the license server machine to which the license is tied. The license server port serves as a first point of contact for other machines to communicate with the license server machine to request a license. The default license server port is “1999” for cdlmd and "29000" for slatd vendor daemons, respectively.
The VENDOR line indicates the vendor daemon necessary to server the license. For STAR-CCM+, the vendor daemon’s name is “cdlmd” or “saltd”. When working with remote license servers, if there are firewalls between the license server and the machine running STAR-CCM+, you are required to set a static vendor daemon port to create a consistent firewall rule. By default, the vendor daemon port is assigned to arbitrarily by the system on license server startup to an open port. To set a port statically, add the argument PORT=2099, where “2099” can be any unassigned/open port on the system at the end of the Vendor line. Note, Power-on-Demand licensing uses port 2099 for the vendor daemon port. Saltd (Siemens License Server) default vendor port number is 29001. Check the highlighted entries, as stated below.
The increment lines describe individual license features served by the license.
################################################################################
#
#
#
#
#
Siemens PLM Software
Inc.
#
#
License File
#
#
#
# Sold-To/Install:
1234567
WebKey Access Code: ABC123DEF4 #
# Contact Name: User’s
Name
Created: 11/22/2017 #
# Customer Name: COMPANY
NAME
#
# E-mail Address: COMPANY E-MAIL
Version:
16.04 #
################################################################################
SERVER host_name 0a1b2c3d4e5f 1999
VENDOR cdlmd PORT=2099
INCREMENT ccmpsuite cdlmd
2018.11 05-mar-2015 1 E70698D4C2B1 SUPERSEDE ISSUED=26-oct-2016 \
vendor_info=4a078ce9cabd8e298657d329bdf38fe687db757695c0e3a7dce6057d4aadcd35912
ccmpsuite 05-mar-2015, Make sure your
license file has not expired.
host_name, make sure the hostname is the same
hostname as the machine running the license server.
0a1b2c3d4e5f, make sure the MAC address is the same as of
the machine running the license server. You cannot change the MAC address
entry. If this is the incorrect value, then you must request a new license file
with the correct MAC address. You may not edit this value.
PORT=2099, Set the static vendor daemon port to create a
consistent firewall rule.
Licensing and Network Settings
You must complete the following checks when you are trying to connect to a remote license server that hosts the license from a different machine.
Environmental Variable
STAR-CCM+ needs to know where to look for the license file.
Windows, set CDLMD_LICENSE_FILE environment variable on both machines to license_server_port@host_name, i.e. 29000@remote_host_name for saltd vendor daemon.
Linux, ceate a .flexlmrc file in the user’s home directory and write CDLMD_LICENSE_FILE=license_server_port@host_name. Note, there should be no spaces in this file.
Windows, Registry Editor
A list of previously used license server is stored in the registry. Click Windows Start, type and select Registry Editor. Navigate to HKEY_CURRENT_USER > SOFTWARE > FLEXlm License Manager. Examine CDLMD_LICENSE_FILE variable. Make sure it is defined correctly license_server_port@host_name.
Ports
Open
Check
if the license server and vendor daemon ports are open on both machines. The
best way to do this is by a software utility called Nmap, which can be
downloaded for free from https://nmap.org/. This
is an open source network mapper tool used for network exploration and security
auditing. Navigate to the Downloads tab along the main menu and select your OS
type. Install the software.
Windows OS
Open a new Windows Command Prompt window by typing “cmd” in the Windows search bar and pressing the Enter key.
Enter the following command:
"C:\Program Files (x86)\Nmap\nmap.exe" -P0 -p license_server_port,vendor_daemon_port host_name
The below figure shows an output example:
Linux OS
Open a new terminal window and enter the following:
nmap -P0 -p license_server_port,vendor_daemon_port host_name
The following text is an example of the output:
Nmap scan report for host_name
Host is up (0.092s latency).
PORT | | STATE SERVICE
1999/tcp open | tcp-id-port
2099/tcp open | h2250-annex-g
Nmap done: 1 IP address (1 host up) scanned in 8.23 seconds
Firewall
If the cluster tries to connect and reports this message:
Then the problem is likely related to the firewall configuration. Check with your IT representative to make sure the local computer can connect with the license server machine. The firewalls must allow the STAR-CCM+ associated executables to be allowed to run to launch. Make sure the following executables are allowed to pass through (Windows, Navigate to Control Panel, System and Security > Windows Defender > Allowed Apps):
- starccm+.exe
starccmw.exe
star-ccm+.exe
cdlmd or saltd depending on you vendor daemon
lmgrd
RCTECH (RedCedar's vendor daemon)
Mpi
License_server_port and vendor_daemon_port for STAR-CCM+
ports 1999 and 2099 when using PoD for STAR-CCM+
ports 29000 and 29001 when using default saltd vendor daemon (Siemens License Server).
ports 27027 and 2100 when using PoD for HEEDS
Troubleshooting - Vendor daemon can't talk to lmgrd (Linux)
Some users may experience the error,
Cannot connect to license server system. There are two possible solutions to this problem. Please reference the
Troubleshooting section of the installation and licensing manual for step-by-step instructions.
Solution 1
As this error is usually caused by a DNS or hosts file issue, you should first verify that your IP address is correctly mapped to your hostname in the /etc/hosts file on your machine. Also ensure that the host name in the /etc/hosts file is the exact hostname in the license.dat file.
Solution 2
Another approach is to comment out or delete all IPV6 information in the /etc/hosts file and restart the network services. In the following file, for example, the lines containing ipv6 could be commented out by inserting # at the start of each line.
Check Status of Remote License Server from a Local Machine
You can check the status of a remote license server using FLEXlm license utilities on your local computer (Windows and Linux). A license file is not required for installing FLEXlm, or for this check. Please disregard prompts for the license file when performing the below step-by-step instructions:
- Verify your local machine and remote license server machine can see each other on the network by using the following command in a terminal: ping hostname. Reach out to your IT department if they cannot connect.
- Download and install a local copy of FLEXlm license utilities. This is usually installed in the same directory as the Simcenter product during the express installation process.
- STAR-CCM+ on Windows default install location- C:\Program Files\CD-adapco\<STAR-CCM+ version>\FLEXlm\<FLEXlm version>\bin
- STAR-CCM+ on Linux default install location- /opt/CD-adapco/<STAR-CCM+ version>/FLEXlm/<FLEXlm version>/bin
- Open a new Windows Command Prompt window by typing “cmd” in the Windows search bar and pressing the Enter key, or a Linux terminal.
- Change the directory to the FLEXlm bin directory, as stated in step 1.
- Enter the following command to query the status of the remote license server from the FLEXlm bin directory:
- Windows: lmutil.exe lmstat -c server_port@host_name
- Linux: ./lmutil.exe lmstat -c server_port@host_name
- If the license server is up and running, the following output will appear as follows:
C:\Program Files\Siemens\License
Server>lmutil lmstat -c server_port@host_name
lmutil - Copyright (c) 1989-2022
Flexera. All Rights Reserved.
Flexible License Manager status on Tue
5/9/2023 15:35
[Detecting lmgrd processes...]
License server status: server_port@host_name
License file(s) on host_name: C:\ProgramData\Siemens\License
Server\ActiveLicenses\License_Cdlmd.lic:C:\ProgramData\Siemens\License
Server\ActiveLicenses\License_Rctech.lic:C:\ProgramData\Siemens\License
Server\ActiveLicenses\License_Ugslmd.lic:
Host_name: license server UP (MASTER)
v11.19.0
Vendor daemon status (on host_name):
saltd: UP v11.19.0
cdlmd: UP v11.19.0
|