LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Running LabVIEW with Windows Service Account in CI environment (TeamCity)

Hi,

 

we are trying to run LabVIEW 2017 to perform builds in a TeamCity CI environment on Windows. We have installed LabVIEW successfully on the build server and when connecting to the machine using remote desktop and a regular user account, we can run LabVIEW successfully and perform builds, either using labviewcli or by running a "Build Targets via CLI.vi" using the commandline.

 

However, when builds are started from the CI system, labview is started by the TeamCity CI Agent, which runs as a service using a special user account. This service account has administrative access to the machine. In this situation, LabVIEW fails to start. When running LabVIEW directly, the VI is never run. When running labviewcli, a timeout error connecting to the labview server eventually occurs, regardless of the length of the timeout configured in the labviewcli.ini. Interestingly, I can see the labview process is actually being started with the service user account, but it disappears immediately.

 

Unfortunately, I cannot login using the service account. Is there a way to make LabVIEW output a logfile or do you have an ideas, as to why labview might fail to start? Might this be a license issue?

 

Thank you and best regards,

Bart

0 Kudos
Message 1 of 4
(1,938 Views)

Hello Bart,

 

I don't sure that LabVIEW can output log file.

So as I understand when builds are started and then you are trying to run LabVIEW you are facing an issue?

Unfortunately there is no that much info about LabVIEW and Continuous Integration. I find only this document, if you haven't seen it yet it may be helpful.

__________________________________________
The best way to thank, is to give KUDOS
0 Kudos
Message 2 of 4
(1,807 Views)

Hello Bart,

If I understand your problem correctly, it is due to the limitations of the windows service account.

 

Here is a link with some explanation: https://confluence.jetbrains.com/display/TCD6/Known+Issues#KnownIssues-AgentrunningasWindowsServiceL...

 

You need to find the TeamCity Build Agent Service and change the user of the service. Here is a link to changing user for another service (not TeamCity Build Agent) https://www.microfocus.com/documentation/enterprise-developer/ed30/ESdotNET/GUID-00A022C3-2688-4B9D-....

 

Don't forget to start and stop the service, also make sure you read this too if you are looking to monitor performance: https://www.jetbrains.com/help/teamcity/setting-up-and-running-additional-build-agents.html#Settingu...

 

Hope this helps.


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
0 Kudos
Message 3 of 4
(1,803 Views)

Thank you for the suggestion. The root cause turned out to be that the service account did not have a valid LabVIEW license. After adding the service account to the LabVIEW users everything worked fine.

 

Bottom line, LabVIEW runs fine from a service account, so there is no need to change the user of the build agent.

0 Kudos
Message 4 of 4
(1,772 Views)