i run my flask app, and it works good, but by the time the app is stopped and in my uwsgi log
probably another instance of uWSGI is running on the same address (127.0.0.1:9002).
bind(): Address already in use [core/socket.c line 764]
when i run touch touch_reload, app is working again. I run anything else on the server which may take the socket.
my conf:
nginx
server {
listen 80;
....
location / {
include uwsgi_params;
uwsgi_pass 127.0.0.1:9001;
}
....
}
server {
listen 80;
....
location / {
include uwsgi_params;
uwsgi_pass 127.0.0.1:9003;
}
....
}
uwsgi:
chdir = /var/www/../
module = wsgihandler
socket = 127.0.0.1:9003
wsgi-file = app/__init__.py
callable = app
master = true
chmod-socket = 664
uid = root
gid = root
processes = 4
socket-timeout = 180
post-buffering = 8192
max-requests = 1000
buffer-size = 32768
logto = /var/www/.../log/uwsgi.log
touch-reload = /var/www/.../touch_reload
Address already in use means that the port you are trying to allocate for your current execution is already occupied/allocated to some other process.
If you're seeing a "TCP/UDP: Socket bind failed on local address" error message in the OpenVPN log, it means your VPN connection is configured to bind to a fixed local address and/or port number, and that this address/port number is unavailable.
The failed to bind to Port Minecraft server error occurs when a server attempts to use a service port (i.e 25565) that is already in use by another server. Since the majority of Minecraft hosting is Shared Hosting with shared IPs, the only way to make each server accessible is by giving it a unique port.
maybe you stop uwsgi by crtl + z:
$ lsof -i:8000
result maybe is:
COMMAND PID USER FD TYPE ...
uwsgi 9196 xxx 4u xxx ...
then
$ kill 9196
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With