JW

Forum Replies Created

Viewing 15 posts - 106 through 120 (of 160 total)
  • Author
    Posts
  • in reply to: Additional calculation triggering #8467
    JW
    Participant

    ArchiveDAT .dat files only stores the final value.
    You will need to calculate the value on your program, then write the value to the file.

    I usually write a script to convert my legacy data from other system to a excel with 2 sheets, (x axis for cnl no., y axis for datetime), 1 table for value, 1 table for stat. Then I write formulas in excel to calculate the data, and modify data manually if needed.

    Then run another program to convert excel to scada .dat file.

    in reply to: Mono high cpu usage #8466
    JW
    Participant

    A regular error appeared every day at around 00:00, but doesn’t look like the cause.

    can I avoid this error by refresh the web regularly, e.g. every 1 or 12 or 24 hour(s)?

    2021-02-21 00:00:42 <opticalsensing><www-data><ACT> Initialize common web application data
    2021-02-21 00:00:42 <opticalsensing><www-data><ACT> Connect to SCADA-Server "localhost"
    2021-02-21 00:00:42 <opticalsensing><www-data><ACT> Refresh the tables of the configuration database
    2021-02-21 00:00:43 <opticalsensing><www-data><ACT> Fill input channels properties
    2021-02-21 00:00:43 <opticalsensing><www-data><ACT> Fill output channels properties
    2021-02-21 00:00:43 <opticalsensing><www-data><ACT> Fill input channel statuses properties
    2021-02-21 00:00:43 <opticalsensing><www-data><EXC> Error getting extended current data by the filter where channels= , view id=1:
    Scada.ScadaException: User not logged on.
      at Scada.Web.UserMonitor.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x0001d] in <82bda2c3c590430bb1596f945ba003f0>:0 
      at Scada.Web.AppData.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x00006] in <82bda2c3c590430bb1596f945ba003f0>:0 
      at Scada.Web.ClientApiSvc.GetCurCnlDataExt (System.String cnlNums, System.String viewIDs, System.Int32 viewID) [0x00000] in <82bda2c3c590430bb1596f945ba003f0>:0 
    2021-02-21 00:00:46 <opticalsensing><www-data><EXC> Error getting events by the filter where channels= , view id=1:
    Scada.ScadaException: User not logged on.
      at Scada.Web.UserMonitor.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x0001d] in <82bda2c3c590430bb1596f945ba003f0>:0 
      at Scada.Web.AppData.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x00006] in <82bda2c3c590430bb1596f945ba003f0>:0 
      at Scada.Web.ClientApiSvc.GetEvents (System.Int32 year, System.Int32 month, System.Int32 day, System.String cnlNums, System.String viewIDs, System.Int32 viewID, System.Int32 lastCount, System.Int32 startEvNum, System.Int64 dataAge) [0x00000] in <82bda2c3c590430bb1596f945ba003f0>:0 
    2021-02-21 00:00:46 <opticalsensing><www-data><EXC> Error getting events by the filter where channels= , view id=1:
    Scada.ScadaException: User not logged on.
      at Scada.Web.UserMonitor.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x0001d] in <82bda2c3c590430bb1596f945ba003f0>:0 
      at Scada.Web.AppData.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x00006] in <82bda2c3c590430bb1596f945ba003f0>:0 
      at Scada.Web.ClientApiSvc.GetEvents (System.Int32 year, System.Int32 month, System.Int32 day, System.String cnlNums, System.String viewIDs, System.Int32 viewID, System.Int32 lastCount, System.Int32 startEvNum, System.Int64 dataAge) [0x00000] in <82bda2c3c590430bb1596f945ba003f0>:0 
    2021-02-21 00:00:46 <opticalsensing><www-data><EXC> Error getting extended current data by the filter where channels= , view id=1:
    Scada.ScadaException: User not logged on.
      at Scada.Web.UserMonitor.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x0001d] in <82bda2c3c590430bb1596f945ba003f0>:0 
      at Scada.Web.AppData.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x00006] in <82bda2c3c590430bb1596f945ba003f0>:0 
      at Scada.Web.ClientApiSvc.GetCurCnlDataExt (System.String cnlNums, System.String viewIDs, System.Int32 viewID) [0x00000] in <82bda2c3c590430bb1596f945ba003f0>:0 
    2021-02-21 00:00:47 <opticalsensing><www-data><EXC> Error getting events by the filter where channels= , view id=1:
    Scada.ScadaException: User not logged on.
      at Scada.Web.UserMonitor.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x0001d] in <82bda2c3c590430bb1596f945ba003f0>:0 
      at Scada.Web.AppData.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x00006] in <82bda2c3c590430bb1596f945ba003f0>:0 
      at Scada.Web.ClientApiSvc.GetEvents (System.Int32 year, System.Int32 month, System.Int32 day, System.String cnlNums, System.String viewIDs, System.Int32 viewID, System.Int32 lastCount, System.Int32 startEvNum, System.Int64 dataAge) [0x00000] in <82bda2c3c590430bb1596f945ba003f0>:0 
    2021-02-21 00:00:47 <opticalsensing><www-data><EXC> Error getting extended current data by the filter where channels= , view id=1:
    Scada.ScadaException: User not logged on.
      at Scada.Web.UserMonitor.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x0001d] in <82bda2c3c590430bb1596f945ba003f0>:0 
      at Scada.Web.AppData.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x00006] in <82bda2c3c590430bb1596f945ba003f0>:0 
      at Scada.Web.ClientApiSvc.GetCurCnlDataExt (System.String cnlNums, System.String viewIDs, System.Int32 viewID) [0x00000] in <82bda2c3c590430bb1596f945ba003f0>:0 
    2021-02-21 00:00:48 <opticalsensing><www-data><EXC> Error getting events by the filter where channels= , view id=1:
    Scada.ScadaException: User not logged on.
      at Scada.Web.UserMonitor.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x0001d] in <82bda2c3c590430bb1596f945ba003f0>:0 
      at Scada.Web.AppData.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x00006] in <82bda2c3c590430bb1596f945ba003f0>:0 
      at Scada.Web.ClientApiSvc.GetEvents (System.Int32 year, System.Int32 month, System.Int32 day, System.String cnlNums, System.String viewIDs, System.Int32 viewID, System.Int32 lastCount, System.Int32 startEvNum, System.Int64 dataAge) [0x00000] in <82bda2c3c590430bb1596f945ba003f0>:0 
    2021-02-21 00:00:48 <opticalsensing><www-data><EXC> Error getting extended current data by the filter where channels= , view id=1:
    Scada.ScadaException: User not logged on.
      at Scada.Web.UserMonitor.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x0001d] in <82bda2c3c590430bb1596f945ba003f0>:0 
      at Scada.Web.AppData.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x00006] in <82bda2c3c590430bb1596f945ba003f0>:0 
      at Scada.Web.ClientApiSvc.GetCurCnlDataExt (System.String cnlNums, System.String viewIDs, System.Int32 viewID) [0x00000] in <82bda2c3c590430bb1596f945ba003f0>:0 
    2021-02-21 00:00:49 <opticalsensing><www-data><EXC> Error getting events by the filter where channels= , view id=1:
    Scada.ScadaException: User not logged on.
      at Scada.Web.UserMonitor.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x0001d] in <82bda2c3c590430bb1596f945ba003f0>:0 
      at Scada.Web.AppData.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x00006] in <82bda2c3c590430bb1596f945ba003f0>:0 
      at Scada.Web.ClientApiSvc.GetEvents (System.Int32 year, System.Int32 month, System.Int32 day, System.String cnlNums, System.String viewIDs, System.Int32 viewID, System.Int32 lastCount, System.Int32 startEvNum, System.Int64 dataAge) [0x00000] in <82bda2c3c590430bb1596f945ba003f0>:0 
    2021-02-21 00:00:50 <opticalsensing><www-data><EXC> Error getting extended current data by the filter where channels= , view id=1:
    Scada.ScadaException: User not logged on.
      at Scada.Web.UserMonitor.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x0001d] in <82bda2c3c590430bb1596f945ba003f0>:0 
      at Scada.Web.AppData.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x00006] in <82bda2c3c590430bb1596f945ba003f0>:0 
      at Scada.Web.ClientApiSvc.GetCurCnlDataExt (System.String cnlNums, System.String viewIDs, System.Int32 viewID) [0x00000] in <82bda2c3c590430bb1596f945ba003f0>:0 
    2021-02-21 00:00:50 <opticalsensing><www-data><EXC> Error getting events by the filter where channels= , view id=1:
    Scada.ScadaException: User not logged on.
      at Scada.Web.UserMonitor.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x0001d] in <82bda2c3c590430bb1596f945ba003f0>:0 
      at Scada.Web.AppData.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x00006] in <82bda2c3c590430bb1596f945ba003f0>:0 
      at Scada.Web.ClientApiSvc.GetEvents (System.Int32 year, System.Int32 month, System.Int32 day, System.String cnlNums, System.String viewIDs, System.Int32 viewID, System.Int32 lastCount, System.Int32 startEvNum, System.Int64 dataAge) [0x00000] in <82bda2c3c590430bb1596f945ba003f0>:0 
    2021-02-21 00:00:51 <opticalsensing><www-data><EXC> Error getting extended current data by the filter where channels= , view id=1:
    Scada.ScadaException: User not logged on.
      at Scada.Web.UserMonitor.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x0001d] in <82bda2c3c590430bb1596f945ba003f0>:0 
      at Scada.Web.AppData.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x00006] in <82bda2c3c590430bb1596f945ba003f0>:0 
      at Scada.Web.ClientApiSvc.GetCurCnlDataExt (System.String cnlNums, System.String viewIDs, System.Int32 viewID) [0x00000] in <82bda2c3c590430bb1596f945ba003f0>:0 
    2021-02-21 00:00:51 <opticalsensing><www-data><EXC> Error getting events by the filter where channels= , view id=1:
    Scada.ScadaException: User not logged on.
      at Scada.Web.UserMonitor.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x0001d] in <82bda2c3c590430bb1596f945ba003f0>:0 
      at Scada.Web.AppData.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x00006] in <82bda2c3c590430bb1596f945ba003f0>:0 
      at Scada.Web.ClientApiSvc.GetEvents (System.Int32 year, System.Int32 month, System.Int32 day, System.String cnlNums, System.String viewIDs, System.Int32 viewID, System.Int32 lastCount, System.Int32 startEvNum, System.Int64 dataAge) [0x00000] in <82bda2c3c590430bb1596f945ba003f0>:0 
    2021-02-21 00:00:52 <opticalsensing><www-data><EXC> Error getting extended current data by the filter where channels= , view id=1:
    Scada.ScadaException: User not logged on.
      at Scada.Web.UserMonitor.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x0001d] in <82bda2c3c590430bb1596f945ba003f0>:0 
      at Scada.Web.AppData.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x00006] in <82bda2c3c590430bb1596f945ba003f0>:0 
      at Scada.Web.ClientApiSvc.GetCurCnlDataExt (System.String cnlNums, System.String viewIDs, System.Int32 viewID) [0x00000] in <82bda2c3c590430bb1596f945ba003f0>:0 
    2021-02-21 00:00:52 <opticalsensing><www-data><ACT> User information has been added. IP address: ::1. Session: 036AB7C0E285F5A1829AE338
    2021-02-21 00:00:52 <opticalsensing><www-data><ACT> Login without a password: lhp_admin (Dispatcher). IP address: ::1
    2021-02-21 00:00:52 <opticalsensing><www-data><ACT> User information has been updated. IP address: ::1. Session: 036AB7C0E285F5A1829AE338
    2021-02-21 00:00:52 <opticalsensing><www-data><ACT> Retrieve components from the installed plugins
    2021-02-21 00:00:52 <opticalsensing><www-data><EXC> Error getting events by the filter where channels= , view id=1:
    Scada.ScadaException: User not logged on.
      at Scada.Web.UserMonitor.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x0001d] in <82bda2c3c590430bb1596f945ba003f0>:0 
      at Scada.Web.AppData.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x00006] in <82bda2c3c590430bb1596f945ba003f0>:0 
      at Scada.Web.ClientApiSvc.GetEvents (System.Int32 year, System.Int32 month, System.Int32 day, System.String cnlNums, System.String viewIDs, System.Int32 viewID, System.Int32 lastCount, System.Int32 startEvNum, System.Int64 dataAge) [0x00000] in <82bda2c3c590430bb1596f945ba003f0>:0 
    2021-02-21 00:00:53 <opticalsensing><www-data><EXC> Error getting extended current data by the filter where channels= , view id=1:
    Scada.ScadaException: User not logged on.
      at Scada.Web.UserMonitor.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x0001d] in <82bda2c3c590430bb1596f945ba003f0>:0 
      at Scada.Web.AppData.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x00006] in <82bda2c3c590430bb1596f945ba003f0>:0 
      at Scada.Web.ClientApiSvc.GetCurCnlDataExt (System.String cnlNums, System.String viewIDs, System.Int32 viewID) [0x00000] in <82bda2c3c590430bb1596f945ba003f0>:0 
    2021-02-21 00:00:53 <opticalsensing><www-data><EXC> Error getting events by the filter where channels= , view id=1:
    Scada.ScadaException: User not logged on.
      at Scada.Web.UserMonitor.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x0001d] in <82bda2c3c590430bb1596f945ba003f0>:0 
      at Scada.Web.AppData.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x00006] in <82bda2c3c590430bb1596f945ba003f0>:0 
      at Scada.Web.ClientApiSvc.GetEvents (System.Int32 year, System.Int32 month, System.Int32 day, System.String cnlNums, System.String viewIDs, System.Int32 viewID, System.Int32 lastCount, System.Int32 startEvNum, System.Int64 dataAge) [0x00000] in <82bda2c3c590430bb1596f945ba003f0>:0 
    2021-02-21 00:00:54 <opticalsensing><www-data><EXC> Error getting extended current data by the filter where channels= , view id=1:
    Scada.ScadaException: User not logged on.
      at Scada.Web.UserMonitor.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x0001d] in <82bda2c3c590430bb1596f945ba003f0>:0 
      at Scada.Web.AppData.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x00006] in <82bda2c3c590430bb1596f945ba003f0>:0 
      at Scada.Web.ClientApiSvc.GetCurCnlDataExt (System.String cnlNums, System.String viewIDs, System.Int32 viewID) [0x00000] in <82bda2c3c590430bb1596f945ba003f0>:0 
    2021-02-21 00:00:54 <opticalsensing><www-data><EXC> Error getting events by the filter where channels= , view id=1:
    Scada.ScadaException: User not logged on.
      at Scada.Web.UserMonitor.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x0001d] in <82bda2c3c590430bb1596f945ba003f0>:0 
      at Scada.Web.AppData.CheckLoggedOn (Scada.Web.UserRights& userRights, System.Boolean throwOnFail) [0x00006] in <82bda2c3c590430bb1596f945ba003f0>:0 
      at Scada.Web.ClientApiSvc.GetEvents (System.Int32 year, System.Int32 month, System.Int32 day, System.String cnlNums, System.String viewIDs, System.Int32 viewID, System.Int32 lastCount, System.Int32 startEvNum, System.Int64 dataAge) [0x00000] in <82bda2c3c590430bb1596f945ba003f0>:0 
    in reply to: Mono high cpu usage #8464
    JW
    Participant

    The server of project 1 is in production environment, restarting SCADA will trigger an alarm. Since web access from other client browser is still working, I haven’t do anything to it yet.

    other symptoms are very wired. Terminal, File Manager, Chromium are not working. while the desktop gui and other gui apps still working. SSH and teamviewer are still working.

    I am not sure is it the desktop gnome-session problem makes some apps not working, or the high cpu load makes some app not working.

    in reply to: Mono high cpu usage #8463
    JW
    Participant

    Not sure when the high cpu load started. Haven’t check the system since last update 2 months ago until now. Any idea what I should look for?

    Will it effect scada if I kill the www-data PID?

    On the server with ubuntu desktop, I have a chromium browser showing scada dashboard alway on. I found that the chromium is frozen too, but not sure it’s the cause or the result.

    in reply to: sec data save #8366
    JW
    Participant

    I haven’t try dbexport module.
    But I did read and push cur data to other services. I have a separated service to do this instead of a scada driver, to avoid crashing scada.
    A tip for this type of action is set Cur folder to ram disk, which make the process faster.

    in reply to: l #8348
    JW
    Participant

    Link component doesn’t display data.

    you can add a few dynamic text to display data and dynamic picture to display icons, and align them under the link component.

    set z index them, depending on you preference of which one on top.

    in reply to: get line state #8345
    JW
    Participant

    Hi, I used the following work around.
    Line 1
    |–Device 1
    |–Device 2

    Added extra channels as temporary data
    InCnl 10101: Signal 1 of device 1, real, Line 1 Device 1 Stat
    InCnl 10201: Signal 1 of device 1, real, Line 1 Device 1 Stat

    add extra channel to monitor status
    InCnl 101: stat(10101), Calculated discrete, Line 1 Device 2 Stat (O means offline, 1 online)
    InCnl 102: stat(10201), Calculated discrete, Line 1 Device 2 Stat (O means offline, 1 online)
    InCnl 100: Stat(10101)+Stat(10201)==0?0:1, Calculated discrete, Line 1 Stat (O means offline, 1 online)

    then enable event on change of these 3 channels, to log event of online/offline

    ** assuming all device offline = communication line offline.

    you can miniplate formulas to have more states as you needed

    in reply to: Silent server crash #8293
    JW
    Participant

    does the above update also applied for linux version?
    there is a “ScadaServerSvc.exe” in the zip, but no “ScadaServerMono.exe”

    in reply to: Silent server crash #8217
    JW
    Participant

    Hi Mikhail, I tested on the test project I uploaded for half hour each, with and without 1 sec delay on AutoControl. It seems working fine on both settings.

    Only need to update the server module, no need to update auto control module?

    in reply to: Silent server crash #8154
    JW
    Participant

    I mean adding a delay to a command in the module settings, not to request. If delay is added, commands are added to a queue instead of being sent directly. The queue should protect the server app from hanging.

    Yes, 1s delay to commands in the auto module are added already in the above test project, which do reduce the crash probability / frequency. But it will still crash on this setting.

    Then I also try to test the effect of different request delay.

    seems they both have effect on this issue.

    in reply to: Silent server crash #8149
    JW
    Participant

    Hi,

    I made a test project that will trigger this crash issue consistently within 1~2min. It can be downloaded in the link below.

    Test project
    https://drive.google.com/file/d/1l5Z4y8vRrVlked83ZzkT9AtmZpPZ61LI/view?usp=sharing

    Project settings
    The data is generated from simulator driver of scada, with 1s update interval.
    The alarm generated from simulator will trigger commands that send to a modbus relay device. Commands are with 1s delay already.
    It will crash no matter the relay is connected or not. (You can connect a modbus slave/server simulator with 16 DO at 127.0.0.1:502 to see the command in action.)

    Web UI
    https://drive.google.com/file/d/17proisKbU5Gf3xLQ0bRhxrgphJ8h9Sr7/view?usp=sharing
    Administrator and server Log
    https://drive.google.com/file/d/1RcClfPdw3ozifkd5IMGiUuf_xvVgoSeb/view?usp=sharing
    Auto Control settings
    https://drive.google.com/file/d/1S5FPVlr9OMcmyV1tDK0NPWtcWE_2ftz-/view?usp=sharing

    Other notes
    If turn off auto control module, it will not crash on my 1.5 hour test.
    If add 1s more delay after request cycle to simulator, or set the delay of simulator device from 1s to 2s, the crash will happen less frequently. (but I have no license of auto control module on my this computer, I can only test for 10mins per round. I tested 4-5 rounds, only 1 round crashed at about 3 minutes.)

    in reply to: Silent server crash #8147
    JW
    Participant

    Hi, I have a few findings.

    1. when the server crashed, there is no log.
    the following part of the error message shows up when manually stop/restart the server.

    System.Threading.ThreadAbortException: Thread was being aborted.
       at System.Threading.Monitor.ReliableEnter(Object obj, Boolean& lockTaken)
       at Scada.Server.Engine.MainLogic.RaiseOnCurDataProcessing(Srez receivedSrez)
       at Scada.Server.Engine.MainLogic.ProcCurData(Srez receivedSrez)
    01-16 10:05:02 <***C2><SYSTEM><EXC> Error receiving and processing data from the client 127.0.0.1: Thread was being aborted.
    01-16 10:05:02 <***C2><SYSTEM><EXC> Error communicating with the client 127.0.0.1: Thread was being aborted.
    01-16 10:05:12 <***C2><SYSTEM><EXC> Error executing actions on current data calculated in module ModAutoControl: Thread was being aborted.
    01-16 10:05:12 <***C2><SYSTEM><ACT> Server is aborted
    01-16 10:05:12 <***C2><SYSTEM><ACT> ScadaServerService is stopped

    2. the server will crash even the device it’s sending command to is not online, so it may not be the communicator problem I mentioned.

    3. Adding 1s delay will reduce the probability / frequency of the server crash, but can not complete solve it.

    in reply to: HTTPS on Linux #8144
    JW
    Participant

    STEP 3 – Install and config Nginx
    Install nginx
    sudo apt install nginx

    Edit this file
    sudo nano /etc/nginx/sites-enabled/default

    change the following content

    part 1 – http:80
    this is to redirect all http request to https.
    delete or comment the original http:80 server, add the following server

    server {
        listen      80;
        server_name myserver.com;
        return      301 https://$host$request_uri;
    }

    part 2 – https:443
    this part has several functions, see comment in code
    add the following https:433 server

    server {
            listen       *:443;
            server_name  myserver.com;
    
            # log loaction, optional
            access_log  /var/log/nginx/myserver-ssl-proxy-access.log;
            error_log   /var/log/nginx/myserver-ssl-proxy-error.log;
    
            ssl on;
            # ssl cert location, must
            ssl_certificate /path/to/ssl.crt;
            ssl_certificate_key /path/to/ssl.key;
    
            # redirect root to /scada, optional
            location / {
                    rewrite ^/(.*)$ /scada/$1 redirect;
            }
    
            # reverse proxy to scada on apache, must
            location /scada/ {
                    proxy_pass http://localhost:8080/scada/;
                    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                    proxy_set_header Host $http_host;
                    proxy_set_header X-Forwarded-Proto $scheme;
                    proxy_buffering off;
            }
    }

    restart nginx
    sudo systemctl restart nginx.service

    SETP 4 – Test
    you should be able to access from any of the following address. all of them will send you to https scada website.

    http://myserver.com
    http://myserver.com/scada
    https://myserver.com
    https://myserver.com/scada
    in reply to: HTTPS on Linux #8143
    JW
    Participant

    Continuing from previous reply. Assuming a Linux system with SCADA installed using all default setting, no other websites.

    STEP 1 – Prepare ssl certification
    put them in the path you like, make sure their permission allows read

    /path/to/ssl.crt
    /path/to/ssl.key

    STEP 2 – Change apache2 default ports
    Edit file
    sudo nano /etc/apache2/ports.conf
    Change content to

    Listen 8080
    
    <IfModule ssl_module>
            Listen 8081
    </IfModule>
    
    <IfModule mod_gnutls.c>
            Listen 8081
    </IfModule>

    Also edit this file
    sudo nano /etc/apache2/sites-enabled/000-default.conf
    change port number only, keep other things

    <VirtualHost *:8080>
    # keep the content in this file
    </VirtualHost>

    ssl is not enbled on apache by defualt, but if ssl is already on apache, then also edit this file.
    sudo nano /etc/apache2/sites-enabled/000-default-ssl.conf
    change port number only, keep other things

    <VirtualHost *:8081>
    # keep the content in this file
    </VirtualHost>

    restart apache
    sudo systemctl restart apache2.service

    in reply to: Silent server crash #8124
    JW
    Participant

    I had experienced similar things before when:

    Using Auto Control Module to send commands to one external modbus device.

    The cause I suspect:
    1 trigger send multiple commands;
    or several triggers send commands at the same time;

    It happens quite frequently when doing stress test, e.g. toggling the trigger every a few second.

    as I remember in detail log, it’s similar to the issue I mentioned in another post. (Modbus Comm Bug)
    it looks like scada mis-align the reply from the modbus slave software.
    https://drive.google.com/file/d/11y8e6zyzzKWXJovF0uj8TM22hCG9TJkH/view?usp=sharing

    I am going to find my records, as see if I can make a minimum project that reproduce this problem.

Viewing 15 posts - 106 through 120 (of 160 total)