This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

LM crash
#11
(25.10.2018, 10:02)admin Wrote: Do you mean cloud access or remote http services?

It can be just coincidence but since I turned remote requests off my LM is still on with no interruption. Unfortunately the issue is hardly reproducible because it happens once or twice a day.

Remote HTTP access (object set as "export", Remote service Enabled)
I use this service for data exchange between our attendance system and KNX.
The attendance system simply sends update request when doors are opened/closed.


The request looks like this: http://LM_name/scada-remote?m=json&r=grp...1;&value=1


Another interesting part is sometimes response from LM to remote request is extremely slow. I had to set timeout for reply to 20s.

Code written in C# I use in the interface between ACS and LM is simple and is below. It uses synchronous GetResponse .NET 4.0 functionality.

Code:
public HttpStatusCode HttpGetSync(string urlParams)
       {
           string uri;
           HttpStatusCode statusCode = HttpStatusCode.BadRequest;
               
           if (!(restapi.url.Length > 0)) return statusCode;
           if (!(urlParams.Length > 0)) return statusCode;
           uri = restapi.url + urlParams;
           
           HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri);
           if (netCredential != null)
           {
               request.Credentials = netCredential;
               request.PreAuthenticate = true;
           }
           request.Method = "GET";
           if (restapi.timeout > 0)
           {
               request.Timeout = restapi.timeout;
               request.ServicePoint.ConnectionLeaseTimeout = restapi.timeout;
               request.ServicePoint.MaxIdleTime = restapi.timeout;
           }
           request.ContentType = "text/html";
           request.CachePolicy = reqCachePolicy;
           request.Proxy = null;
           
           request.KeepAlive = false;

           using (HttpWebResponse response = (HttpWebResponse)request.GetResponse()) {
               statusCode=response.StatusCode;
               response.Close();
           } ;
           request.Abort();
           
           GC.Collect();

           return statusCode;
       }

Attached Files Thumbnail(s)
   
LM5Lp, firmware: 2018.08.22 and 2021.12.15, FlashSYS v2, ARMv7 Processor rev 5 (v7l), kernel 4.4.151 and 4.4.259
Reply


Messages In This Thread
LM crash - by Thomas - 22.10.2018, 11:31
RE: LM crash - by admin - 22.10.2018, 11:40
RE: LM crash - by Thomas - 22.10.2018, 11:50
RE: LM crash - by admin - 22.10.2018, 12:29
RE: LM crash - by Thomas - 22.10.2018, 13:10
RE: LM crash - by admin - 22.10.2018, 13:45
RE: LM crash - by Thomas - 24.10.2018, 17:04
RE: LM crash - by admin - 24.10.2018, 18:01
RE: LM crash - by Thomas - 25.10.2018, 09:50
RE: LM crash - by admin - 25.10.2018, 10:02
RE: LM crash - by Thomas - 25.10.2018, 12:36
RE: LM crash - by admin - 25.10.2018, 13:55
RE: LM crash - by Thomas - 26.10.2018, 11:39

Forum Jump: