Automatic start up of License Manager in CentOS 7 not working

Automatic start up of License Manager in CentOS 7 not working

wghautodesk
Community Visitor Community Visitor
6,006 Views
2 Replies
Message 1 of 3

Automatic start up of License Manager in CentOS 7 not working

wghautodesk
Community Visitor
Community Visitor

Hi everyone. I have followed how to's online but I cannot get the line:
/opt/flexnetserver/lmgrd -c /var/flexlm/adsk_server.lic
to autostart the license server manager if the server restarts. My Autodesk clients just connect with a no license manager found error.

I have tried forcing the older way of starting up a command on start up by editing the /etc/rc.local:

#!/bin/bash
# THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES
#
# It is highly advisable to create own systemd services or udev rules
# to run scripts during boot instead of using this file.
#
# In contrast to previous versions due to parallel execution during boot
# this script will NOT be run after all other services.
#
# Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure
# that this script will be executed during boot.

touch /var/lock/subsys/local
/opt/flexnetserver/lmgrd -c /var/flexlm/adsk_server.lic

 

Then I make sure that rc.local is executable with a chmod.

This however still does not start up the executable adskflex. I only see lmgrd as a process and not the adskflex.

I understand that in CentOS 7 that systemd is the new way of conrolling start up services but I don't even know where to being by writing a unit for the Flexnet server.

I even tried just using the non root user's crontab -e:
@reboot /opt/flexnetserver/lmgrd -c /var/flexlm/adsk_server.lic


I run into the same error that the adsflex daemon does not start up.

How do I properly get the Autodesk License Manager to properly start up in CentOS if the server restarts?

0 Likes
6,007 Views
2 Replies
Replies (2)
Message 3 of 3

Anonymous
Not applicable

forget rc.local, this fails also in my case, instead use following script:

 

echo "=========================================="
echo "Create user - lmadmin"
echo "=========================================="
sudo groupadd -g 510 lmadmin
sudo useradd -g lmadmin -u 510 lmadmin
sudo echo "lmadmin ALL=(ALL) NOPASSWD:ALL " >> /etc/sudoers

echo "=========================================="
echo "Set folder rights"
echo "=========================================="
chown -R lmadmin:lmadmin /opt/flexnetserver/
chmod -R 777 /opt/flexnetserver/
chmod +x lmutil
chmod +x lmgrd
chmod +x adskflex

echo "=========================================="
echo "Creating systemd service - lmadmin"
echo "=========================================="
sudo echo "[Unit]" > /etc/systemd/system/lmadmin.service
sudo echo "Description=Flexnet License Daemon" >> /etc/systemd/system/lmadmin.service
sudo echo "After=network.target network.service" >> /etc/systemd/system/lmadmin.service
sudo echo "" >> /etc/systemd/system/lmadmin.service
sudo echo "[Service]" >> /etc/systemd/system/lmadmin.service
sudo echo "User=lmadmin" >> /etc/systemd/system/lmadmin.service
sudo echo "WorkingDirectory=/opt/flexnetserver/" >> /etc/systemd/system/lmadmin.service
sudo echo "ExecStart=/opt/flexnetserver/lmgrd -c /opt/flexnetserver/<licensefile>.lic -l /opt/flexnetserver/boot.log" >> /etc/systemd/system/lmadmin.service
sudo echo "Restart=always" >> /etc/systemd/system/lmadmin.service
sudo echo "RestartSec=30" >> /etc/systemd/system/lmadmin.service
sudo echo "Type=forking" >> /etc/systemd/system/lmadmin.service
sudo echo "" >> /etc/systemd/system/lmadmin.service
sudo echo "[Install]" >> /etc/systemd/system/lmadmin.service
sudo echo "WantedBy=multi-user.target" >> /etc/systemd/system/lmadmin.service
sudo echo "" >> /etc/systemd/system/lmadmin.service
sudo chown root:root /etc/systemd/system/lmadmin.service
sudo chmod 755 /etc/systemd/system/lmadmin.service
sudo systemctl daemon-reload
sudo systemctl enable lmadmin.service
echo "=========================================="
echo "lmadmin service installation complete"
echo " usage: systemctl start|stop lmadmin"
echo "=========================================="
echo "To check if license service works:"
echo "/opt/flexnetserver/lmutil lmstat -a -c /opt/flexnetserver/<licensefile>.lic"

 

Replace <licensefile>.lic with your own license file. This script will create a systemctl deamon which will auto start at boot up and can also be controlled using systemctl start and stop

 

It also creates user lmadmin but i needed to change the folder rights to 777 to be able to start the license manager. I am no guru at linux so if anyone knows a better way for this please add your thoughts