Forum Replies Created
-
AuthorPosts
-
JWParticipant
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.
JWParticipantI 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.JWParticipantLink 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.
JWParticipantHi, I used the following work around.
Line 1
|–Device 1
|–Device 2Added 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 Statadd 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
JWParticipantdoes the above update also applied for linux version?
there is a “ScadaServerSvc.exe” in the zip, but no “ScadaServerMono.exe”JWParticipantHi 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?
JWParticipantI 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.
JWParticipantHi,
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=sharingProject 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=sharingOther 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.)JWParticipantHi, 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.
JWParticipantSTEP 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 serverserver { 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 serverserver { 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
JWParticipantContinuing 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 toListen 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
JWParticipantI 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=sharingI am going to find my records, as see if I can make a minimum project that reproduce this problem.
JWParticipantArchitecture of my latest approach is listed below, which seems working. the configuration should be less complicated than the approach mentioned in previous replies.
---Nginx:80 | ---Nginx:443---apache2-scada:8080
Note: because embedding http content in iframe (such as External URL on Interface, or Dashboard) of https site will not work, so I redirect all http request to https. the site becomes https only. The content being embedded need to be changed to https too.
I only tested demo project will a few different External URL on interface at the moment.
I will make a procedure in detail and update here later. (Friday night or weekend)
JWParticipantby enabling ssl of apache2 itself, the https site show error msg of
error updating current/hourly data
Is it the Mono-WCF bug stopping scada with apache2 https?Why would we need Nginx + Mono FastCGI?
Apache2:80--->apache2-scada:80 | Apache2:443--->Nignx:8008---fastcgi:9000-----apache2-scada:80
I am thinking about the following method, is there any obstacle or bug stopping it from working? I will have a try and update my result here.
Nginx:80--->apache2-scada:8080 | Nginx:443--->apache2-scada:8080
JWParticipantCase 5 : -20,None,None,20
when val is -1, the channel stat will become 12 and color will turn light blue.
no event (correct, as it should)In future version, if some limit is not set, not just the related event not appear, the related stat should not appear, considering other channel may use, is it?
case like this, there should be only stat of 11,13,15.
-
AuthorPosts