SystemLink Forum

cancel
Showing results for 
Search instead for 
Did you mean: 

NI Web Server keeps disconnecting G WebVI and LabVIEW clients

I have a web application deployed on a server. I am reading and writing to about 20 System Link tags on it. The writing is done by two LabVIEW EXEs running on separate machines (they acquire data from their respective test systems and write to the Tags once per minute). I also have to G WebVIs running on work laptops on a Chrome browser, to read the same Tags once per minute. Everything works, but approximately every 24 hours, I get errors on all 4 clients.

 

The LabVIEW EXEs show this error:

-251042,NI Skyline Utilities.lvlib:Parse HTTP Error.vi:5080001<ERR>
The web server responded with error 401 Unauthorized.

 

My LabVIEW EXE's handle the error by doing a disconnect and reconnect to the Web Server. That seems to work most of the time, but sometimes it takes 30 minutes of trying every minute to get connected. The G WebVIs also handle the error (but no disconnect / reconnect needed). Just retrying a few times make the error go away.

 

Since the interruption happens after ~ 24 hours, I am wondering if the Webserver auto-expires the connections? Would it be better for my applications to not stay connected all the time - meaning connect only when needed (i.e., every minute) and disconnect right away.

 

 

0 Kudos
Message 1 of 3
(169 Views)

I don't know for sure, but it is possible the session API key may be expiring. How are you handling the authentication? Are you just hard coding the credentials in your WebVI or are you allowing SL to handle it. 

 

You may already know this, but before you build and deploy your app to SL you "should" clear our the url, user name, password/api key. That should enable SL to manage the sessions.

0 Kudos
Message 2 of 3
(125 Views)

I am using the "Open Configuration HTTP.vi" shown here. The Server URL, UserName, Password are passed to the VI (sort of hard-coded, but these should not change at all).

RagMan_0-1739229931276.png

Not sure what you mean when you say I should delete all the inputs and let SL manage it by itself. Could you please provide an example or screenshot? 
Thank you.

0 Kudos
Message 3 of 3
(117 Views)