Tuesday, 27 March 2018

Rational Key License Server - Some tinkering

In order to license my UrbanCode Deploy (UCD) box, I needed to: -

(a) generate a license key for UCD, using the Rational License Key Centre: -


(b) build/configure a Rational License Key Server (RLKS)

Without this, UCD rightly complains about being unlicensed: -


I built RLKS on a spare RHEL 7 box, as follows: -

Download

CIPQ0ML Rational License Key Server 8.1.4 for Linux x86 Multilingual

Validate

ls -al /tmp/RLKS_8.1.4_FOR_LINUX_X86_ML.zip 

-rw-r--r--. 1 root root 271406147 Mar 27 14:06 /tmp/RLKS_8.1.4_FOR_LINUX_X86_ML.zip

Extract

unzip /tmp/RLKS_8.1.4_FOR_LINUX_X86_ML.zip -d /tmp

Install IIM

/tmp/RLKSSERVER_SETUP_LINUX_X86/disk1/InstallerImage_linux_gtk_x86_64/installc -acceptLicense

Installed com.ibm.cic.agent_1.6.2000.20130301_2248 to the /opt/IBM/InstallationManager/eclipse directory.

See what's available to install

/opt/IBM/InstallationManager/eclipse/tools/imcl listAvailablePackages -repositories /tmp/RLKSSERVER_SETUP_LINUX_X86/disk1/

com.ibm.rational.license.key.server.linux.x86_8.1.4000.20130823_0513

Install RLKS

/opt/IBM/InstallationManager/eclipse/tools/imcl install com.ibm.rational.license.key.server.linux.x86_8.1.4000.20130823_0513 -repositories /tmp/RLKSSERVER_SETUP_LINUX_X86/disk1/ -acceptLicense

Installed com.ibm.rational.license.key.server.linux.x86_8.1.4000.20130823_0513 to the /opt/IBM/RationalRLKS directory.

Attempt to Start

/opt/IBM/RationalRLKS/config/start_lmgrd 

Starting IBM Rational License Key Server.

Check Logs

cat /opt/IBM/RationalRLKS/logs/lmgrd.log 

/opt/IBM/RationalRLKS/config/start_lmgrd: /opt/IBM/RationalRLKS/bin/lmgrd: /lib/ld-lsb.so.3: bad ELF interpreter: No such file or directory

Check Missing Dependency

yum provides /lib/ld-lsb.so.3

Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
...
redhat-lsb-core-4.1-27.el7.i686 : LSB Core module support
Repo        : server
Matched from:
Filename    : /lib/ld-lsb.so.3


Install Missing Dependency

yum  install -y redhat-lsb-core-4.1-27.el7.i686

Installed:
  redhat-lsb-core.i686 0:4.1-27.el7                                                                                                                                                                                                                                           

Dependency Installed:
  cups-client.x86_64 1:1.6.3-29.el7     cups-libs.x86_64 1:1.6.3-29.el7     m4.x86_64 0:1.4.16-10.el7      ncurses-libs.i686 0:5.9-14.20130511.el7_4     nspr.i686 0:4.13.1-1.0.el7_3     nss.i686 0:3.28.4-15.el7_4                       nss-pem.i686 0:1.0.3-4.el7    
  nss-softokn.i686 0:3.28.3-8.el7_4     nss-util.i686 0:3.28.4-3.el7        patch.x86_64 0:2.7.1-8.el7     psmisc.x86_64 0:22.20-15.el7                  readline.i686 0:6.2-10.el7       redhat-lsb-submod-security.i686 0:4.1-27.el7     spax.x86_64 0:1.5.2-13.el7    
  sqlite.i686 0:3.7.17-8.el7           

Complete!

Removed temporary configuration


Attempt to Start

/opt/IBM/RationalRLKS/config/start_lmgrd 

Starting IBM Rational License Key Server.

Check Logs

cat /opt/IBM/RationalRLKS/logs/lmgrd.log 

14:49:58 (lmgrd) -----------------------------------------------
14:49:58 (lmgrd)   Please Note:
14:49:58 (lmgrd) 
14:49:58 (lmgrd)   This log is intended for debug purposes only.
14:49:58 (lmgrd)   In order to capture accurate license
14:49:58 (lmgrd)   usage data into an organized repository,
14:49:58 (lmgrd)   please enable report logging. Use Flexera Software, Inc.'s
14:49:58 (lmgrd)   software license administration  solution,
14:49:58 (lmgrd)   FLEXnet Manager, to  readily gain visibility
14:49:58 (lmgrd)   into license usage data and to create
14:49:58 (lmgrd)   insightful reports on critical information like
14:49:58 (lmgrd)   license availability and usage. FLEXnet Manager
14:49:58 (lmgrd)   can be fully automated to run these reports on
14:49:58 (lmgrd)   schedule and can be used to track license
14:49:58 (lmgrd)   servers and usage across a heterogeneous
14:49:58 (lmgrd)   network of servers including Windows NT, Linux
14:49:58 (lmgrd)   and UNIX. Contact Flexera Software, Inc. at
14:49:58 (lmgrd)   www.flexerasoftware.com for more details on how to
14:49:58 (lmgrd)   obtain an evaluation copy of FLEXnet Manager
14:49:58 (lmgrd)   for your enterprise.
14:49:58 (lmgrd) 
14:49:58 (lmgrd) -----------------------------------------------
14:49:58 (lmgrd) 
14:49:58 (lmgrd) 
14:49:58 (lmgrd) The license server manager (lmgrd) running as root:
14:49:58 (lmgrd)  This is a potential security problem
14:49:58 (lmgrd)  and is not recommended.
14:49:58 (lmgrd) license manager: can't initialize:No SERVER lines in license file.
14:49:58 (lmgrd) License Path: "/opt/IBM/RationalRLKS/config/server_license.lic"
14:49:58 (lmgrd) FLEXnet Licensing error:-13,66
14:49:58 (lmgrd) For further information, refer to the FLEXnet Licensing documentation,available at "www.flexerasoftware.com".

Update License

vi /opt/IBM/RationalRLKS/config/server_license.lic

SERVER rlks.uk.ibm.com INTERNET=192.168.153.132 27000
VENDOR ibmratl
VENDOR telelogic
VENDOR rational
INCREMENT IBMUCD_PVU ibmratl 6.01 30-jan-2019 1 ISSUED=27-Mar-2018 \
NOTICE="Sales Order Number:ARGLE BARGLE GLOOP" \
SIGN="1056 0BA6 C70C A6E3 19BA 3876 575B EC21 D41E 0895 1F53 \
CAF4 8D72 4B75 24E7"

( note that this is NOT my license ! )

Attempt to Start

/opt/IBM/RationalRLKS/config/start_lmgrd 

Starting IBM Rational License Key Server.

Check Logs

cat /opt/IBM/RationalRLKS/logs/lmgrd.log 

14:57:52 (lmgrd) -----------------------------------------------
14:57:52 (lmgrd)   Please Note:
14:57:52 (lmgrd) 
14:57:52 (lmgrd)   This log is intended for debug purposes only.
14:57:52 (lmgrd)   In order to capture accurate license
14:57:52 (lmgrd)   usage data into an organized repository,
14:57:52 (lmgrd)   please enable report logging. Use Flexera Software, Inc.'s
14:57:52 (lmgrd)   software license administration  solution,
14:57:52 (lmgrd)   FLEXnet Manager, to  readily gain visibility
14:57:52 (lmgrd)   into license usage data and to create
14:57:52 (lmgrd)   insightful reports on critical information like
14:57:52 (lmgrd)   license availability and usage. FLEXnet Manager
14:57:52 (lmgrd)   can be fully automated to run these reports on
14:57:52 (lmgrd)   schedule and can be used to track license
14:57:52 (lmgrd)   servers and usage across a heterogeneous
14:57:52 (lmgrd)   network of servers including Windows NT, Linux
14:57:52 (lmgrd)   and UNIX. Contact Flexera Software, Inc. at
14:57:52 (lmgrd)   www.flexerasoftware.com for more details on how to
14:57:52 (lmgrd)   obtain an evaluation copy of FLEXnet Manager
14:57:52 (lmgrd)   for your enterprise.
14:57:52 (lmgrd) 
14:57:52 (lmgrd) -----------------------------------------------
14:57:52 (lmgrd) 
14:57:52 (lmgrd) 
14:57:52 (lmgrd) The license server manager (lmgrd) running as root:
14:57:52 (lmgrd)  This is a potential security problem
14:57:52 (lmgrd)  and is not recommended.
14:57:52 (lmgrd) FLEXnet Licensing (v11.10.0.3 build 96543 i86_lsb) started on rlks.uk.ibm.com (linux) (3/27/2018)
14:57:52 (lmgrd) Copyright (c) 1988-2011 Flexera Software, Inc. All Rights Reserved.
14:57:52 (lmgrd) US Patents 5,390,297 and 5,671,412.
14:57:52 (lmgrd) World Wide Web:  http://www.flexerasoftware.com
14:57:52 (lmgrd) License file(s): /opt/IBM/RationalRLKS/config/server_license.lic /opt/IBM/RationalRLKS/config/rational_server_temp.dat /opt/IBM/RationalRLKS/config/rational_server_perm.dat
14:57:52 (lmgrd) lmgrd tcp-port 27000
14:57:52 (lmgrd) Starting vendor daemons ... 
14:57:52 (lmgrd) Started ibmratl (internet tcp_port 41793 pid 29310)
14:57:52 (lmgrd) Started telelogic (internet tcp_port 43290 pid 29311)
14:57:52 (lmgrd) Started rational (internet tcp_port 40974 pid 29312)
14:57:52 (lmgrd) license daemon: execute process failed: (/opt/IBM/RationalRLKS/bin/telelogic) -T rlks.uk.ibm.com 11.10 3 -c /opt/IBM/RationalRLKS/config/server_license.lic:/opt/IBM/RationalRLKS/config/rational_server_temp.dat:/opt/IBM/RationalRLKS/config/rational_server_perm.dat
14:57:52 (lmgrd) license daemon: system error code: No such file or directory
14:57:52 (lmgrd) telelogic exited with status 45 (Child cannot exec requested server)
14:57:52 (lmgrd) Please correct problem and restart daemons
14:57:52 (lmgrd) license daemon: execute process failed: (/opt/IBM/RationalRLKS/bin/rational) -T rlks.uk.ibm.com 11.10 3 -c /opt/IBM/RationalRLKS/config/server_license.lic:/opt/IBM/RationalRLKS/config/rational_server_temp.dat:/opt/IBM/RationalRLKS/config/rational_server_perm.dat
14:57:52 (lmgrd) license daemon: system error code: No such file or directory
14:57:52 (lmgrd) rational exited with status 45 (Child cannot exec requested server)
14:57:52 (lmgrd) Please correct problem and restart daemons
14:57:52 (ibmratl) FLEXnet Licensing version v11.10.0.3 build 96543 i86_lsb
14:57:52 (ibmratl) Server started on rlks.uk.ibm.com for: IBMUCD_PVU
14:57:52 (ibmratl) EXTERNAL FILTERS are OFF
14:57:52 (lmgrd) ibmratl using TCP-port 41793
14:57:52 (ibmratl) Serving features for the following vendor names:
 ibmratl  rational  tlog_state  telelogic  tlog_rhaps  

Validate Listener

netstat -aon|grep 27000

tcp        0      0 192.168.153.132:56492   192.168.153.132:27000   TIME_WAIT   timewait (17.99/0/0)
tcp6       0      0 :::27000                :::*                    LISTEN      off (0.00/0/0)
tcp6       0      0 ::1:27000               ::1:43888               ESTABLISHED keepalive (7166.21/0/0)
tcp6       0      0 ::1:43888               ::1:27000               ESTABLISHED off (0.00/0/0)


Test connectivity from UCD to RLKS

telnet 192.168.153.132 27000

Trying 192.168.153.132...
telnet: connect to address 192.168.153.132: No route to host

Disable firewall on RLKS box

service firewalld stop

Redirecting to /bin/systemctl stop firewalld.service

Test connectivity from UCD to RLKS

telnet 192.168.153.132 27000

Trying 192.168.153.132...
Connected to 192.168.153.132.
Escape character is '^]'.

Connection closed by foreign host.


Add RLKS information to UCD




And that's the deal :-)


No comments:

Note to self - use kubectl to query images in a pod or deployment

In both cases, we use JSON ... For a deployment, we can do this: - kubectl get deployment foobar --namespace snafu --output jsonpath="{...