Discussion:
[Interest] Where to does Qt expect to find ".qt-license" file when running on a Jenkins slave machine?
Edward Sutton
2015-07-01 20:01:24 UTC
Permalink
After updating a Windows 7 VM Jenkins build slave to Qt Enterprise 5.5.0, Qt can not longer find the license?


When logged on as myself, I can build a project fine using Qt 5.5.0 with Qt creator without license issues.

I can see my license file:

C:\User\myUsername\.qt-license

I am running Jenkins slave as a Windows service.

Where does Qt expect to find ".qt-license” file ?


"************************************************"
"QTDIR = C:\Qt\Qt5.5.0\5.5\msvc2013"
"Shadow build..."

Error: Qt license file was not found!
Project ERROR: License check failed! Giving up ...

Microsoft (R) Program Maintenance Utility Version 12.00.21005.1
Copyright (C) Microsoft Corporation. All rights reserved.

NMAKE : fatal error U1052: file 'Makefile.Release' not found
Stop.


-Ed


This email and any files transmitted with it from The Charles Machine Works, Inc. are confidential and intended solely for the use of the individual or entity to which they are addressed. If you have received this email in error please notify the sender. Our company accepts no liability for the contents of this email, or for the consequences of any actions taken on the basis of the information provided, unless that information is subsequently confirmed in writing. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
Koehne Kai
2015-07-02 06:33:28 UTC
Permalink
> -----Original Message-----
> From: interest-bounces+kai.koehne=***@qt-project.org
> [mailto:interest-bounces+kai.koehne=***@qt-project.org]
> On Behalf Of Edward Sutton
> Sent: Wednesday, July 01, 2015 10:01 PM
> To: Interests Qt
> Subject: [Interest] Where to does Qt expect to find ".qt-license" file when
> running on a Jenkins slave machine?
>
> After updating a Windows 7 VM Jenkins build slave to Qt Enterprise 5.5.0, Qt
> can not longer find the license?
>
>
> When logged on as myself, I can build a project fine using Qt 5.5.0 with Qt
> creator without license issues.
>
> I can see my license file:
>
> C:\User\myUsername\.qt-license
>
>
> I am running Jenkins slave as a Windows service.
>
> Where does Qt expect to find ".qt-license” file ?

For Window,s it searches it in

%USERPROFILE%\AppData\Roaming\Qt
%HOME%
%USERPROFILE%
%HOMEDRIVE%\%HOMEPATH%

So it's bound to the specific user.

Hope this helps,

Kai
Edward Sutton
2015-07-02 13:49:50 UTC
Permalink
Kai,

Thank you for your help.

On a Windows 7 VM machine it installs to:

C:\Users\edward3\.qt-license


When logged on as edward3 all is good.


This same machine operates as a Jenkins slave.

Dumping the environment from the Jenkins job:

USERDOMAIN=WORKGROUP
USERNAME=WIN7X64-ESUTTON$
USERPROFILE=C:\Windows\system32\config\systemprofile

I tried copying C:\Users\edward3\.qt-license to the following without success:

C:\Windows\System32\config\systemprofile\AppData\Roaming\Qt\.qt-license
C:\Windows\System32\config\systemprofile\.qt-license
C:\jenkins\.qt-license

I had the slave building before using Qt Enterprise. What could have changed I do no know?


-Ed


On Jul 2, 2015, at 1:33 AM, Koehne Kai <***@theqtcompany.com<mailto:***@theqtcompany.com>> wrote:



-----Original Message-----
From: interest-bounces+kai.koehne=***@qt-project.org<mailto:interest-bounces+kai.koehne=***@qt-project.org>
[mailto:interest-bounces+kai.koehne=***@qt-project.org]
On Behalf Of Edward Sutton
Sent: Wednesday, July 01, 2015 10:01 PM
To: Interests Qt
Subject: [Interest] Where to does Qt expect to find ".qt-license" file when
running on a Jenkins slave machine?

After updating a Windows 7 VM Jenkins build slave to Qt Enterprise 5.5.0, Qt
can not longer find the license?


When logged on as myself, I can build a project fine using Qt 5.5.0 with Qt
creator without license issues.

I can see my license file:

C:\User\myUsername\.qt-license


I am running Jenkins slave as a Windows service.

Where does Qt expect to find ".qt-license” file ?

For Window,s it searches it in

%USERPROFILE%\AppData\Roaming\Qt
%HOME%
%USERPROFILE%
%HOMEDRIVE%\%HOMEPATH%

So it's bound to the specific user.

Hope this helps,

Kai

This email and any files transmitted with it from The Charles Machine Works, Inc. are confidential and intended solely for the use of the individual or entity to which they are addressed. If you have received this email in error please notify the sender. Our company accepts no liability for the contents of this email, or for the consequences of any actions taken on the basis of the information provided, unless that information is subsequently confirmed in writing. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
Koehne Kai
2015-07-02 14:25:47 UTC
Permalink
> -----Original Message-----
> From: Edward Sutton [mailto:***@subsite.com]
> Sent: Thursday, July 02, 2015 3:50 PM
> To: Koehne Kai
> Cc: Interests Qt
> Subject: Re: [Interest] Where to does Qt expect to find ".qt-license" file
> when running on a Jenkins slave machine?
>
> Kai,
>
> Thank you for your help.
>
> On a Windows 7 VM machine it installs to:
>
> C:\Users\edward3\.qt-license
>
>
> When logged on as edward3 all is good.
>
>
> This same machine operates as a Jenkins slave.
>
> Dumping the environment from the Jenkins job:
>
> USERDOMAIN=WORKGROUP
> USERNAME=WIN7X64-ESUTTON$
> USERPROFILE=C:\Windows\system32\config\systemprofile
>
> I tried copying C:\Users\edward3\.qt-license to the following without
> success:
>
> C:\Windows\System32\config\systemprofile\AppData\Roaming\Qt\.qt-
> license

Actually it searches for a 'qtlicenses.ini' file here, that is usually created & updated by the Qt Installers...

> C:\Windows\System32\config\systemprofile\.qt-license

This location should work. Please double check that the file is there (without any hidden .txt suffixes or so), and that your Jenkins job has read access to it.

> C:\jenkins\.qt-license
>
> I had the slave building before using Qt Enterprise. What could have changed
> I do not know?

One difference is that the license is now checked for the licenses also when running qmake, see also the ChangeLog. In earlier versions it was only run at configure time.

May I suggest to open a ticket via the Qt Support?

Regards

Kai
Edward Sutton
2015-07-02 16:32:57 UTC
Permalink
Kai,

I opened a ticket at Qt support.

I could find no qtlicences.ini files. Only “.qt-license”.

Thanks for the tips!

-Ed


On Jul 2, 2015, at 9:25 AM, Koehne Kai <***@theqtcompany.com<mailto:***@theqtcompany.com>> wrote:



-----Original Message-----
From: Edward Sutton [mailto:***@subsite.com]
Sent: Thursday, July 02, 2015 3:50 PM
To: Koehne Kai
Cc: Interests Qt
Subject: Re: [Interest] Where to does Qt expect to find ".qt-license" file
when running on a Jenkins slave machine?

Kai,

Thank you for your help.

On a Windows 7 VM machine it installs to:

C:\Users\edward3\.qt-license


When logged on as edward3 all is good.


This same machine operates as a Jenkins slave.

Dumping the environment from the Jenkins job:

USERDOMAIN=WORKGROUP
USERNAME=WIN7X64-ESUTTON$
USERPROFILE=C:\Windows\system32\config\systemprofile

I tried copying C:\Users\edward3\.qt-license to the following without
success:

C:\Windows\System32\config\systemprofile\AppData\Roaming\Qt\.qt-
license

Actually it searches for a 'qtlicenses.ini' file here, that is usually created & updated by the Qt Installers...

C:\Windows\System32\config\systemprofile\.qt-license

This location should work. Please double check that the file is there (without any hidden .txt suffixes or so), and that your Jenkins job has read access to it.

C:\jenkins\.qt-license

I had the slave building before using Qt Enterprise. What could have changed
I do not know?

One difference is that the license is now checked for the licenses also when running qmake, see also the ChangeLog. In earlier versions it was only run at configure time.

May I suggest to open a ticket via the Qt Support?

Regards

Kai

This email and any files transmitted with it from The Charles Machine Works, Inc. are confidential and intended solely for the use of the individual or entity to which they are addressed. If you have received this email in error please notify the sender. Our company accepts no liability for the contents of this email, or for the consequences of any actions taken on the basis of the information provided, unless that information is subsequently confirmed in writing. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
Richard Otter
2015-08-03 17:01:43 UTC
Permalink
I encountered the same error in a similar environment-
Jenkins slave running on Windows OS.
The same machine had been working with qt5.5 for several days and then it
started generating the error.
The license file was in the home folder of the account used by the Jenkins
service.

A reboot fixed it.
I noticed that the Application log had an error after the last successful
run and before the first failure-
Windows cannot load the locally stored profile. Possible causes of this
error include insufficient security rights or a corrupt local profile.

So, it looks like there was at least a temporary problem having the service
load it's user's profile (where the license lives)
Michael Capewell
2016-02-05 21:36:07 UTC
Permalink
Edward Sutton <edward.sutton <at> subsite.com> writes:

>
>
> Kai,
>
> Thank you for your help.
>
> On a Windows 7 VM machine it installs to:
>
>  C:\Users\edward3\.qt-license
>
>
> When logged on as edward3 all is good.
>
>
> This same machine operates as a Jenkins slave.
>
> Dumping the environment from the Jenkins job:
>
>  USERDOMAIN=WORKGROUP
>  USERNAME=WIN7X64-ESUTTON$
>  USERPROFILE=C:\Windows\system32\config\systemprofile
>
> I tried copying C:\Users\edward3\.qt-license to the following without success:
>
>   C:\Windows\System32\config\systemprofile\AppData\Roaming\Qt\.qt-license
>   C:\Windows\System32\config\systemprofile\.qt-license
>   C:\jenkins\.qt-license
>
> I had the slave building before using Qt Enterprise. What could have
changed I do no know?
>
>
> -Ed
>


I had this same problem. The solution is weird, but easy to do. The
problem is that C:\Windows\System32\config\systemprofile\ is different
depending on which user is looking at it! So if you manually copy your
license there, Jenkins does not see it, because it runs as a different user.
You need to get Jenkins to copy the license there so it's in the right place.

So:
* add an "Execute Windows batch command" section to your Jenkins project's
Build steps
* copy your .qt-license into C:\temp\
* Add the following two commands to the batch script text area (or add it at
the top of your original script):
* copy C:\temp\.qt-license %USERPROFILE%\.qtlicense
* dir %USERPROFILE%
* then build your project. The file will be copied and qmake should run
without issue.

Notice that the contents listed for that directory are different than what
you see with Windows Explorer under your normal user account!
Jason H
2016-02-05 21:50:35 UTC
Permalink
> Sent: Friday, February 05, 2016 at 4:36 PM
> From: "Michael Capewell" <***@gmail.com>
> To: ***@qt-project.org
> Subject: Re: [Interest] Where to does Qt expect to find ".qt-license" file when running on a Jenkins slave machine?
>
> Edward Sutton <edward.sutton <at> subsite.com> writes:
>
> >
> >
> > Kai,
> >
> > Thank you for your help.
> >
> > On a Windows 7 VM machine it installs to:
> >
> >  C:\Users\edward3\.qt-license
> >
> >
> > When logged on as edward3 all is good.
> >
> >
> > This same machine operates as a Jenkins slave.
> >
> > Dumping the environment from the Jenkins job:
> >
> >  USERDOMAIN=WORKGROUP
> >  USERNAME=WIN7X64-ESUTTON$
> >  USERPROFILE=C:\Windows\system32\config\systemprofile
> >
> > I tried copying C:\Users\edward3\.qt-license to the following without success:
> >
> >   C:\Windows\System32\config\systemprofile\AppData\Roaming\Qt\.qt-license
> >   C:\Windows\System32\config\systemprofile\.qt-license
> >   C:\jenkins\.qt-license
> >
> > I had the slave building before using Qt Enterprise. What could have
> changed I do no know?
> >
> >
> > -Ed
> >
>
>
> I had this same problem. The solution is weird, but easy to do. The
> problem is that C:\Windows\System32\config\systemprofile\ is different
> depending on which user is looking at it! So if you manually copy your
> license there, Jenkins does not see it, because it runs as a different user.
> You need to get Jenkins to copy the license there so it's in the right place.
>
> So:
> * add an "Execute Windows batch command" section to your Jenkins project's
> Build steps
> * copy your .qt-license into C:\temp\
> * Add the following two commands to the batch script text area (or add it at
> the top of your original script):
> * copy C:\temp\.qt-license %USERPROFILE%\.qtlicense
> * dir %USERPROFILE%
> * then build your project. The file will be copied and qmake should run
> without issue.
>
> Notice that the contents listed for that directory are different than what
> you see with Windows Explorer under your normal user account!


If you copy the file as Adminstrator to the protected folder, everyone will see it. If you try to copy it as a normal user, it'll only be applied to that user's profile.
Loading...