Usually I’ve been trying to run all my testing pipeline using docker images (docker image repo). Mainly because it is a very clean and nice way to run reproducible tests, as each container has a limited life cycle and gets destroyed after a job.
Last week (for some reason that I am still trying to figure out) I had issues trying to run some tests on LabVIEW Realtime/FPGA Image, yes, it works sometimes, but sometimes there are some dependencies missing that are not installed during the docker build, because there are some workarounds to make it work, and probably they are the issue here.
If you want to know what I am talking about, check out 7×7 in GLA by Christian Butcher about Docker and LabVIEW.
So, I had to spin up a Virtual Machine for doing this job while I don’t fix the problem.
Installing and Running
All good, VM with Windows 10 installed, LabVIEW 2020, Real Time Module, FPGA, VI Analyzer Toolkit, Caraya, Licensed LV. Well, ready to go.
Register, install and running (as administrator):
.\gitlab-runner register .\gitlab-runner install .\gitlab-runner start
Yey, just use it now, right? I over simplified the “register” step, but the link above details everything.
Call LabVIEWCLI in your pipeline configuration file (gitlab-ci.yml) and then:
What? I did everything. 😦
Let’s debug and find a solution for this problem.
- Opened the LabVIEW prior to calling in the pipeline. Well, it works, not a problem with the runner.
The next two items I consider to be 80% of the problems with LabVIEW in automated software engineering processes.
- Checked the dependencies. Yep, everything installed, it runs ok when LabVIEW is opened.
- Licensing. I had this same problem when I was trying to solve problems with licensing and docker. But, yes, I opened the License Manager and everything was ok.
Looking for some answers around
In forums, I did find some solutions:
- Change TCP ports (didn’t work)
- Check Firewall (ok)
- Use G-CLI. Great, but, I’ve already built some Operations (Caraya and Code Quality) around LabVIEW CLI, changing it, would have to rewrite some of these VI’s(btw. I wish LabVIEWCLI were as verbose as G-CLI, sometimes you have to guess errors in LVCLI).
It turns out that, the problem was the third one, licensing.
Re-reading the documentation of the gitlab-runner it says that for default installation:
“Run service using Built-in System Account”
Hum…. System Account is not tied to any license so it must be it. Looking at Task Manager there it was the Gitlab-Runner as Service in System Account.
Right below there is a guide for running using as a specific user account.
Stop, uninstall, install, start (don’t need to mess with register step):
.\gitlab-runner stop .\gitlab-runner uninstall .\gitlab-runner.exe install --user ENTER-YOUR-USERNAME-WITH-LV-LICENSE --password ENTER-YOUR-PASSWORD .\gitlab-runner start
Easy? Not that much, after doing that, an error was printed:
The service did not start due to a logon failure
- Check Password – Ok
- Check Syntax – Ok
The end solution was in a FAQ section:
The user is not allowed to run anything as a service, so the steps to fix are below:
This will only work in Windows that has group policy enabled (Windows 10 Pro). Windows Home does not have this feature.
After that, run again the start command again and probably you won’t have any errors:
Now you may call the LabVIEWCLI again and it will work flawlessly (fingers crossed).
There is a down side, you are not able to see LabVIEW running anymore, in case you want to debug. But, there are other ways to get around it.
I hoped this will help anyone who is trying to run in your machine, or in a VM.
Until the next one…