From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

UDP Open Error 60 then Error 54 - can't open a specific port that doesn't seem to be in use

Solved!
Go to solution

Hi,

 

I have reviewed all of the discussion forum posts related to error 60 and error 54 for UDP Open, but I am still having some problems.  I have tried this on Windows 7 and 10 both with LabVIEW 2015.

 

I am trying to simply call Open UDP on port 5000.  The application is for a test station to be on a private network with a device that will broadcast its IP address via UDP on port 5000 after it receives the IP address via DHCP.  The device runs some webservices, so the IP address is needed to call webservice methods.

 

When i first started, I received error 60 indicating the port is in use.  Both calling netstat -a through cmd.exe as well as using the Windows program Resource Monitor showed nothing was using port 5000.

 

I then added SocketSetReuseAddr=TRUE to LabVIEW.ini, and started getting Error 54 indicating the net address input is ill-formed. I started with it blank, and then tried using the static IP of my network card as well as localhost, but the error still occurs.

 

 

On this page (http://www.ni.com/white-paper/12402/en/) I read that NI GPIB-ENET uses TCP port 5000 and I do have the NI GPIB drivers installed on my development machine, so I was wondering if this was causing a conflict.  

However, I created an installer for the VI that i created and tried it on a machine that did not have LabVIEW and the same error occurred.

 

My last thought was that this might have been caused by a network configuration that my company's computers are configured with.  But I installed this on my own personal laptop and get the same errors (60 and then 54 when SocketSetReuseAddr=TRUE is added to the .ini file).

 

Any help would be appreciated.  The VI that I am trying this with is attached.

 

Thanks,

Gary

0 Kudos
Message 1 of 4
(3,657 Views)

On my windows 10 PC, UDP port 5000 is in use. (netstat -an)

Message 2 of 4
(3,639 Views)

Thanks.  I hadn't tried netstat with "-an".  I do see that port 5000 is in use.

 

Should the LabVIEW.ini setting (SocketSetReuseAddr=TRUE) allow me to open the port anyways?  What is the setting supposed to do?  Does it only apply to TCP sockets?

 

Does anyone know why the error changes to error 54 after the SocketSetReuseAddr=TRUE setting is added?

 

Thanks,

Gary

0 Kudos
Message 3 of 4
(3,585 Views)
Solution
Accepted by topic author glstill

I just learned that the LabVIEW runtime engine does something that uses UDP Port 5000.  On a PC that didn't have any LabVIEW programs installed I confirmed with netstat -an that port 5000 was not being used.  I then installed the LabVIEW program that only had the executable and the runtime engine, and determined that port 5000 is now in use as well as several other UDP ports.

 

Anyone know why this is occurring?

0 Kudos
Message 4 of 4
(3,581 Views)