LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 63 in TCP Create Listener in Executable on deployment machines only

Solved!
Go to solution

Hi,

I have made a device server based on “TCP Named Service.lvproj” example shipped with my LabVIEW 2017. The server has a thread that communicates with a physical device and a thread that handles TCP requests from external client programs. During initialization, the TCP thread starts Named Service, exactly like in the example, and listens to the requests.

The program works flawlessly on a development machine, both in VI and executable. It runs perfectly on most of deployment (no LabVIEW installed, just RTE) machines, but on some of them (about 1/3 of the amount we tried) it gives Error 63 as soon as it tries to start Named Service.

Error63.png

Weirdest thing is that the error can start or stop after some Windows updates. 

What does not help (I did search “Error 63” related forum topics and nothing helped so far):

  • Playing with Windows Firewall, including turning it OFF.

What helps:

  • Installation of full LabVIEW (evaluation version). After LabVIEW is installed, error 63 disappears completely. I even uninstall LabVIEW right after the installation and the error still goes away.

I strongly suspect that there is nothing wrong with the code itself, rather Windows blocks TCP service/port created by LabVIEW Run-Time on some computers for some reason.

Any ideas what can be done to allow LabVIEW RTE to start TCP Named Service when Error 63 appears?

Thank you!

0 Kudos
Message 1 of 7
(3,966 Views)
Did you try doing a restart of the client PCs separately from the Windows update and LabVIEW installs? Are you opening a connection and leaving it open for the duration of the program, or are you opening/closing the session multiple times? My thought is that if the client has opened multiple connections over time without properly closing them, then you may be using up a large number of ports and eventually the TCP stack will run out of available ports. Restarting the computer (which I assume you do with the installations) would clear this out and allow the application to function properly again. If that is not the case, and given that you are disabling the firewall, I would use TCPView (https://docs.microsoft.com/en-us/sysinternals/downloads/tcpview) or a similar tool to see if you can determine what is going on behind the scenes.
0 Kudos
Message 2 of 7
(3,903 Views)

...

Any ideas what can be done to allow LabVIEW RTE to start TCP Named Service when Error 63 appears?

Thank you!


Check the Windows System log.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 7
(3,889 Views)

Cy_Rybicki,

 

Restart does not help.

I start server program and get the error immediately, as soon as Create Listener.vi runs inside. No client is running at this point, so no connections. On the development machine I can run NI Service Locator and see a port assigned to created Named Service. On problematic machines no port is assigned, so basically Named Service is not running. The problem, I think,is that Windows refuses to register this TCP service.

 

 

0 Kudos
Message 4 of 7
(3,874 Views)
Solution
Accepted by topic author bratdv

Have you checked that the Service Locater Windows Service is properly installed and started on the affected machines? With LabVIEW Full installation this always gets done but with simply installing your compiled executable it may not, depending on what runtime engine and additional packages you install with the application!

Rolf Kalbermatter
My Blog
Message 5 of 7
(3,842 Views)

rolfk,

this is looking close to solving my puzzle.

On problematic machines, NI Service Locator is not running.

This is what I have on a machine with the problem:

 

Capture 2.JPG

I am not sure what "PSP" means, but it is not nisvcloc.exe.

 

Capture 1.JPG

 

http://localhost:3580/dumpinfo? returns error page on RTE-only machine.

On "good" machines I see NI Service Locator in the list of services.

 

Now, correct question, the one I should have started with:

how to install NI Service Locator or start it if it is not running???

 

I found this topic: https://forums.ni.com/t5/LabVIEW/kNIFarmResultServerNotResponding-LabVIEW-Error-Code-123011/m-p/2575...

 

The instructions are:

***********

Look for 'C:\Program Files (x86)\National Instruments\Shared\niSvcLoc\nisvcloc.exe'. If it doesn't exist, stop here and let me know.

Navigate to 'Start -> All Programs -> Accessories -> Command Prompt' and right-click to run as Administrator.

Enter the following command:

sc create NiSvcLoc binPath= "C:\Program Files (x86)\National Instruments\Shared\niSvcLoc\nisvcloc.exe -s" start= auto DisplayName= "NI Service Locator"

Reboot your machine, and see if the NI System Web Server is running.

*****

 

I do have 'C:\Program Files (x86)\National Instruments\Shared\niSvcLoc\nisvcloc.exe'. When running the command above I get "the service is already registered". 

In Task manager - Services I see NiSvcLoc in the list but it is stopped and cannot be started - error says Operation could not be completed. Access is denied.

 

I guess I will dig deeper into how to start NiSvcLoc. Maybe has to do with antivirus during RTE installation.  

 

 

 

 

0 Kudos
Message 6 of 7
(3,821 Views)

I solved the problem by deleting and remaking NI Service Locator.

The steps to do this (from here https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P6fLSAS&l=en-US😞

  1. Open cmd.exe and run the command: sc delete nisvcloc 
  2. Restart the computer
  3. Open cmd.exe and run the command: sc create NiSvcLoc binPath= "C:\Program Files (x86)\National Instruments\Shared\niSvcLoc\nisvcloc.exe -s" start= auto DisplayName= "NI Service Locator"
  4. Restart the computer or manually start NI Service Locator.

My main problem was that NI Service Locator was not in the list of available services, therefore I did not know that it has problem starting. After remaking, it appears in the list and can be started.

 

Thanks everyone and, especially, rolfk for pointing out to Service Locator.

Why, in some cases, the service is not installed properly during RTE installation remains an open question.

0 Kudos
Message 7 of 7
(3,791 Views)