ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with TCP Listen.vi under Linux

Solved!
Go to solution

I have a Linux machine that is configured to have two IP addresses (192.168.0.X), with one physical ethernet jack.  When running a program on it (employing TCP Listen.vi) to establish an ethernet connection to a remote machine, it works great.  If the program is re-entrant and I have two of the programs running simultaneously, each wired with a unique IP address and port number, it still works great.  If I use the same IP address for both of them, but unique port numbers, it still works great.  However, if I use unique IP addresses but the same port number for both of them, I get Error 60 (connection already in use).

 

For example,

 

192.168.0.11:6000 and 192.168.0.12:6001 --> OK

192.168.0.11:6000 and 192.168.0.11:6001 --> OK

192.168.0.11:6000 and 192.168.0.12:6000 --> Error 60

 

I've tried wiring in the specific IP address into TCP Listen.vi, to no avail.

 

Any ideas on why this might be occurring?

 

Thank you in advance.

0 Kudos
Message 1 of 4
(4,266 Views)
Attached is a whittled-down version of the software, which duplicates the problem. The executables were built on a SUSE 11.1 Linux machine running LabView 8.6.1, but I have included all the source code.  The two halves of the software are Main_Host.vi and Main_Client.vi.
0 Kudos
Message 2 of 4
(4,243 Views)
Solution
Accepted by topic author Chris_12345

Attached is a fix for the problem, after discussing this with an NI engineer.

 

Message 3 of 4
(4,214 Views)
Hello All,

The fixed version is based on the KnowledgeBase article titled "Why Do I Receive Error 60 from Create Listener for 60 Seconds?". Happy programming!
David G
Sales Engineer - SE Michigan & N Ohio
National Instruments
Message 4 of 4
(4,186 Views)