06-16-2021 09:20 AM
Hello,
when trying to open the NI Package Manager on a machine that is connected to a local network which does not have access to the internet, it gets stuck on the loading screen and never finishes booting.
Apparently this is related to the Package Manager trying to load some information from NI.com which it cannot access and apparently a timeout "never" (maybe after 30+ minutes it would?) kicks in.
I have browsed the forums and NI help, but the solutions either do not work in my case or are not applicable:
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000wzlOCAQ&l=de-DE
https://forums.ni.com/t5/SystemLink/NIPM-Ignore-Built-In-Feeds/td-p/3866603?profile.language=en
We install the Package Manager on a larger number of machines worldwide and cannot expect every user to go through series of steps manually in order to simply open up the Package Manager.
I am looking for a way to programmatically stop the Package Manager from trying to access any online data or to set the timeout for this attempt to e.g. 1s so the Package Manager opens up in an acceptable amount of time.
Any help is appreciated.
Thanks,
Stefan
Solved! Go to Solution.
06-21-2021 09:40 PM - edited 06-21-2021 09:41 PM
Hi Stefan,
Just to validate the root cause (and not a solution of course), with a machine in this state, if you unplug its network and\or close all wireless connections - then does NIPM start normally?
06-22-2021 02:30 AM
I would not call it normally but it does start, yes.
An error message will pop up telling something like Unable to update feeds (I cannot reproduce it at the moment) and after pressing ok the NI Package Manager will open up.
06-22-2021 05:51 PM
A single switch to shut off ni.com access is near the top of my personal wishlist, but it sadly doesn't exist today. There are two main things that need to happen to ensure a fast launch in a network environment like this.
First, unregister all feeds pointing at ni.com. This PowerShell script will do that (needs to be run as admin):
# Look up nipkg path
$nipkgExe = Get-ItemPropertyValue -Path "HKLM:\Software\National Instruments\NI Package Manager\CurrentVersion" -Name "CLIExecutableFullPath"
# Remove main feed if registered
$mainFeedInstalled = & $nipkgExe list-installed ni-package-manager-released-feed
if ($mainFeedInstalled) { & $nipkgExe remove ni-package-manager-released-feed -y --force-essential }
# Remove all other ni.com feeds
& $nipkgExe feed-list | ?{$_ -match "https?://download.ni.com"} | %{($_ -split "`t")[0]} | %{& $nipkgExe feed-remove "$_"}
Second, disable access to the Browse Products tab. The only method for doing that today outside of opening the application and modifying the setting via the UI is to replace the NIPackageManager.exe.config file in the Package Manager install directory with one that pre-disables the setting. Such a file is attached.
06-23-2021 12:59 AM
Hi Jonathan,
thanks alot for the detailed explanation!
We will test your solution in our environment and give feedback if it worked as expected.
07-22-2021 04:38 AM
The solution worked all fine in our environment during the tests and should be implementable in our custom installer.
However I am not quite sure I understand the solution 100%.
Why do we remove all of the feeds and disable the BrowseProducts in that ini file?
Shouldn't the later be sufficient?
Or in other words, if someone manually installs some tool using an offline installer (and thereby adds feeds again?), will that possibly cause the issue to reappear and that powershell script needs to be executed again?
07-22-2021 03:59 PM
When Package Manager launches, it initiates two network-based operations that have to complete before the splash screen will close. First, it fetches a current copy of each of the registered feeds and second, it initializes the web API that powers the Browse Products tab (and a couple other less user-visible services).
Those two operations run entirely independent of one another, so that's why there are two steps in order to disable them. (and why one killswitch to rule them all would be helpful)
With the Browse Products tab enabled, the only way to get new product feeds registered is if you install them using an online installer or if you register them manually. Running an offline installer should not result in any new feeds being registered when the Browse Products tab is disabled.
However, upgrading to a new version of Package Manager (via any method) will result in the Package Manager main feed being re-registered and will overwrite NIPackageManager.exe.config, so these steps will need to be re-run any time Package Manager itself gets upgraded.
07-23-2021 12:55 AM
Thank you so much for taking your time with the explanation.
That should be an expedient (even if not that pretty) solution for us.
10-11-2021 11:31 AM
Related: NI Package Manager 21.3 now caches a list of domains that are not accessible, including timeout errors, and will not attempt to connect to its feeds for the duration of the process. This should partially mitigate the issue reported in this post.
Reference: Bug "1512240" in Package Manager 21.3 Bug Fixes.
10-12-2021 03:30 AM
Hello Mr. Richardson,
thanks for taking your time to refer to the Bug Fixes of the new Package Manager version 21.3 in this forum post.
We will make sure to include the new version of the Package Manager once we update our custom installer.