LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CompactRIO 9063 slow to establish HTTP GET connection

Hi,

 

I was wondering if anyone had seen any issues with the new generation of CompactRIO making connections to http web services?

 

Basically I'm trying to do a http GET from a cRIO-9063 (LabVIEW 2014 sp1 RT), and the code which I have written runs with very low latency on Windows (apears to generate a reply instantly), but takes 5 seconds + on the cRIO target to reach the same result.

 

I have tried coding with both the standard HTTP GET and also writing my own function with the native TCP VIs to connect to the server on port 80, and I see the same behaviour (on RT). If I put timers into the code, it appears to be a delay at the initial TCP connect function, which is also a bit strange as I have set the connection "timeout" to 500ms (and it appears to take 5 seconds, then complete successfully).

 

My hunch, as I'm connecting to a URL not a static IP, is that the DNS on the network I am on is somehow suspicious of the call originating from the RT target, and quarantines it before allowing the connection. In the guts of the HTTP GET call LabVIEW does identify itself (User-Agent: NI LabVIEW below), but I would be surprised if the DNS server looks at this as it's text that is only sent once the connection is established.

 

GET http://xxx/getStatus?UserName=xxx&Password=xxx&RfidTagID=IABai2XfCKE=&Epc=unsQDgAAgFUJFTQk&DeviceID=Device-001 HTTP/1.1
User-Agent: National Instruments LabVIEW
Host: 127.0.0.1:88
Accept: */*

 

Anybody any thoughts? 

 

I'm still wondering whether the RIO is trying a call on the USB LAN port first & giving up after 5 seconds, but the IP/Subnet/Gateway for that is all set to 0.0.0.0 at the moment (it is disconnected).

 

Would be nice if it was something I didn't have to interact with IT over 🙂

 

Cheers,

 

Mark

 

Certified LabVIEW Architect
0 Kudos
Message 1 of 4
(2,911 Views)

I have found similar problems with doing any sort of DNS lookup on the Linux RT RIOs - I think the resolution is to make sure that your IP configuration points to a valid/accessible DNS server (e.g. one within your network or a public one - e.g. 8.8.8.8 for Google) or to use the IP address instead of a hostname/domain name.


LabVIEW Champion, CLA, CLED, CTD
(blog)
Message 2 of 4
(2,871 Views)

Hey buddy,

 

Sounds like a great idea! Glad someone else has seen the problem. DNS is currently pointed to the "Gateway" assigned to the RIO by the network via DHCP, but I've been told the network is a bit of a lash-up & they're going to upgrade it soon anyway. Maybe there's some Linux config setting buried somewhere??

 

How's the houseboat going?

 

Mark

Certified LabVIEW Architect
0 Kudos
Message 3 of 4
(2,868 Views)

Hah - I did wonder if it was the Mark Lee. Hope all is well down-under! The boat is going good - it's in the workshop this week having some upgrades (plugging the holes!) this week but all is good!

 

The DNS Server setting is available on the Network Configuration for the RIO:

2015-12-14_10-56-46.png

 

I'd check that it matches what you get from a PC on the same network and that it can access it. If you've also got a USB connection, then you're probably right that it will try both networks and may struggle finding a DNS server.

 

If you try changing the URL domain for it's IP address instead, you should find things will speed up - if that's the case then you need to get a valid DNS server IP. You could always try looking up the IP address periodically and then only using the IP address you find in your HTTP calls (e.g. replace the domain with the IP address that you looked up earlier)?

 

Hope that helps!


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 4 of 4
(2,863 Views)