G-CLI icon indicating copy to clipboard operation
G-CLI copied to clipboard

Handle NI Service Locator Not Running

Open jimkring opened this issue 3 years ago • 2 comments

My use case comes up during CI/CD automation...

When doing a new install of LabVIEW and G-CLI 3.0 I noticed when I try to run G-CLI that it produces an error stating that the NI Service Locator cannot be found. This might go away after a reboot, yet I wonder if it would be possible for G-CLI to try starting up the NI Service Locator service during installation or when running a G-CLI command.

Thanks for considering this request.

jimkring avatar Nov 20 '22 17:11 jimkring

Great idea - I'll take a look at what APIs we need to access but I think it must be possible

JamesWiresmith avatar Nov 22 '22 09:11 JamesWiresmith

FYI, on a Linux container, NI Service Locator can be started by running the nisvcloc command.

I'll generally add the following command (below) to the beginning of my scripts, which runs the nisvcloc asynchronously and ignores any output messages (so they don't show in the console).

nisvcloc > /dev/null 2>&1 &

I might recommend that, if g-cli cannot connect to the NI Service Locator, it should start it up by issuing the above command and then retry for a reasonable timeout period.

jimkring avatar Mar 03 '24 20:03 jimkring