Forum Home › Forums › Installation Issues › SCADA-Web Installation › Bad Gateway / scadaweb6.service
- This topic has 49 replies, 5 voices, and was last updated 9 months, 2 weeks ago by
Mikhail.
-
AuthorPosts
-
June 28, 2024 at 12:21 pm #14820
manjey73
ParticipantReinstall nginx. Or put the native default file back in place and restart nginx
First you need to get nginx running
-
This reply was modified 9 months, 3 weeks ago by
manjey73.
July 1, 2024 at 12:15 pm #14825Mikhail
ModeratorAccording to the log file
2024-06-28 23:31:02 [hendra-ThinkPad-X220][root][ACT] User ScadaWeb is successfully authenticated
the web application works. It should be available directly at http://localhost:10008 on Linux.July 1, 2024 at 6:59 pm #14827FreeLunch
ParticipantLooks like I stepped away for a minute…
In any case, I have followed the steps that you originally gave me and then what you had given to the other user.
- It appears that I have dotnet installed at the 8.x.x version. No SDKs, though, runtime only, if that matters.
- According to the logs, nginx seems to be serving, but only the bad gateways.
- There isn’t a log for ScadaWeb, since it won’t start, but ScadaServer and ScadaComm both seem to be running according to their logs. No idea what to look for, but generally they seem to be “doing things.”
Here’s the Nginx log:
192.168.32.169 - - [26/Jun/2024:14:58:14 +0000] "GET / HTTP/1.1" 502 568 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36" 192.168.32.169 - - [26/Jun/2024:14:58:14 +0000] "GET / HTTP/1.1" 502 568 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36" 192.168.32.169 - - [26/Jun/2024:14:58:14 +0000] "GET /favicon.ico HTTP/1.1" 502 568 "http://192.168.32.73/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36" 192.168.32.169 - - [26/Jun/2024:14:58:26 +0000] "GET / HTTP/1.1" 502 568 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36" 192.168.32.169 - - [26/Jun/2024:14:58:26 +0000] "GET /favicon.ico HTTP/1.1" 502 568 "https://192.168.32.73/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36" 192.168.32.169 - - [26/Jun/2024:16:02:13 +0000] "GET / HTTP/1.1" 502 568 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36" 192.168.32.169 - - [26/Jun/2024:16:02:14 +0000] "GET /favicon.ico HTTP/1.1" 502 568 "https://192.168.32.73/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36" 192.168.32.169 - - [26/Jun/2024:16:02:28 +0000] "GET / HTTP/1.1" 502 568 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36" 192.168.32.169 - - [26/Jun/2024:16:02:28 +0000] "GET /favicon.ico HTTP/1.1" 502 568 "https://192.168.32.73/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36"
Here’s the tail of ScadaServer.log:
2024-06-28 16:09:53 [scada-main-100][root][ACT] Delete outdated data from the Events archive older than 29/06/2023 2024-06-29 16:09:53 [scada-main-100][root][ACT] Delete outdated data from the Min archive older than 30/06/2023 2024-06-29 16:09:53 [scada-main-100][root][ACT] Delete outdated data from the Hour archive older than 30/06/2023 2024-06-29 16:09:53 [scada-main-100][root][ACT] Delete outdated data from the Events archive older than 30/06/2023 2024-06-30 16:09:53 [scada-main-100][root][ACT] Delete outdated data from the Min archive older than 01/07/2023 2024-06-30 16:09:53 [scada-main-100][root][ACT] Delete outdated data from the Hour archive older than 01/07/2023 2024-06-30 16:09:53 [scada-main-100][root][ACT] Delete outdated data from the Events archive older than 01/07/2023 2024-07-01 16:09:54 [scada-main-100][root][ACT] Delete outdated data from the Min archive older than 02/07/2023 2024-07-01 16:09:54 [scada-main-100][root][ACT] Delete outdated data from the Hour archive older than 02/07/2023 2024-07-01 16:09:54 [scada-main-100][root][ACT] Delete outdated data from the Events archive older than 02/07/2023
Here’s the tail of ScadaComm.log:
2024-06-26 16:09:51 [scada-main-100][root][ACT] Data source ScadaServer initialized successfully 2024-06-26 16:09:51 [scada-main-100][root][ACT] Data source ScadaServer: Receive the configuration database 2024-06-26 16:09:51 [scada-main-100][root][ERR] Data source ScadaServer: Error checking server connection: Connection refused [::ffff:127.0.0.1]:10000 2024-06-26 16:09:51 [scada-main-100][root][ERR] Unable to start communication lines because the configuration database is not received 2024-06-26 16:10:01 [scada-main-100][root][ACT] Data source ScadaServer: Receive the configuration database 2024-06-26 16:10:01 [scada-main-100][root][ACT] Data source ScadaServer: The configuration database has been received successfully 2024-06-26 16:10:01 [scada-main-100][root][ACT] Start communication lines 2024-06-26 16:10:01 [scada-main-100][root][ACT] Start reading commands from files 2024-06-26 16:10:01 [scada-main-100][root][ACT] Data source ScadaServer: Connection state is Logged In
And just because, here’s my dotnet info:
Host: Version: 8.0.5 Architecture: x64 Commit: 087e15321b RID: ubuntu.22.04-x64 .NET SDKs installed: No SDKs were found. .NET runtimes installed: Microsoft.NETCore.App 8.0.5 [/usr/lib/dotnet/shared/Microsoft.NETCore.App] Other architectures found: None Environment variables: Not set global.json file: Not found Learn more: https://aka.ms/dotnet/info Download .NET: https://aka.ms/dotnet/download
And my nginx status:
`● nginx.service – A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2024-06-26 16:09:49 UTC; 5 days ago
Docs: man:nginx(8)
Main PID: 883 (nginx)
Tasks: 3 (limit: 4303)
Memory: 10.5M
CPU: 38ms
CGroup: /system.slice/nginx.service
├─883 “nginx: master process /usr/sbin/nginx -g daemon on; master_process on;”
├─885 “nginx: worker process” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “”
└─886 “nginx: worker process” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “” “”‘And finally, my ScadaWeb6 status:
● scadaweb6.service – Rapid SCADA Webstation
Loaded: loaded (/etc/systemd/system/scadaweb6.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Mon 2024-07-01 18:58:45 UTC; 784ms ago
Process: 81577 ExecStart=/usr/bin/dotnet /opt/scada/ScadaWeb/ScadaWeb.dll –urls=http://0.0.0.0:10008 (code=exited, status=150)
Main PID: 81577 (code=exited, status=150)
CPU: 2msJul 01 18:58:45 scada-main-100 systemd[1]: scadaweb6.service: Failed with result ‘exit-code’.
-
This reply was modified 9 months, 3 weeks ago by
FreeLunch.
July 1, 2024 at 7:28 pm #14829manjey73
Participant.NET runtimes installed:
Microsoft.NETCore.App 8.0.5 [/usr/lib/dotnet/shared/Microsoft.NETCore.App]You have lost one NET component or not installed
Where Microsoft.AspNetCore.App ????
-
This reply was modified 9 months, 3 weeks ago by
manjey73.
July 1, 2024 at 7:35 pm #14831manjey73
ParticipantFor Scada and WEB to work, only runtime dotnet is needed.
But there should be two of them. NETCore and ASP NETCoreJuly 1, 2024 at 7:58 pm #14832FreeLunch
ParticipantOkay, so there is an issue. The installation instructions should be updated to include that information. If both are required, there should be a note to describe that at https://rapidscada.net/docs/en/latest/installation/install-linux
It points to a this page (in my case) https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu-install?pivots=os-linux-ubuntu-2204&tabs=dotnet8 which really doesn’t tell me which to do… So I rolled the dice.
Let me get that installed.
July 1, 2024 at 8:21 pm #14833FreeLunch
ParticipantI installed both components, once again, I recommend that the install docs get updated to say that the installation should have 2 running before moving on.
All of the services are running now. But, sadly, I still get a bad gateway / 502 error.
scadaagent6.service. loaded active running Rapid SCADA Agent scadacomm6.service loaded active running Rapid SCADA Communicator scadaserver6.service loaded active running Rapid SCADA Server scadaweb6.service loaded active running Rapid SCADA Webstation
July 2, 2024 at 11:12 am #14842Mikhail
ModeratorI recommend that the install docs get updated
I will check the docs.
I still get a bad gateway / 502 error
What is in the nginx configuration related to Rapid SCADA?
Does http://localhost:10008 work?July 2, 2024 at 11:13 am #14843July 2, 2024 at 11:33 am #14850FreeLunch
ParticipantI know what it means now 🙂
My point is, as someone who has never used a dotnet library on linux, I had completely missed/overlooked/ignored any subtle clue that I should end up with not 1 but 2 dotnet libraries installed. I don’t usually, but I did in this case. It’s easy (though maybe not smart) to look at that and think it’s referring to the same thing by two names.
So, it might be helpful to people coming in with fresh eyes to know that the correct result is two dotnet libraries on the RapidSCADA install page. The rest seemed explicit enough.
Once the user goes to a Microsoft page, it gets a little sketchy how the two relate anyway. Nonetheless, installing both libraries as I should have fixed my stuck service. That got me another step along the way.
July 2, 2024 at 11:42 am #14855FreeLunch
ParticipantWhile now it appears that all of my services are running (after following all the help here so far) I am still ending up with the same bad gateway error.
Question 1: I created the self-signed certificate…and that doesn’t seem to be the problem. I can get the bad gateway over both http and https with the normal browser warnings. That shouldn’t be the problem, right?
Question 2: I’m concerned that the third link talks about “server blocks” which I felt like mostly didn’t apply to my install. This little server will be doing nothing else but RapidSCADA, so I presumed that simply copying the default file into the sites-available folder was enough. Do I need to define server blocks as well?
July 2, 2024 at 12:13 pm #14857manjey73
ParticipantI’m so lazy that I put curl if it’s not there and then I give the command to install dotnet with a script. It is available in the installation documentation on the Microsoft website. 🙂
-
This reply was modified 9 months, 2 weeks ago by
manjey73.
July 2, 2024 at 3:19 pm #14859FreeLunch
ParticipantFair enough. I’m glad I have both the dotnet components now. What do I do next to troubleshoot the bad gateway error I still receive?
-
This reply was modified 9 months, 2 weeks ago by
FreeLunch.
July 2, 2024 at 6:40 pm #14861manjey73
Participantwe need to look at who is causing the error and where? is this an nginx or scadaweb error
July 3, 2024 at 10:51 am #14866Mikhail
ModeratorI am still ending up with the same bad gateway error.
What is in the nginx configuration related to Rapid SCADA?
Does http://localhost:10008 work?I’m concerned that the third link talks about “server blocks” which I felt like mostly didn’t apply to my install.
Before fix the bad gateway issue, I suggest to use the nginx configuration from the Rapid SCADA installation package.
-
This reply was modified 9 months, 3 weeks ago by
-
AuthorPosts
- You must be logged in to reply to this topic.