Bad Gateway / scadaweb6.service

Forum Home Forums Installation Issues SCADA-Web Installation Bad Gateway / scadaweb6.service

Viewing 15 posts - 1 through 15 (of 50 total)
  • Author
    Posts
  • #14775
    FreeLunch
    Participant

    On my minimized Ubuntu server (command line only) systemctl says that scadaweb6.service is:

    loaded activating auto-restart

    And I can’t get to the webpage trying to open with another machine. It just goes to a 502 bad gateway.

    Same thing when I curl from the command line.

    Any idea what’s going on?

    • This topic was modified 3 months, 3 weeks ago by FreeLunch.
    #14777
    zzz
    Participant

    Maybe try check the following:
    Run netstat -nplv4 |grep dotnet as root, make sure port 5000 is open, check $rapidscada_dir/ScadaWeb/log/ScadaWeb.log for error if not.
    Run systemctl status nginx, makesure its running correctly, inspect less /etc/nginx/sites-enabled/$config_file_with_your_rapidscada_setup to confirm port 5000 has been properly proxy_passed to. If so, check /var/log/nginx/error.log for further error info.

    • This reply was modified 3 months, 3 weeks ago by zzz.
    • This reply was modified 3 months, 3 weeks ago by zzz.
    #14782
    Mikhail
    Moderator

    Hi,
    First of all, check /var/log/scada/ScadaWeb/ScadaWeb.log to realize if the web app
    works or not.

    #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.
    #14785
    FreeLunch
    Participant

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

    #14789
    Mikhail
    Moderator

    On Linux, the Webstation app works as a daemon, named scadaweb6. It uses the TCP port 10008. It should be available on this port even without nginx. When you use nginx, you can also access the web application on port 80.

    TCP port 5000 is not used on Linux by default.

    #14790
    Mikhail
    Moderator

    What can you try:
    1. Stop the scadaweb6 daemon.
    2. Run the web app
    /usr/bin/dotnet /opt/scada/ScadaWeb/ScadaWeb.dll –urls=http://0.0.0.0:10008
    Check console output for errors.

    #14791
    Mikhail
    Moderator

    Do ScadaServer and ScadaComm work well according to their log files?

    #14792
    hendra_allo
    Participant

    hi all. Still relevant with this topic, I am facing the issue with 502 Bad Gateway of Nginx. It seems to me that scada* daemon can not start. Following the response when I check the scadaserver6.service status:

    ● scadaserver6.service – Rapid SCADA Server
    Loaded: loaded (/etc/systemd/system/scadaserver6.service; enabled; vendor >
    Active: activating (auto-restart) (Result: exit-code) since Fri 2024-06-28>
    Process: 5198 ExecStart=/usr/bin/dotnet /opt/scada/ScadaServer/ScadaServerW>
    Main PID: 5198 (code=exited, status=131)
    CPU: 3ms

    How to fix this? Thanks

    #14796
    manjey73
    Participant

    dotnet --info ?

    #14797
    hendra_allo
    Participant

    global.json file:
    Not found

    Host:
    Version: 6.0.31
    Architecture: x64
    Commit: e2ca2f8a1c

    .NET SDKs installed:
    No SDKs were found.

    .NET runtimes installed:
    No runtimes were found.

    Download .NET:
    https://aka.ms/dotnet-download

    Learn about .NET Runtimes and SDKs:
    https://aka.ms/dotnet/runtimes-sdk-info

    #14798
    manjey73
    Participant

    You don’t have dotnet installed

    Install curl sudo apt install curl

    And then install dotnet

    sudo curl -sSL https://dot.net/v1/dotnet-install.sh | sudo bash /dev/stdin --channel LTS --runtime aspnetcore --install-dir /usr/share/dotnet/

    add a link
    sudo ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet

    #14799
    manjey73
    Participant

    after that, check again dotnet --info

    You should see that you have the runtime installed

    .NET runtimes installed:
      Microsoft.AspNetCore.App 6.0.20 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
      Microsoft.NETCore.App 6.0.20 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
    #14800
    hendra_allo
    Participant

    scada* daemon are now running, but dotnet version is 8.0.6 and 502 Bad Gateway still appear.

    .NET SDKs installed:
    No SDKs were found.

    .NET runtimes installed:
    Microsoft.AspNetCore.App 8.0.6 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
    Microsoft.NETCore.App 8.0.6 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

    Other architectures found:
    None

    Environment variables:
    DOTNET_ROOT [/home/hendra/dotnet]

    global.json file:
    Not found

    Learn more:
    https://aka.ms/dotnet/info

    Download .NET:
    https://aka.ms/dotnet/download

    • This reply was modified 3 months, 2 weeks ago by hendra_allo.
    #14802
    manjey73
    Participant

    The dotnet version is up-to-date, this is no longer the reason.

    service scadaweb6 status

    or

    systemctl status scadaweb6

    • This reply was modified 3 months, 2 weeks ago by manjey73.
Viewing 15 posts - 1 through 15 (of 50 total)
  • You must be logged in to reply to this topic.