FreeLunch

Forum Replies Created

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • in reply to: Bad Gateway / scadaweb6.service #14859
    FreeLunch
    Participant

    Fair 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 1 year, 2 months ago by FreeLunch.
    in reply to: Bad Gateway / scadaweb6.service #14855
    FreeLunch
    Participant

    While 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?

    in reply to: Bad Gateway / scadaweb6.service #14850
    FreeLunch
    Participant

    I 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.

    • This reply was modified 1 year, 2 months ago by FreeLunch.
    • This reply was modified 1 year, 2 months ago by FreeLunch.
    in reply to: Bad Gateway / scadaweb6.service #14833
    FreeLunch
    Participant

    I 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
    in reply to: Bad Gateway / scadaweb6.service #14832
    FreeLunch
    Participant

    Okay, 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.

    in reply to: Bad Gateway / scadaweb6.service #14827
    FreeLunch
    Participant

    Looks 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: 2ms

    Jul 01 18:58:45 scada-main-100 systemd[1]: scadaweb6.service: Failed with result ‘exit-code’.

    • This reply was modified 1 year, 2 months ago by FreeLunch.
    in reply to: Bad Gateway / scadaweb6.service #14785
    FreeLunch
    Participant

    My current proxy_pass is set to 10008… which came with the rapidscada archive. So that should be changed to 5000?

    in reply to: Bad Gateway / scadaweb6.service #14784
    FreeLunch
    Participant

    Well… there’s the problem. There IS no directory for ScadaWeb. I take that to mean it isn’t started… or there’s a permissions issue in writing to that location. Once again, this is a fresh install of Ubuntu Server 22.04 and following the install docs as carefully as I could.

    https://rapidscada.net/docs/en/latest/installation/install-linux

    Which said nothing about port 5000 (step #5) unless I totally missed it. I’m guessing with that section in the proxy_pass will get me closer if not solve the problem.

    For the record, the systemctl for nginx reports:

    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 Tue 2024-06-25 16:35:06 UTC; 21h ago
           Docs: man:nginx(8)
        Process: 16472 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
        Process: 16473 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
       Main PID: 16474 (nginx)
          Tasks: 3 (limit: 4303)
         Memory: 4.3M
            CPU: 72ms
         CGroup: /system.slice/nginx.service
                 ├─16474 "nginx: master process /usr/sbin/nginx -g daemon on; master_process on;"
                 ├─16475 "nginx: worker process" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""
                 └─16476 "nginx: worker process" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""
    
    Jun 25 16:35:06 scada-main-100 systemd[1]: Starting A high performance web server and a reverse proxy server...
    Jun 25 16:35:06 scada-main-100 systemd[1]: Started A high performance web server and a reverse proxy server.
Viewing 8 posts - 1 through 8 (of 8 total)