lmtools licensing utility problem

Questions about Wine on Linux
Locked
braz_bell
Level 2
Level 2
Posts: 10
Joined: Mon Sep 17, 2012 8:13 am

lmtools licensing utility problem

Post by braz_bell »

Hello,

Problem statement:
I have very old version of beta lmtools from windows, a licensing utility.
In MS WINDOWS: It is registed as windows service and when running succcessfully it serves as floating license server.
For example: my application gets licensing info from 1202@localhost or [email protected]
Also since I have multiple licenses, Users from network use [email protected] as server to get floating lic info and run the app.
Right now I have linux build of my application but I have to use old windows utility for license (Due to some constraints,I cant have linux version of FLEXLM).
For time being what I am doing is I am using windows machine for license and App on linux gets floating license info from network (from my windows machine).
AND the thing is I HATE windows and just for a moron licensing thing.. NO_F_WAY
And then came WINE into my knowledge

THE Problem:
I was able to setup wine on centos machine and managed to make my lmtools registered as service without any problems.
I used #wine net stat betalmservice And I confirmed the license is running fine on wine by running #wine lmstat
lmstat tells me that license is running on 1202@XXXX

But my linux build app can not get licensing info from 1202@XXXX ???
I tried adding port 1202 to firewall, disabled firewall but no use.
This is where I am stuck.

Any help will be much appreciated
User avatar
DanKegel
Moderator
Moderator
Posts: 1164
Joined: Wed May 14, 2008 11:44 am

Re: lmtools licensing utility problem

Post by DanKegel »

braz_bell
Level 2
Level 2
Posts: 10
Joined: Mon Sep 17, 2012 8:13 am

Re: lmtools licensing utility problem

Post by braz_bell »

Yes and No.
As I said I am using Lmtools very old commandline version since my license doesnot support new FlexLm license syntax.

UPDATE:
I fixed my problem by editing /etc/hosts file and adding line "my_centos_host_name 127.0.0.1" and my license was working fine yesterday after i posted this issue.
But today my service is not running and looking into it.
Yesterday It was a complete success; exactly as the guys from FLEMLMtools post you mentioned above wanted it ro run.
braz_bell
Level 2
Level 2
Posts: 10
Joined: Mon Sep 17, 2012 8:13 am

Re: lmtools licensing utility problem

Post by braz_bell »

for some reason service is not running now :)
I can see it in registery.
I am using wine net start to see what services are running after I "#wine net start betalmservice" but its not running
User avatar
André H.
Moderator
Moderator
Posts: 202
Joined: Sun Dec 07, 2008 8:33 am

Re: lmtools licensing utility problem

Post by André H. »

does wine outputs something?
braz_bell
Level 2
Level 2
Posts: 10
Joined: Mon Sep 17, 2012 8:13 am

Re: lmtools licensing utility problem

Post by braz_bell »

Hello,
I just setup my wine __fresh_install__ and did everthing again.
My license server is running at port 1202.When i check my license with wine .. Found license demon at port 1202.
But my centos cant find license on 1202@localhost .. or [email protected] or 1202@HOSTNAME
I did add my hostname 127.0.0.1 in /etc/hosts.

Any ideas ?
braz_bell
Level 2
Level 2
Posts: 10
Joined: Mon Sep 17, 2012 8:13 am

Re: lmtools licensing utility problem

Post by braz_bell »

Ok I have found whats wrong and I need a solution for this.
I was wondering why it worked last time and not this time.

First the situation: windows license utility shows its running perfectly and throwing licensing at [email protected] problem with wine here.
But linux cant seem to find license at this port.


I kept doing stuff and found out that
Only When I open any utility in Applications==> Wine==>(Notepad,regedit,wine configuration etc), License demon at "[email protected]" starts to work.
License daemon requires atleast one utility from Applications==> Wine==>(XXX) to be opened otherwise linux cant find license at [email protected] .
Even though license utility shows license is being thrown at @ "[email protected]" but if I dont have any wine utility running, linux doest seem to listen to that port for license.
As soon as I start any utility for example notepad or file explorer etc it starts working again.And if i close it, linux cant find license at that port.

Any fix guys .. please ..
User avatar
André H.
Moderator
Moderator
Posts: 202
Joined: Sun Dec 07, 2008 8:33 am

Re: lmtools licensing utility problem

Post by André H. »

run wineserver -p from e.g. Alt+f2, see wineserver --help
braz_bell
Level 2
Level 2
Posts: 10
Joined: Mon Sep 17, 2012 8:13 am

Re: lmtools licensing utility problem

Post by braz_bell »

Got it ..will check and let know
http://www.winehq.org/site/docs/wineserver
braz_bell
Level 2
Level 2
Posts: 10
Joined: Mon Sep 17, 2012 8:13 am

Re: lmtools licensing utility problem

Post by braz_bell »

Hello,
I have noticed that "wineserver -p from e.g. Alt+f2" works.
However
1.If I run "wineserver -p" from terminal, doesnt work for my license utility.
2.If I add "wineserver -p" in start up applications, also does not work <I am using CENTOS 6>.

Any solutions??
I want to start this "wineserver -p" daemon automatically, when logged in.
braz_bell
Level 2
Level 2
Posts: 10
Joined: Mon Sep 17, 2012 8:13 am

Re: lmtools licensing utility problem

Post by braz_bell »

A little correction:
With ALT+F2 run dialogue &&& startup applications ->add "wineserver -p" &&& run "wineserver -p" from terminal, I still have to open once notepad or any utility for once and then it starts working even if i close utility.

Any solution ? so when user logs in, license is already up and running. ??
braz_bell
Level 2
Level 2
Posts: 10
Joined: Mon Sep 17, 2012 8:13 am

Re: lmtools licensing utility problem

Post by braz_bell »

Hello All,
If this helps anyone; For now I am using this way to make sure my server is running at startup.
But I need ' Linux way <-T-H-E-> elegant way' suggestion to this problem since this is just a workaround and definitely a dirty one.
Some people may have to change the values of sleep to higher values to work.

Code: Select all

#!/bin/bash
#### Make a file wineserver.sh for example and paste this code in it.
#### Chmod +x wineserver.sh
#### Add wineserver.sh to start up applications.
#
#### Start wineserver ...
wineserver -p
sleep 5
#
### Start work around.Open notepad for once and then kill it.
#
while  :
do
if (ps -ae | grep notepad.exe) then
   killall -9 notepad.exe &
   exit 0;
else 
   notepad &
   fi
   sleep 1
done
User avatar
André H.
Moderator
Moderator
Posts: 202
Joined: Sun Dec 07, 2008 8:33 am

Re: lmtools licensing utility problem

Post by André H. »

try:

$ wineserver -p && wineboot
$ ps -A | grep exe
30571 ? 00:00:00 services.exe
30576 ? 00:00:00 winedevice.exe
30583 ? 00:00:00 plugplay.exe
braz_bell
Level 2
Level 2
Posts: 10
Joined: Mon Sep 17, 2012 8:13 am

Re: lmtools licensing utility problem

Post by braz_bell »

(1) Adding "wineserver -p && wineboot" to startup applications does not work.
winedevice.exe and plugplay.exe can not be triggered may be because startup applications load too ealry for wine.
I also tried "sleep 5 && wineserver -p && wineboot" to start up applications, also dont work for my utility since
lmtools depends on winedevice.exe and plugplay.exe I guess.
(2) However If I place wineserver.sh in /usr/bin and add wineserver.sh to startup applciations and add following code to it, it works.
May be becuase /usr/bin things get loaded in the end prioritywise but not sure.

Code: Select all

#!/bin/bash
#### Make a file wineserver.sh for example and paste this code in it.
#### Chmod +x wineserver.sh
#### Add wineserver.sh to start up applications.
#
#### Start wineserver ...
sleep 5
wineserver -p && wineboot
I guess i can live with this but any more elegent ideas will be welcome.
Ideally, when centos/Linux reboots and loaded, services.exe winedevice.exe and plugplay.exe should be running already neat and clean.
Locked