alerta/alerta

Received 404 page, when we refresh the screen on WEB UI after login (via F5 button or Reload Button) from ALL Screens

Closed this issue · 5 comments

Issue Summary

After LOGIN and AFTER REFRESH F5 Button
TIMESTAMP [error] 834#0: *620869 open() "/alerta/var/www/html/login" failed (2: No such file or directory), client: XXX.XXX.XXX.XXX, server: alerta, request: "GET /login HTTP/1.1", hostname: "host:8080"

DETAILS ALARM and AFTER REFRESH F5 Button
TIMESTAMP [error] 834#0: *620872 open() "/alerta/var/www/html/alert/95f2d50c-1275-4683-ae44-e4966738c024" failed (2: No such file or directory), client: XXX.XXX.XXX.XXX, server: alerta, request: "GET /alert/95f2d50c-1275-4683-ae44-e4966738c024 HTTP/1.1", host: "HOSTNAME:8080"

Environment

  • OS: [eg. Linux, Mac, Windows]

  • API version: 8.6.5

  • Deployment: Ansible playbooks

  • For self-hosted, WSGI environment: nginx/uwsgi

  • Database: Postgres

  • Server config:
    Auth enabled? Yes
    Auth provider? Basic
    Customer views? Yes
    (or provide the /config endpoint output)

  • web UI version: 8.7.0

To Reproduce
Steps to reproduce the behavior:

  1. login into the web UI
  2. Go to alerts screen
  3. click on one alarm ==> we have the details of this alarm
  4. push on F5 Button or reload the web Page with details (==> You can do it Whatever screen <==)
  5. See error :

Expected behavior
==> only refresh the page and stay on the specific page

Screenshots
2024-03-27_11h31_14

==> Received a 404 Nginx Page

Any ideas what happend ?

Thanks for your help.
Best regards

Could you provide the nginx config?

user nginx nginx;
worker_processes auto;
worker_rlimit_nofile 1024;

error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;

daemon on;

events {
multi_accept off;
worker_connections 512;
}

http {
include /etc/nginx/mime.types;
include /etc/nginx/conf.d/*.conf;
}

Are there any files included in include /etc/nginx/conf.d/*.conf;?

There's no server-block in the provided config.

there 2 files on /etc/nginx/conf.d/*.conf;

alerta.conf:

server {
listen 8080;
index index.html index.htm;
server_name alerta;

location / {
    root /alerta/var/www/html;
    try_files $uri $uri/ /index.html;

    if ($request_method ~* "(GET)") { add_header "Access-Control-Allow-Origin"  *;}

}
location /api {
    include uwsgi_params;
    uwsgi_pass unix:/run/uwsgi/uwsgi.sock;

}

}

status.conf

server {
listen 9090;
access_log /var/log/nginx/access.log;
location /nginx_status {
stub_status on;
}
allow 127.0.0.1;
deny all;
}

Thanks. It doesn't seem to be an issue with Alerta or Alerta WebUI, but rather a simple misconfiguration.

I'll be closing this issue since it's not an bug.
Feel free to ask for support on our slack channel.