LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

error 63 and 60 from TCP Listen.vi

Hi All,

 

I got error 63 from TCP listen.vi and error 60  from retry.

 

Any idea of that?

 

Thanks a lot for any help.

 

Anne

0 Kudos
Message 1 of 5
(4,557 Views)

You'll need to provide more context.  Are you running one of the LabVIEW examples, or your own code?  Can you share your code? 

 

Did you look at the description for those error messages?  Error 60 is Network Address Currently in Use.  Most likely you're trying to listen on a port that some other service is already using, although maybe it's a firewall issue (I don't know what error you'd see, if any, if a firewall blocks your application from opening a listener).  I'm a little surprised you'd see 63 (Network Connection Refused) from TCP Listen, but the error text says that too can happen due to a firewall too (although I'd think that would be on the client, not server, side).  What port are you using?  Have you tried a different port?  Do you have a firewall enabled?

0 Kudos
Message 2 of 5
(4,554 Views)

Hi thanks for your reply.

 

I attached my testing code.

 

Some time it works and no problem at all.  Some time, error 63 with first try  and then error 60 with following retries.

 

thanks a lot for any help.

 

Anne

 

 

0 Kudos
Message 3 of 5
(4,499 Views)

The consequent error 60 is quite likely caused by the fact that Winsock does not close a socket immediately in order to handle lingering packets that might still be arriving for that socket. So your Listen tries to open a socket, but somehow gets refused that socket, but it has been allocated anyhow in the Winsock library and eventhough LabVIEW closes the socket (you do executed a TCP Close node even on error on the listen refnum do you?? ) Winsock needs some time to really deallocate that socket, and when you immediately retry the port is still in use.

 

Make sure to always close all refnums, also the listener refnum, even in error case and if that does not help add some delay before retrying to open the Listener again.

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 5
(4,493 Views)

Thanks for your suggestions. I will give a  try.

 

Thanks,

 

Anne

0 Kudos
Message 5 of 5
(4,488 Views)