02-28-2022 09:32 AM
Hey All,
Executive Summary: Host can Ping, use NSV, Deploy Start Up App, but can not open a TCP connection for file transfer, Listener times out, Error 56.
Background: We have 5 similar test racks using cRIO-9068s. The cRIO is connected to the Host using a cross-over cable connected to a PCIe NIC inside the host to isolate the cRIO from the regular network. The Host is running LabVIEW 2015 SP1 (32-bit). On Rack A, the same compiled, LabVIEW 2015 SP1 (32-bit), software works great. On Rack C, the same software fails to connect over TCP to transfer a file. Rack C's Host computer can ping the cRIO. The LabVIEW project can Deploy the Real-Time Startup App to the cRIO successfully. The NSV(s) work as expected. The TCP connection for file transfer, initiated by the cRIO with the Host as a listener, times out on both ends with Error 56. I don't have Admin rights to the Host. IT is helping but they are sure there is not a firewall or port blocking issue. I looked at this knowledgebase article and I'm not sure what to try next.
Title of Article: Error 56: Timeout When Communicating Between LabVIEW and Network Devices - NI
Per the article I verified the timeout was 60 seconds. On the working machine, the file transfer connects, transmits and closes in 4-6 seconds, so 60 seconds seems like overkill. I also double checked the IP addresses, Host NIC is 192.168.0.2, cRIO is 192.168.0.1.
The Real-Time code watches the NSV for commands that indicate which case of a state machine select. The case for get_log_tcp opens a port with the host and prefixes the log string with the size of the log string and then sends the data over the open connection. The Host side sets the NSV to get_log_tcp, then "listens" at the port of the NIC card for the connection from the cRIO. I can't share the code for 'reasons.'
Thanks in advance for your help, and reading this far.
02-28-2022 09:39 AM
Hey All,
Executive Summary: Host can Ping, use NSV, Deploy Start Up App, but can not open a TCP connection for file transfer, Listener times out, Error 56.
Background: We have 5 similar test racks using cRIO-9068 at the end of a cross-over cable connected to a PCIe NIC inside the host to isolate the cRIO from the regular network. On Rack A, the same compiled, LabVIEW 2015 SP1 (32-bit), software works great. On Rack C, the same software fails to connect over TCP to transfer a file. Rack C's Host computer can ping the cRIO. The LabVIEW project can Deploy the Real-Time Startup App to the cRIO successfully. The NSV(s) work as expected. The TCP connection for file transfer, initiated by the cRIO with the Host as a listener, times out on both ends with Error 56. I don't have Admin rights to the Host. IT is helping but they are sure there is not a firewall or port blocking issue. I looked at this knowledgebase article and I'm not sure what to try next.
Article Title: Error 56: Timeout When Communicating Between LabVIEW and Network Devices - NI
Per the article I verified the timeout was 60 seconds. On the working machine, the file transfer connects, transmits and closes in 4-6 seconds. I also verified the IP and gateway. IP for Host NIC is 192.168.0.2, cRIO is 192.168.0.1, gateway is 255.255.255.0. Working rack has the same configuration.
The Real-Time code watches the NSV for commands that indicate which case of a state machine select. The case for get_log_tcp opens a port with the host and prefixes the log string with the size of the log string and then sends the data over the open connection. The Host side sets the NSV to get_log_tcp, then "listens" at the port of the NIC card for the connection from the cRIO.
Thanks in advance for your help, and reading this far.
03-29-2022 03:48 PM
Well many changes were tried, new machines, new software installs, even wireshark was used.
Wireshark showed the cRIO sending the TCP [SYN] request to the Host computer, but the host did not respond. The cRIO sent 5 requests at Zero time, 2 seconds, 4 seconds, 8 seconds, 16 seconds, and then timed out.
When the Host "calls" the cRIO, the cRIO accepts the connection and the file transfer proceeds. When the cRIO "calls" the host, the host doesn't pick up.
NI says that is a Windows issue and IT says there isn't anything left to try. Now I'm re-writing the code for the Host to call the cRIO.
Please let me know if you have an idea.
Thanks,
-Andrew
03-29-2022 05:53 PM
Try running "netstat -a -p tcp" and see if there is a listener on the port used for the file transfer. Have you tried running the host code as admin? There may be a policy set which blocks apps not running as admin from establishing a server. This does sound like a Windows thing is blocking access.