Sponsors
Sponsor Products
Systemd service for Autodesk License Server
posted by Mike Rochefort  on March 22, 2018, 11:25 a.m. (1 month, 4 days ago)
5 Responses     0 Plus One's     0 Comments  
Hello,

I'm currently trying to put together a systemd service file to autoload the AD license server on boot. So far what I have is consistently failing and I have no idea why.

============================
# /etc/systemd/system/adskserv.service
[Unit]
Description=Autodesk License Server
After=network.target syslog.target

[Service]
Type=simple
User=username
ExecStart=/opt/flexnetserver/lmgrd -c /opt/flexnetserver/lic/adsk.lic -l /home/username/adsk.log
ExecStop=/opt/flexnetserver/lmutil -q -force
ExecReload=/opt/flexnetserver/lmutil -q -force && /opt/flexnetserver/lmgrd -c /opt/flexnetserver/lic/adsk.lic -l /home/username/adsk.log
Restart=always # also tried without

[Install]
WantedBy=multi-user.target
=============================

Still a bit new to creating systemd files, so any pointers on this would be greatly appreciated!

Cheers,
Mike


Thread Tags:
  discuss-at-studiosysadmins 

Response from Todd Smith @ March 22, 2018, 12:55 p.m.
RE: shell user - It's a good security practice to never run daemons as shell users.   Limit the user to running only what they need to run and give them permissions to do just that.  There's no reason to give a daemon user an actual login, or have a daemon user run more than the process its meant to.

Todd Smith
Head of Information Technology
soho vfx | 40 Hanna Ave. Suite 403, Toronto, Ontario M6K 0C3
office: (416) 516-7863 fax: (416) 516-9682 web: sohovfx.com
----- On Mar 22, 2018, at 12:43 PM, Michael Rochefort <mike@michaelrochefort.com> wrote:
Hi Todd,
Thanks for the info. I think it was the forking attribute, I need to look into this more. I currently have it running under a shell user, is this something I should change to prevent issues in the future?

Cheers,Mike

---- On Thu, 22 Mar 2018 12:12:29 -0400 Todd Smith<todd@sohovfx.com> wrote ----
I think network.service is an error, it's just network.target IIRC.
Type needs to be forking because the process does fork.

flexlm    1405     1  0 Feb10 ?        00:00:35 /opt/flexnetserver/lmgrd -c ./license.lic -l ./flex.log

flexlm    1411  1405  0 Feb10 ?        00:03:07 adskflex -T fqdn-server.domain.com 11.13 4 -c :./license.lic: -lmgrd_port 6979 -srv somestring -daemon_port someport --lmgrd_start something -vdrestart 0


May have also been something to do with users, you want a no-shell user to run the process rooted in the appropriate directory.

Not sure how you set up what you had.


Todd Smith
Head of Information Technology
soho vfx | 40 Hanna Ave. Suite 403, Toronto, Ontario M6K 0C3
office: (416) 516-7863 fax: (416) 516-9682 web: sohovfx.com
----- On Mar 22, 2018, at 11:49 AM, Michael Rochefort <mike@michaelrochefort.com> wrote:
Hi Todd,

That worked! I have no idea where mine was failing, the AD log was providing any useful info. Maybe it was due to using simple rather than forking? Or maybe not waiting for network.service... not too sure.

Cheers,
Mike


---- On Thu, 22 Mar 2018 11:35:42 -0400 Todd Smith <todd@sohovfx.com> wrote ----

Below is what I have running

Where is yours failing?


======

[Unit]

Description=Autodesk Flexnet License Daemon

After=network.target network.service


[Service]

User=flexlm

WorkingDirectory=/opt/flexnetserver

ExecStart=/opt/flexnetserver/lmgrd -c ./license.lic -l ./flex.log

Restart=always

RestartSec=30

Type=forking


[Install]

WantedBy=multi-user.target

======



Todd Smith
Head of Information Technology

soho vfx | 
40 Hanna Ave. Suite 403, Toronto, Ontario M6K 0C3
office: (416) 516-7863 fax: (416) 516-9682 web: sohovfx.com

----- On Mar 22, 2018, at 11:22 AM, Michael Rochefort <mike@michaelrochefort.com> wrote:

To unsubscribe from the list send a blank e-mail to mailto:studiosysadmins-discuss-request@studiosysadmins.com?subject=unsubscribe
Hello,

I'm currently trying to put together a systemd service file to autoload the AD license server on boot. So far what I have is consistently failing and I have no idea why.

============================
# /etc/systemd/system/adskserv.service
[Unit]
Description=Autodesk License Server
After=network.target syslog.target

[Service]
Type=simple
User=username
ExecStart=/opt/flexnetserver/lmgrd -c /opt/flexnetserver/lic/adsk.lic -l /home/username/adsk.log
ExecStop=/opt/flexnetserver/lmutil -q -force
ExecReload=/opt/flexnetserver/lmutil -q -force && /opt/flexnetserver/lmgrd -c /opt/flexnetserver/lic/adsk.lic -l /home/username/adsk.log
Restart=always # also tried without

[Install]
WantedBy=multi-user.target
=============================

Still a bit new to creating systemd files, so any pointers on this would be greatly appreciated!

Cheers,
Mike


To unsubscribe from the list send a blank e-mail to mailto:studiosysadmins-discuss-request@studiosysadmins.com?subject=unsubscribe



To unsubscribe from the list send a blank e-mail to mailto:studiosysadmins-discuss-request@studiosysadmins.com?subject=unsubscribe
To unsubscribe from the list send a blank e-mail to mailto:studiosysadmins-discuss-request@studiosysadmins.com?subject=unsubscribe


To unsubscribe from the list send a blank e-mail to mailto:studiosysadmins-discuss-request@studiosysadmins.com?subject=unsubscribe

0 Plus One's     0 Comments  
   

Response from Mike Rochefort @ March 22, 2018, 12:45 p.m.
Hi Todd,
Thanks for the info. I think it was the forking attribute, I need to look into this more. I currently have it running under a shell user, is this something I should change to prevent issues in the future?

Cheers,Mike

---- On Thu, 22 Mar 2018 12:12:29 -0400 Todd Smith<todd@sohovfx.com> wrote ----
I think network.service is an error, it's just network.target IIRC.
Type needs to be forking because the process does fork.

flexlm    1405     1  0 Feb10 ?        00:00:35 /opt/flexnetserver/lmgrd -c ./license.lic -l ./flex.log

flexlm    1411  1405  0 Feb10 ?        00:03:07 adskflex -T fqdn-server.domain.com 11.13 4 -c :./license.lic: -lmgrd_port 6979 -srv somestring -daemon_port someport --lmgrd_start something -vdrestart 0


May have also been something to do with users, you want a no-shell user to run the process rooted in the appropriate directory.

Not sure how you set up what you had.


Todd Smith
Head of Information Technology
soho vfx | 40 Hanna Ave. Suite 403, Toronto, Ontario M6K 0C3
office: (416) 516-7863 fax: (416) 516-9682 web: sohovfx.com
----- On Mar 22, 2018, at 11:49 AM, Michael Rochefort <mike@michaelrochefort.com> wrote:
Hi Todd,

That worked! I have no idea where mine was failing, the AD log was providing any useful info. Maybe it was due to using simple rather than forking? Or maybe not waiting for network.service... not too sure.

Cheers,
Mike


---- On Thu, 22 Mar 2018 11:35:42 -0400 Todd Smith <todd@sohovfx.com> wrote ----

Below is what I have running

Where is yours failing?


======

[Unit]

Description=Autodesk Flexnet License Daemon

After=network.target network.service


[Service]

User=flexlm

WorkingDirectory=/opt/flexnetserver

ExecStart=/opt/flexnetserver/lmgrd -c ./license.lic -l ./flex.log

Restart=always

RestartSec=30

Type=forking


[Install]

WantedBy=multi-user.target

======



Todd Smith
Head of Information Technology

soho vfx | 
40 Hanna Ave. Suite 403, Toronto, Ontario M6K 0C3
office: (416) 516-7863 fax: (416) 516-9682 web: sohovfx.com

----- On Mar 22, 2018, at 11:22 AM, Michael Rochefort <mike@michaelrochefort.com> wrote:

To unsubscribe from the list send a blank e-mail to mailto:studiosysadmins-discuss-request@studiosysadmins.com?subject=unsubscribe
Hello,

I'm currently trying to put together a systemd service file to autoload the AD license server on boot. So far what I have is consistently failing and I have no idea why.

============================
# /etc/systemd/system/adskserv.service
[Unit]
Description=Autodesk License Server
After=network.target syslog.target

[Service]
Type=simple
User=username
ExecStart=/opt/flexnetserver/lmgrd -c /opt/flexnetserver/lic/adsk.lic -l /home/username/adsk.log
ExecStop=/opt/flexnetserver/lmutil -q -force
ExecReload=/opt/flexnetserver/lmutil -q -force && /opt/flexnetserver/lmgrd -c /opt/flexnetserver/lic/adsk.lic -l /home/username/adsk.log
Restart=always # also tried without

[Install]
WantedBy=multi-user.target
=============================

Still a bit new to creating systemd files, so any pointers on this would be greatly appreciated!

Cheers,
Mike


To unsubscribe from the list send a blank e-mail to mailto:studiosysadmins-discuss-request@studiosysadmins.com?subject=unsubscribe



To unsubscribe from the list send a blank e-mail to mailto:studiosysadmins-discuss-request@studiosysadmins.com?subject=unsubscribe
To unsubscribe from the list send a blank e-mail to mailto:studiosysadmins-discuss-request@studiosysadmins.com?subject=unsubscribe


0 Plus One's     0 Comments  
   

Response from Todd Smith @ March 22, 2018, 12:15 p.m.
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo} span.s1 {font-variant-ligatures: no-common-ligatures} span.s2 {font-variant-ligatures: no-common-ligatures; color: #c33720} I think network.service is an error, it's just network.target IIRC.
Type needs to be forking because the process does fork.

flexlm    1405     1  0 Feb10 ?        00:00:35 /opt/flexnetserver/lmgrd -c ./license.lic -l ./flex.log

flexlm    1411  1405  0 Feb10 ?        00:03:07 adskflex -T fqdn-server.domain.com 11.13 4 -c :./license.lic: -lmgrd_port 6979 -srv somestring -daemon_port someport --lmgrd_start something -vdrestart 0


May have also been something to do with users, you want a no-shell user to run the process rooted in the appropriate directory.

Not sure how you set up what you had.


Todd Smith
Head of Information Technology
soho vfx | 40 Hanna Ave. Suite 403, Toronto, Ontario M6K 0C3
office: (416) 516-7863 fax: (416) 516-9682 web: sohovfx.com
----- On Mar 22, 2018, at 11:49 AM, Michael Rochefort <mike@michaelrochefort.com> wrote:
Hi Todd,

That worked! I have no idea where mine was failing, the AD log was providing any useful info. Maybe it was due to using simple rather than forking? Or maybe not waiting for network.service... not too sure.

Cheers,
Mike


---- On Thu, 22 Mar 2018 11:35:42 -0400 Todd Smith <todd@sohovfx.com> wrote ----

Below is what I have running

Where is yours failing?


======

[Unit]

Description=Autodesk Flexnet License Daemon

After=network.target network.service


[Service]

User=flexlm

WorkingDirectory=/opt/flexnetserver

ExecStart=/opt/flexnetserver/lmgrd -c ./license.lic -l ./flex.log

Restart=always

RestartSec=30

Type=forking


[Install]

WantedBy=multi-user.target

======



Todd Smith
Head of Information Technology

soho vfx | 
40 Hanna Ave. Suite 403, Toronto, Ontario M6K 0C3
office: (416) 516-7863 fax: (416) 516-9682 web: sohovfx.com

----- On Mar 22, 2018, at 11:22 AM, Michael Rochefort <mike@michaelrochefort.com> wrote:

To unsubscribe from the list send a blank e-mail to mailto:studiosysadmins-discuss-request@studiosysadmins.com?subject=unsubscribe
Hello,

I'm currently trying to put together a systemd service file to autoload the AD license server on boot. So far what I have is consistently failing and I have no idea why.

============================
# /etc/systemd/system/adskserv.service
[Unit]
Description=Autodesk License Server
After=network.target syslog.target

[Service]
Type=simple
User=username
ExecStart=/opt/flexnetserver/lmgrd -c /opt/flexnetserver/lic/adsk.lic -l /home/username/adsk.log
ExecStop=/opt/flexnetserver/lmutil -q -force
ExecReload=/opt/flexnetserver/lmutil -q -force && /opt/flexnetserver/lmgrd -c /opt/flexnetserver/lic/adsk.lic -l /home/username/adsk.log
Restart=always # also tried without

[Install]
WantedBy=multi-user.target
=============================

Still a bit new to creating systemd files, so any pointers on this would be greatly appreciated!

Cheers,
Mike


To unsubscribe from the list send a blank e-mail to mailto:studiosysadmins-discuss-request@studiosysadmins.com?subject=unsubscribe



To unsubscribe from the list send a blank e-mail to mailto:studiosysadmins-discuss-request@studiosysadmins.com?subject=unsubscribe

0 Plus One's     0 Comments  
   

Response from Mike Rochefort @ March 22, 2018, 11:50 a.m.
Hi Todd,

That worked! I have no idea where mine was failing, the AD log was providing any useful info. Maybe it was due to using simple rather than forking? Or maybe not waiting for network.service... not too sure.

Cheers,
Mike


---- On Thu, 22 Mar 2018 11:35:42 -0400 Todd Smith <todd@sohovfx.com> wrote ----

Below is what I have running

Where is yours failing?


======

[Unit]

Description=Autodesk Flexnet License Daemon

After=network.target network.service


[Service]

User=flexlm

WorkingDirectory=/opt/flexnetserver

ExecStart=/opt/flexnetserver/lmgrd -c ./license.lic -l ./flex.log

Restart=always

RestartSec=30

Type=forking


[Install]

WantedBy=multi-user.target

======



Todd Smith
Head of Information Technology

soho vfx | 
40 Hanna Ave. Suite 403, Toronto, Ontario M6K 0C3
office: (416) 516-7863 fax: (416) 516-9682 web: sohovfx.com

----- On Mar 22, 2018, at 11:22 AM, Michael Rochefort <mike@michaelrochefort.com> wrote:

To unsubscribe from the list send a blank e-mail to mailto:studiosysadmins-discuss-request@studiosysadmins.com?subject=unsubscribe
Hello,

I'm currently trying to put together a systemd service file to autoload the AD license server on boot. So far what I have is consistently failing and I have no idea why.

============================
# /etc/systemd/system/adskserv.service
[Unit]
Description=Autodesk License Server
After=network.target syslog.target

[Service]
Type=simple
User=username
ExecStart=/opt/flexnetserver/lmgrd -c /opt/flexnetserver/lic/adsk.lic -l /home/username/adsk.log
ExecStop=/opt/flexnetserver/lmutil -q -force
ExecReload=/opt/flexnetserver/lmutil -q -force && /opt/flexnetserver/lmgrd -c /opt/flexnetserver/lic/adsk.lic -l /home/username/adsk.log
Restart=always # also tried without

[Install]
WantedBy=multi-user.target
=============================

Still a bit new to creating systemd files, so any pointers on this would be greatly appreciated!

Cheers,
Mike


To unsubscribe from the list send a blank e-mail to mailto:studiosysadmins-discuss-request@studiosysadmins.com?subject=unsubscribe



0 Plus One's     0 Comments  
   

Response from Todd Smith @ March 22, 2018, 11:40 a.m.
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px} span.s1 {font-variant-ligatures: no-common-ligatures; background-color: #00e6e5} span.s2 {font-variant-ligatures: no-common-ligatures}

Below is what I have running

Where is yours failing?


======

[Unit]

Description=Autodesk Flexnet License Daemon

After=network.target network.service


[Service]

User=flexlm

WorkingDirectory=/opt/flexnetserver

ExecStart=/opt/flexnetserver/lmgrd -c ./license.lic -l ./flex.log

Restart=always

RestartSec=30

Type=forking


[Install]

WantedBy=multi-user.target

======


Todd Smith
Head of Information Technology
soho vfx | 40 Hanna Ave. Suite 403, Toronto, Ontario M6K 0C3
office: (416) 516-7863 fax: (416) 516-9682 web: sohovfx.com
----- On Mar 22, 2018, at 11:22 AM, Michael Rochefort <mike@michaelrochefort.com> wrote:
Hello,

I'm currently trying to put together a systemd service file to autoload the AD license server on boot. So far what I have is consistently failing and I have no idea why.

============================
# /etc/systemd/system/adskserv.service
[Unit]
Description=Autodesk License Server
After=network.target syslog.target

[Service]
Type=simple
User=username
ExecStart=/opt/flexnetserver/lmgrd -c /opt/flexnetserver/lic/adsk.lic -l /home/username/adsk.log
ExecStop=/opt/flexnetserver/lmutil -q -force
ExecReload=/opt/flexnetserver/lmutil -q -force && /opt/flexnetserver/lmgrd -c /opt/flexnetserver/lic/adsk.lic -l /home/username/adsk.log
Restart=always # also tried without

[Install]
WantedBy=multi-user.target
=============================

Still a bit new to creating systemd files, so any pointers on this would be greatly appreciated!

Cheers,
Mike


To unsubscribe from the list send a blank e-mail to mailto:studiosysadmins-discuss-request@studiosysadmins.com?subject=unsubscribe

0 Plus One's     0 Comments