Closed hardwareadictos closed 1 month ago
For giving more info, nginx works and serves the correct port:
root@NetAlertX:/var/log/nginx# netstat -putan |grep -i nginx
tcp 0 0 0.0.0.0:20211 0.0.0.0:* LISTEN 182/nginx: master p
And logs reports devices trying to access to the services receiving the 404 also.
That seems the issue, nginx doesnt find the root files:
root@NetAlertX:/var/log/nginx# cat error.log
2024/07/30 17:58:52 [notice] 6221#6221: using inherited sockets from "5;6;"
2024/07/30 18:53:29 [error] 262#262: *1 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.110, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/30 18:53:30 [error] 262#262: *1 open() "/var/www/html/app/favicon.ico" failed (2: No such file or directory), client: 192.168.1.110, server: , request: "GET /favicon.ico HTTP/1.1", host: "192.168.1.50:20211", referrer: "http://192.168.1.50:20211/"
2024/07/30 18:53:49 [error] 262#262: *1 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.110, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/30 18:55:21 [error] 262#262: *3 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.110, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/30 18:59:31 [error] 262#262: *5 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.110, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/30 18:59:32 [error] 262#262: *5 open() "/var/www/html/app/favicon.ico" failed (2: No such file or directory), client: 192.168.1.110, server: , request: "GET /favicon.ico HTTP/1.1", host: "192.168.1.50:20211", referrer: "http://192.168.1.50:20211/"
2024/07/30 19:04:00 [error] 223#223: *1 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.110, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/30 19:07:43 [error] 223#223: *4 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.110, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/30 19:11:16 [error] 223#223: *5 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.110, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/30 19:11:18 [error] 223#223: *5 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.110, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/30 19:11:29 [error] 223#223: *5 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.110, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/30 19:11:35 [error] 223#223: *5 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.110, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/30 20:46:23 [error] 225#225: *2 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.8, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/30 20:46:23 [error] 225#225: *2 open() "/var/www/html/app/favicon.ico" failed (2: No such file or directory), client: 192.168.1.8, server: , request: "GET /favicon.ico HTTP/1.1", host: "192.168.1.50:20211", referrer: "http://192.168.1.50:20211/"
2024/07/31 10:11:14 [error] 190#190: *1 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.8, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/31 10:12:40 [error] 190#190: *3 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.8, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/31 10:12:42 [error] 190#190: *3 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.8, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/31 10:12:42 [error] 190#190: *3 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.8, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/31 10:12:42 [error] 190#190: *3 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.8, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/31 10:12:43 [error] 190#190: *3 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.8, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/31 10:12:43 [error] 190#190: *3 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.8, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/31 10:12:43 [error] 190#190: *3 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.8, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/31 10:12:43 [error] 190#190: *3 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.8, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/31 10:14:33 [error] 183#183: *1 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.8, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/31 10:15:59 [error] 183#183: *3 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.8, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/31 10:16:00 [error] 183#183: *3 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.8, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/31 10:18:15 [error] 183#183: *6 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.8, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/31 10:18:28 [error] 183#183: *7 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 192.168.1.50, server: , request: "GET / HTTP/1.1", host: "192.168.1.50:20211"
2024/07/31 10:18:36 [error] 183#183: *8 "/var/www/html/app/index.php" is not found (2: No such file or directory), client: 127.0.0.1, server: , request: "GET / HTTP/1.1", host: "127.0.0.1:20211"
And something more to point, during the install i had to resolve those dependencies (if you want to add them to the script) on Debian 12:
apt install arp-scan build-essential python3-dev
Thank you for the hard work :)
Edit, fixed it with a softlink:
root@NetAlertX:~# ln -s /var/www/html/netalertx /var/www/html/app
root@NetAlertX:~# ls -lrt /var/www/html/
total 4
-rw-r--r-- 1 root root 615 Jul 30 17:58 index.nginx-debian.html
lrwxrwxrwx 1 root root 23 Jul 31 11:48 app -> /var/www/html/netalertx
lrwxrwxrwx 1 root root 11 Jul 31 11:48 netalertx -> /app//front
It's not the most elegant solution but it works. Maybe fixable on the installation script?
Hi @hardwareadictos ,
Thank you for the help!
I'm relying on users like you the community, to help with the bare-metal install script, so thank you very much π
I added the missing dependencies.
I thought I'm creating a softlink correctly in this script:
INSTALL_DIR=/app # Specify the installation directory here
# DO NOT CHANGE ANYTHING BELOW THIS LINE!
CONF_FILE=app.conf
DB_FILE=app.db
NGINX_CONF_FILE=netalertx.debian.conf
WEB_UI_DIR=/var/www/html/netalertx
...
# create symbolic link to the install directory
ln -s $INSTALL_PATH/front $WEB_UI_DIR
I don;t know why you had to create a softlink manually π€
I think I found it - it was probably the ngnx config file: https://github.com/jokob-sk/NetAlertX/commit/4b2b8d6dd138b93edf59678bbaa6f5760da84b76
should be fixed -> closing
Thanks a lot! Keep the hard work going!!! Will keep reporting if I found something! π
should be fixed -> closing
I'm sorry but problem is still occuring, tried both bare metal methods. With the softfix the frontend ist starting but this notification popup keeps returning, no matter what I try: even if followed the instructions, it returns after a few seconds and makes the UI unusable.
Could you please try to:
If the pop up still appear can double check if the app is not restarting unexpectedly?
Can you please try to save settings to see if it disappears afterwards?
Is there an existing issue for this?
Current Behavior
Rear bare metal install i cannot access the web gui, i just get a 404 error accessing to http://serverip:20211
Expected Behavior
NetAlertX displaying the web service interface
Steps To Reproduce
Just following the bare metal install docs
app.conf
docker-compose.yml
No response
What branch are you running?
Production
app.log
Debug enabled