LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI AWS toolkit generating error.

Solved!
Go to solution

Hi Community,

 

I am currently working on a project where I have to upload the generated report(.html) to AWS S3 server. I had tried using example(Upload File to Bucket.vi) provided by the NI cloud toolkit for AWS. The vi is giving error as shown below,

Error 59 occurred at LabVIEWHTTPClient.lvlib:GET.vi:390001

Possible reason(s):

LabVIEW: (Hex 0x3B) The network is down, unreachable, or has been reset.

Complete call chain:
LabVIEWHTTPClient.lvlib:GET.vi:390001
NI_AWS_Core.lvlib:HTTP Request.lvclass:Send API Request v4.vi
NI_AWS_Core.lvlib:HTTP Request.lvclass:Make HTTP Request v4.vi:480001
NI_AWS_Core.lvlib:HTTP Request.lvclass:Low-Level HTTP Request AWS v4.vi:4270001
NI_AWS_S3.lvlib:Bucket.lvclass:List Buckets.vi
NI_AWS_S3.lvlib:Bucket.lvclass:Obtain Bucket.vi
Upload File to Bucket.vi

Also I tried connecting using the Access Key and secret key from cloudberry explorer, to confirm if the credentials are working. I could establish the connection from cloudberry.

I have attached the example vi for reference.

I had tried debugging and could not find a solution. It will be really helpful if someone could help.

Thank you.

 

 

0 Kudos
Message 1 of 6
(1,839 Views)
Solution
Accepted by S_137

Can you try running this example on your system:

 

[LabVIEW 20xx]\examples\Application Control\VI Server\Asynchronous Call By Reference\Benchmarking Asynchronous Calls.vi

 

This example has nothing to do with AWS, but it does send HTTP GET requests to various URLs via raw TCP calls. Before running the example, though, create an indicator that displays the return values for the GETs:

 

Darren_0-1632770110861.png

 

If this example works fine (i.e. if those strings display valid HTTP responses), then there may be an issue with either the HTTP API or something AWS-specific. But if this example doesn't return any responses for the GETs, then your system has a fundamental network connection issue. Perhaps you need to investigate your firewall settings to ensure that LabVIEW isn't blacklisted?

0 Kudos
Message 2 of 6
(1,777 Views)

Thank you Darren for your response. I did try the example and there is no response. I am trying this using my Office laptop and I believe the issue could be in my network settings.

Moving on, I will try it running in my personal laptop and update here.

0 Kudos
Message 3 of 6
(1,762 Views)

Hi, did you have any luck? I started getting the same error in the last couple of weeks, code was working perfectly prior that for over a year. Thanks

0 Kudos
Message 4 of 6
(1,728 Views)

Do your AWS services use a HTTPS URL? There is a good chance that everything is caused by expired root certificates used by the AWS service. The problem in that case is that the LabVIEW HTTP Client VIs use their own certificate store bundle that is installed together with the LabVIEW HTTP Client VIs and not automatically updated, so when a root certificate in there expires, the HTTPS server using that root certificate can not be verified anymore. There was an error with Let's Encrypt provided certificates whose old root CA expired on September 30, and AWS is one of the funders of the Let's Encrypt initiative, so quite likely to use their infrastructure.

 

The solution is explained here: https://forums.ni.com/t5/LabVIEW/Is-TLS-broken-in-LabVIEW-since-around-the-start-of-October/m-p/4184...

 

Basically you need to replace the ca-bundle.crt file located in "C:\Program Files (x86)\National Instruments\Shared\nicurl" with the latest CA certificates extracted from Mozilla from the curl website (best to backup the original LabVIEW file though!).

 

The problem should be also solved when using LabVIEW 2021 and the native LabVIEW TCP nodes with integrated TLS support. That is however separate from the HTTP Client VIs.

 

The HTTP Client VIs are based on an external shared library consisting of libcurl which in turn uses a private copy of the OpenSSL library but not the latest version.

 

The LabVIEW 2021 native TCP nodes integrate directly with a different newer OpenSSL version that is configured to use the OS provided certificate store which is kept up to date through Windows Update Service. But the TCP nodes are raw TCP and to get  HTTP one would need to implement the HTTP protocol on top of them in LabVIEW, so replacing the HTTP Client VIs is not a trivial thing to do.

Rolf Kalbermatter
My Blog
0 Kudos
Message 5 of 6
(1,714 Views)

Hi,

 

It started working after turning off my firewall.

0 Kudos
Message 6 of 6
(1,709 Views)