RHEL 4 - Can't seem to start FLEXnet as non-root user

(This is a long post, lots of data - bear with me)

Hi - FLEXnet seems to be the finger of death for my servers. I most recently had my PGI license on a Sun v440 server that is now needing a hardware warranty call.

So - I recently requested new license keys for my RHEL 4 Linux server (x86). NOTE THAT THIS SERVER DOES NOT HAVE PGI INSTALLED. It is merely a license server.

I created a flexlm user on this server and gave it membership in the daemon group. Its home directory is /none and its login shell is /bin/false.

I copied over the lmgrd.rc file from the linux machine that is actually running the PGI software. I modified it to point to correct paths for lmutil, lmgrd, and license.dat.

No matter what I did, I could not get that script to start lmgrd. Then I decided to try manually starting the license server as root on the command line. Everything worked well as shown below:

[root@linuxserver pgi]# pwd
/usr/local/pgi
[root@linuxserver pgi]# ls
license.dat lmgrd lmutil pgroupd
[root@linuxserver pgi]# ./lmgrd -c license.dat -l /var/log/pgi_flexlm.log
[root@linuxserver pgi]# more /var/log/pgi_flexlm.log
11:04:08 (lmgrd) -----------------------------------------------
11:04:08 (lmgrd) Please Note:
11:04:08 (lmgrd)
11:04:08 (lmgrd) This log is intended for debug purposes only.
11:04:08 (lmgrd) In order to capture accurate license
11:04:08 (lmgrd) usage data into an organized repository,
11:04:08 (lmgrd) please enable report logging. Use Macrovision’s
11:04:08 (lmgrd) software license administration solution,
11:04:08 (lmgrd) FLEXnet Manager, to readily gain visibility
11:04:08 (lmgrd) into license usage data and to create
11:04:08 (lmgrd) insightful reports on critical information like
11:04:08 (lmgrd) license availability and usage. FLEXnet Manager
11:04:08 (lmgrd) can be fully automated to run these reports on
11:04:08 (lmgrd) schedule and can be used to track license
11:04:08 (lmgrd) servers and usage across a heterogeneous
11:04:08 (lmgrd) network of servers including Windows NT, Linux
11:04:08 (lmgrd) and UNIX. Contact Macrovision at
11:04:08 (lmgrd) www.macrovision.com for more details on how to
11:04:08 (lmgrd) obtain an evaluation copy of FLEXnet Manager
11:04:08 (lmgrd) for your enterprise.
11:04:08 (lmgrd)
11:04:08 (lmgrd) -----------------------------------------------
11:04:08 (lmgrd)
11:04:08 (lmgrd)
11:04:08 (lmgrd) The license server manager (lmgrd) running as root:
11:04:08 (lmgrd) This is a potential security problem
11:04:08 (lmgrd) and is not recommended.
11:04:08 (lmgrd) FLEXnet Licensing (v11.4.100.0 build 50818 i86_se9) started on linuxserver (linux) (3/19/2008)
11:04:08 (lmgrd) Copyright © 1988-2007 Macrovision Europe Ltd. and/or Macrovision Corporation. All Rights Reserved.
11:04:08 (lmgrd) US Patents 5,390,297 and 5,671,412.
11:04:08 (lmgrd) World Wide Web: http://www.macrovision.com
11:04:08 (lmgrd) License file(s): license.dat
11:04:08 (lmgrd) lmgrd tcp-port 27000
11:04:08 (lmgrd) Starting vendor daemons …
11:04:08 (lmgrd) Started pgroupd (internet tcp_port 33280 pid 10234)
11:04:08 (pgroupd) FLEXnet Licensing version v11.4.100.0 build 50818 i86_se9
11:04:08 (pgroupd) Server started on linuxserver for: pghpf-linux86-64
11:04:08 (pgroupd) pgf90-linux86-64 pgf77-linux86-64 pgcc-linux86-64
11:04:08 (pgroupd) pgcpp-linux86-64 pghpf-linux86 pgf90-linux86
11:04:08 (pgroupd) pgf77-linux86 pgcc-linux86 pgcpp-linux86
11:04:08 (pgroupd) pgprof pgdbg pgdbg-gui
11:04:08 (pgroupd) pgdbg-linux86-64
11:04:08 (pgroupd) EXTERNAL FILTERS are OFF
11:04:08 (lmgrd) pgroupd using TCP-port 33280
[root@linuxserver pgi]# ./lmutil lmstat
lmutil - Copyright © 1989-2007 Macrovision Europe Ltd. and/or Macrovision Corporation. All Rights Reserved.
Flexible License Manager status on Wed 3/19/2008 11:04

License server status: 27000@linuxserver
License file(s) on linuxserver: /usr/local/pgi/license.dat:

linuxserver: license server UP (MASTER) v11.4

Vendor daemon status (on linuxserver):

pgroupd: UP v11.4

[root@linuxserver pgi]# ./lmutil lmdown
lmutil - Copyright © 1989-2007 Macrovision Europe Ltd. and/or Macrovision Corporation. All Rights Reserved.

Port@Host Vendors

  1. 27000@linuxserver pgroupd

Are you sure (y/n)? y
1 FLEXnet License Server shut down

So, it’s not a problem with the daemons per-se, but likely a permission problem somewhere. I really need to run lmgrd as an unprivileged user because this server has direct connections to the public internet.

Here is some finger data on user flexlm:

[root@linuxserver pgi]# finger flexlm
Login: flexlm Name: FLEXlm Daemon
Directory: /none Shell: /bin/false
Never logged in.
No mail.
No Plan.
[root@linuxserver pgi]#

[root@linuxserver pgi]# ps -ef | grep lmgrd
root 10310 9972 0 11:25 pts/0 00:00:00 grep lmgrd

So, I try to start the license manager on the command line as non-root user as called for in the Macrovision documentation:

[root@linuxserver pgi]# su flexlm -c " /usr/local/pgi/lmgrd -c /usr/local/pgi/license.dat -l /var/log/pgi_flexlm.log"

Did the License Manager start?

[root@linuxserver pgi]# ./lmutil lmstat -c ./license.dat
lmutil - Copyright © 1989-2007 Macrovision Europe Ltd. and/or Macrovision Corporation. All Rights Reserved.
Flexible License Manager status on Wed 3/19/2008 11:25

License server status: 27000@linuxserver
License file(s) on linuxserver: ./license.dat:

lmgrd is not running: Cannot connect to license server system. (-15,570:115 “Operation now in progress”)

…nope!

Ok, so sanity check - try to start on command line as plain old root:

[root@linuxserver pgi]# ./lmgrd -c license.dat -l /var/log/pgi_flexlm.log

Now check to see if lmgrd is running:

[root@linuxserver pgi]# ps -ef | grep lmgrd
root 10316 1 0 11:26 pts/0 00:00:00 ./lmgrd -c license.dat -l /var/log/pgi_flexlm.log
root 10317 10316 0 11:26 ? 00:00:00 pgroupd -T linuxserver 11.4 3 -c license.dat --lmgrd_start 47e13eaf
root 10323 9972 0 11:26 pts/0 00:00:00 grep lmgrd

Yep, and so is pgroupd…

Now check license status:

[root@linuxserver pgi]# ./lmutil lmstat
lmutil - Copyright © 1989-2007 Macrovision Europe Ltd. and/or Macrovision Corporation. All Rights Reserved.
Flexible License Manager status on Wed 3/19/2008 11:26

License server status: 27000@linuxserver
License file(s) on linuxserver: /usr/local/pgi/license.dat:

linuxserver: license server UP (MASTER) v11.4

Vendor daemon status (on linuxserver):

pgroupd: UP v11.4

[root@linuxserver pgi]#

Final sanity check is to look at directory/file permissions on /usr/local/pgi and /usr/tmp:

[root@linuxserver local]# pwd
/usr/local
[root@linuxserver local]# ls -la
total 92
drwxr-xr-x 12 root root 4096 Mar 19 09:34 .
drwxr-xr-x 15 root root 4096 Aug 31 2005 …
drwxr-xr-x 2 root root 4096 Aug 12 2004 bin
drwxr-xr-x 2 root root 4096 Aug 12 2004 etc
drwxr-xr-x 2 root root 4096 Aug 12 2004 games
drwxr-xr-x 2 root root 4096 Aug 12 2004 include
drwxr-xr-x 2 root root 4096 Aug 12 2004 lib
drwxr-xr-x 2 root root 4096 Aug 12 2004 libexec
drwxr-xr-x 2 flexlm daemon 4096 Mar 19 11:23 pgi
drwxr-xr-x 2 root root 4096 Aug 12 2004 sbin
drwxr-xr-x 4 root root 4096 Aug 31 2005 share
drwxr-xr-x 2 root root 4096 Aug 12 2004 src
[root@linuxserver local]# cd pgi/
[root@linuxserver pgi]# ls -l
total 3356
-rw-r–r-- 1 flexlm daemon 1421 Mar 19 09:42 license.dat
-rwxr-xr-x 1 flexlm daemon 1060612 Mar 19 09:35 lmgrd
-rwxr-xr-x 1 flexlm daemon 1044640 Mar 19 09:35 lmutil
-rwxr-xr-x 1 flexlm daemon 1308452 Mar 19 09:35 pgroupd
[root@linuxserver pgi]# ls -l /usr/tmp
lrwxrwxrwx 1 root root 10 Aug 31 2005 /usr/tmp -> …/var/tmp
[root@linuxserver pgi]# cd /var/tmp
[root@linuxserver tmp]# ls -l
total 0
-rw-r–r-- 1 root root 0 Mar 19 11:26 lockpgroupd
[root@linuxserver tmp]# ls -la
total 20
drwxrwxrwt 3 root root 4096 Mar 19 11:26 .
drwxr-xr-x 23 root root 4096 Nov 22 2005 …
drwxrwxrwx 2 root root 4096 Mar 19 11:26 .flexlm
-rw-r–r-- 1 root root 0 Mar 19 11:26 lockpgroupd
[root@linuxserver tmp]# pwd
/var/tmp
[root@linuxserver tmp]# cd .flexlm/
[root@linuxserver .flexlm]# ls
lmgrd.10316
[root@linuxserver .flexlm]# ls -la
total 16
drwxrwxrwx 2 root root 4096 Mar 19 11:26 .
drwxrwxrwt 3 root root 4096 Mar 19 11:26 …
-rw-r–r-- 1 root root 161 Mar 19 11:26 lmgrd.10316
[root@linuxserver .flexlm]# more lmgrd.10316
PID=10316
STARTED=Wed Mar 19 11:26:23 2008
STAMPED=Wed Mar 19 11:26:23 2008
LMGRD=/usr/local/pgi/./lmgrd
LICENSE_FILE=/usr/local/pgi/license.dat
TCP_PORT=27000
[root@linuxserver .flexlm]#


So from the above, the following is obvious:

  1. Root can start the license manager with no problem
  2. Root CANNOT start the license manager from the command line as a non-privileged user
  3. Because the command line non-privileged user option will not work at this time, all start up script mods are moot


    I am unsure on how to correct this problem. Please advise.

Thanks,
Phil

Phil –

Have you tried changing the shell definition to /bin/bash? I’d like you to try that. Here at PGI, our license servers use this alternate username with the user “nobody” and the shell is set to /bin/bash. Everything works fine.

John