LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ssl web service closes connection

Solved!
Go to solution

I have a web service running on my pc which a crio posts to.  Everything works well when ssl and the authentication key is disabled.  When I enable ssl and the authentication key and the web server is published,  I receive a header that says Connection: Closed after 200 messages.  This 200 message limit is repeatable.  

 

I'm using the Labview Client VI's to open the connection, SSL (labview's own CA), and setting the API key.  But it still closes the connection.  I see in the web service, I have options for creating and managing a session which I'm not sure if I need to do, I thought the OpenHandle client would manage this?.  Is there a way to explore why the connection was closed?  

 

The system automatically reconnects, but I notice a significant bump (30 - 40%) in crio cpu usage when the connection is closed and reconnected.  

 

Are there some LabVIEW SSL examples out there or examples showing the use of the Web Service Session VI's?

 

Thanks

0 Kudos
Message 1 of 4
(3,143 Views)

More info:

 

The Keep-Alive header is counting down from 200.  When I hit zero, the web service closes the connection.  I don't see a way to get to the keep-alive header in the client vi's. Any suggestions?

0 Kudos
Message 2 of 4
(3,132 Views)

By the way, this issue is not restricted to the ssl setup only.... Maybe a little misleading in the subject

 

I can modifiy the server header to change the keep alive (using the web request set http header vi) but that doesn't change the server's configuration.  Is there something I can add/modify to the NISystemWebServer.conf file that can modify this property similar to the way you can change the number of allowable connections to the server?

0 Kudos
Message 3 of 4
(3,105 Views)
Solution
Accepted by topic author user50

If you capture requests to a LabVIEW 2014 Web Service in the browser (like using Chrome Developer Tools) you may see something like this:

Capture3.PNG

If you take the server field and make a clever Google search for "Embedthis MaxKeepAliveRequests" you might see this: https://github.com/embedthis/appweb-3/blob/master/all/appweb.conf

If you found a Shared NI WebServer file named NIWebAppServer.conf that looks somewhat similar to the other file, and made a backup, then you could add the following line and restart the computer (or restart the NIApplicationWebServer service):

Capture4.PNG

If after the computer (or service) is restarted you went to chrome and tried again you may see this:

Capture5.PNG

If you don't see that or if you broke everything, be glad that you made a backup, and whoopsies.

 

Edit: Also if the images actually upload this post might make more sense


Milan
Message 4 of 4
(3,089 Views)