2

I'm trying to set up uWSGI for django using http://adambard.com/blog/start-to-finish-serving-mysql-backed-django-w/ and the tutorial at http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html. Following the directions I have:

(env1)ubuntu@ip-172-31-28-196:~$ ls
host_type.py  requirements.txt  test.py  tproxy
(env1)ubuntu@ip-172-31-28-196:~$ sudo chmod 666 test.py
(env1)ubuntu@ip-172-31-28-196:~$ uwsgi --http :8000 --wsgi-file test.py
*** Starting uWSGI 2.0.9 (64bit) on [Tue Mar  3 14:45:58 2015] ***
compiled with version: 4.8.2 on 03 March 2015 02:58:28
os: Linux-3.13.0-44-generic #73-Ubuntu SMP Tue Dec 16 00:22:43 UTC 2014
nodename: ip-172-31-28-196
machine: x86_64
clock source: unix
detected number of CPU cores: 1
current working directory: /home/ubuntu
detected binary path: /home/ubuntu/.virtualenvs/env1/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
*** WARNING: you are running uWSGI without its master process manager ***
your processes number limit is 7862
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)
probably another instance of uWSGI is running on the same address (:8000).
bind(): Address already in use [core/socket.c line 764]

As you can see, there is another instance of a uWSGI running. How do I stop it?

3
  • 1
    IMO (but slightly off-topic) those aren't ideal tutorials. Nginx can "speak" the UWSGI protocol so you want to proxy back to uwsgi. I'm probably in a slightly different scenario to you (I host many websites under one uwsgi "emperor") but this is how I did it and this demonstrated how nginx and uwsgi are linked tghw.com/blog/…
    – Oli
    Mar 3, 2015 at 15:28
  • Thanks for looking at this. I'll read this over. What I'm really trying to do is wire up the amazon ec2 ip address to a virtualenv that I have running python3 so that I can develop using django and python 3 . I've been on this detour to try to get UWSGI working, but I would be fine if I could just solve the following: stackoverflow.com/questions/28818058/… Mar 3, 2015 at 15:54
  • BTW. the answer appears to be cntl-C Mar 3, 2015 at 18:04

1 Answer 1

2

You can stop it using:

sudo fuser -k 8000/tcp

This kills the process you have on your port 8000

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.