I want to deploy an old Django app, that works locally with Django 2.2.
This is what I did:
- created Django app, deleted new Django version, installed 2.2
- deleted default project folder, uploaded my own
- adapted the folder name in uwsgi.ini
- started and stopped the app
(env) [watchduck@opal9 wdnet_brainball3]$ ./start
[uWSGI] getting INI configuration from /home/watchduck/apps/wdnet_brainball3/uwsgi.ini
Started uWSGI for wdnet_brainball3.
But when I go to https://bb3.watchduck.net/ I get a 502 page.
The error.log of the site contains lines like this one:
2024/04/06 19:27:27 [error] 196434#196434: *262647988 connect() failed (111: Connection refused) while connecting to upstream, client: 87.181.191.124, server: bb3.watchduck.net, request: "GET / HTTP/2.0", upstream: "http://127.0.0.1:17000/", host: "bb3.watchduck.net"
In the uwsgi.log of the app I find:
*** Starting uWSGI 2.0.24 (64bit) on [Sat Apr 6 19:32:01 2024] ***
compiled with version: 11.2.1 20220127 (Red Hat 11.2.1-9) on 06 April 2024 19:07:15
os: Linux-3.10.0-1160.90.1.el7.x86_64 #1 SMP Thu May 4 15:21:22 UTC 2023
nodename: opal9.opalstack.com
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 32
current working directory: /home/watchduck
writing pidfile to /home/watchduck/apps/wdnet_brainball3/tmp/uwsgi.pid
detected binary path: /home/watchduck/apps/wdnet_brainball3/env/bin/uwsgi
your processes number limit is 4096
your memory page size is 4096 bytes
detected max file descriptor number: 4096
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
probably another instance of uWSGI is running on the same address (127.0.0.1:27697).
bind(): Address already in use [core/socket.c line 769]
(My settings.py currently uses DEBUG = True
and ALLOWED_HOSTS = ['*']
.)
What should I do?