uWSGI configuration issue: uwsgi fails without any error message. - django

When configuring uwsgi django application for first time i had weird error. NGIX (configured as per documentation) responded with 502 Bad Gateway response.
Uwsgi logs give no apparent error:
Sun Oct 7 17:36:31 2012 - *** Starting uWSGI 1.2.3-debian (64bit) on [Sun Oct 7 17:36:31 2012] ***
Sun Oct 7 17:36:31 2012 - compiled with version: 4.7.1 on 13 September 2012 19:07:14
Sun Oct 7 17:36:31 2012 - detected number of CPU cores: 2
Sun Oct 7 17:36:31 2012 - current working directory: /
Sun Oct 7 17:36:31 2012 - writing pidfile to /run/uwsgi/app/lfitjcmsjb/pid
Sun Oct 7 17:36:31 2012 - detected binary path: /usr/bin/uwsgi-core
Sun Oct 7 17:36:31 2012 - setgid() to 33
Sun Oct 7 17:36:31 2012 - setuid() to 33
Sun Oct 7 17:36:31 2012 - your memory page size is 4096 bytes
Sun Oct 7 17:36:31 2012 - detected max file descriptor number: 1024
Sun Oct 7 17:36:31 2012 - lock engine: pthread robust mutexes
Sun Oct 7 17:36:31 2012 - uwsgi socket 0 bound to UNIX address /run/uwsgi/app/lfitjcmsjb/socket fd 3
Sun Oct 7 17:36:31 2012 - uwsgi socket 1 bound to UNIX address /tmp/lfitj.sock fd 5
Sun Oct 7 17:36:31 2012 - your server socket listen backlog is limited to 100 connections
Sun Oct 7 17:36:31 2012 - *** Operational MODE: preforking ***
Sun Oct 7 17:36:31 2012 - *** no app loaded. going in full dynamic mode ***
Sun Oct 7 17:36:31 2012 - *** uWSGI is running in multiple interpreter mode ***
Sun Oct 7 17:36:31 2012 - spawned uWSGI master process (pid: 5141)
Sun Oct 7 17:36:31 2012 - spawned uWSGI worker 1 (pid: 5144, cores: 1)
Sun Oct 7 17:36:31 2012 - spawned uWSGI worker 2 (pid: 5145, cores: 1)
Sun Oct 7 17:37:57 2012 - -- unavailable modifier requested: 0 --

uWSGI logs show error --- it is:
-- unavailable modifier requested: 0 --
which basically means that python plugin is missing --- you need to install it. On debian you need to install uwsgi-plugin-python.

Related

Can't stop Clamav deamon in Linux

I am trying to stop Clamav service in Linux, but I am not able to do that.
I have installed Clamav in a seperate directory.
When running below command:
$ systemctl stop clamav-daemon
I get this error message:
Warning: Stopping clamav-daemon.service, but it can still be activated by:
clamav-daemon.socket
When running:
$ systemctl status clamav-daemon
I get:
clamav-daemon.service - Clam AntiVirus userspace daemon
Loaded: loaded (/usr/lib/systemd/system/clamav-daemon.service; disabled; vendor preset: disabled)
Active: active (running) since Wed 2020-04-29 13:23:33 IST; 7s ago
Docs: man:clamd(8)
man:clamd.conf(5)
https://www.clamav.net/documents/
Main PID: 32213 (clamd)
Tasks: 1
CGroup: /system.slice/clamav-daemon.service
└─32213 /usr/local/sbin/clamd --foreground=true
Any help will be appreciated. Thanks.
When you are logged in as a normal user which can be understood by seeing the $ sign in your command, clamav won't stop. You need to perform the following command.
It will stop clamav for only logged-in session
$ sudo systemctl stop clamav-daemon
To see the status
$ sudo systemctl status clamav-daemon
It will return:
● clamav-daemon.service - Clam AntiVirus userspace daemon
Loaded: loaded (/lib/systemd/system/clamav-daemon.service; disabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/clamav-daemon.service.d
└─extend.conf
Active: inactive (dead)
Docs: man:clamd(8)
man:clamd.conf(5)
https://www.clamav.net/documents/
Aug 20 08:58:53 machine clamd[808]: Thu Aug 20 08:58:53 2020 -> HTML support enabled.
Aug 20 08:58:53 machine clamd[808]: Thu Aug 20 08:58:53 2020 -> XMLDOCS support enabled.
Aug 20 08:58:53 machine clamd[808]: Thu Aug 20 08:58:53 2020 -> HWP3 support enabled.
Aug 20 08:58:53 machine clamd[808]: Thu Aug 20 08:58:53 2020 -> Self checking every 3600 seconds.
Aug 20 09:58:53 machine clamd[808]: Thu Aug 20 09:58:53 2020 -> SelfCheck: Database status OK.
Aug 20 10:57:51 machine systemd[1]: Stopping Clam AntiVirus userspace daemon...
Aug 20 10:57:52 machine clamd[808]: Thu Aug 20 10:57:52 2020 -> --- Stopped at Thu Aug 20 10:57:52 >
Aug 20 10:57:52 machine clamd[808]: Thu Aug 20 10:57:52 2020 -> Socket file removed.
Aug 20 10:57:52 machine systemd[1]: clamav-daemon.service: Succeeded.
Aug 20 10:57:52 machine systemd[1]: Stopped Clam AntiVirus userspace daemon.
If you have created symbolic link of clamav daemon to start the program automatically when pc boot then you need to remove that link so that clamav shouldn't start automatically
$ sudo systemctl disable clamav-daemon

uWSGI runs Python 2 with Plugin Python36 -> doesn't find Django in Venv

I'm trying to setup a simple Django project with Nginx, uWSGI on my Centos7-Server with this Tutorial:
How to Serve Django Applications with uWSGI and Nginx on CentOS 7
But I've tried to change this project into running Django 2 with Python 3.6
Everything worked pretty well, till creating firstsite.ini file.
1 [uwsgi]
2 project = firstsite
3 username = user
4 base = /home/%(username)
5 plugins-dir = /usr/lib64/uwsgi/
6 plugin = python36
7 virtualenv = %(base)/Env/%(project)
8 chdir = %(base)/%(project)
9 home = %(base)/Env/%(project)
10 module = %(project).wsgi:application
11
12 master = true
13 processes = 5
14
15 uid = %(username)
16 socket = /run/uwsgi/%(project).sock
17 chown-socket = %(username):nginx
18 chmod-socket = 660
19 vacuum = true
There I got stuck into. While setting up and trying to reach the Django Site I got an Internal Server Error. After checking error-log files and messages, I've implemented logto into my .ini file::
21 #Error Logs
22 logto = %(base)/%(project)/error.log
after checking this file it tells me this Error-Message::
*** Starting uWSGI 2.0.18 (64bit) on [Wed Aug 14 13:27:24 2019] ***
compiled with version: 4.8.5 20150623 (Red Hat 4.8.5-36) on 23 July 2019 10:27:56
os: Linux-3.10.0-957.21.3.el7.x86_64 #1 SMP Tue Jun 18 16:35:19 UTC 2019
nodename: ip-172-31-34-37.eu-central-1.compute.internal
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 1
current working directory: /etc/uwsgi/sites
detected binary path: /usr/bin/uwsgi
chdir() to /home/user/firstsite
your processes number limit is 3775
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)
uwsgi socket 0 bound to UNIX address /run/uwsgi/firstsite.sock fd 3
setuid() to 1001
Python version: 2.7.5 (default, Jun 20 2019, 20:27:34) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
Set PythonHome to /home/user/Env/firstsite
*** Python threads support is disabled. You can enable it with --enable-threads ***
Python main interpreter initialized at 0x234f0e0
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 437520 bytes (427 KB) for 5 cores
*** Operational MODE: preforking ***
Traceback (most recent call last):
File "./firstsite/wsgi.py", line 12, in <module>
from django.core.wsgi import get_wsgi_application
ImportError: No module named django.core.wsgi
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode ***
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 21976)
spawned uWSGI worker 1 (pid: 21978, cores: 1)
spawned uWSGI worker 2 (pid: 21979, cores: 1)
spawned uWSGI worker 3 (pid: 21980, cores: 1)
spawned uWSGI worker 4 (pid: 21981, cores: 1)
spawned uWSGI worker 5 (pid: 21982, cores: 1)
If I manually try to get this django project runing with the same Env, there is no problem. So I thought that it could be because of the fact that uwsgi is running Python 2.7.5 instead of Python 3.6.
I also checked the plugin python with uwsgi --plugin python36 -s:0
*** Starting uWSGI 2.0.18 (64bit) on [Thu Aug 15 04:16:19 2019] ***
compiled with version: 4.8.5 20150623 (Red Hat 4.8.5-36) on 14 August 2019 14:16:35
os: Linux-3.10.0-957.21.3.el7.x86_64 #1 SMP Tue Jun 18 16:35:19 UTC 2019
nodename: ip-172-31-34-37.eu-central-1.compute.internal
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 1
current working directory: /usr/lib64/uwsgi
detected binary path: /usr/local/bin/uwsgi
*** WARNING: you are running uWSGI without its master process manager ***
your processes number limit is 3775
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)
uwsgi socket 0 bound to TCP address :37796 (port auto-assigned) fd 3
Python version: 3.6.8 (default, Apr 25 2019, 21:02:35) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
*** Python threads support is disabled. You can enable it with --enable-threads ***
Python main interpreter initialized at 0x17756c0
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 72920 bytes (71 KB) for 1 cores
*** Operational MODE: single process ***
*** no app loaded. going in full dynamic mode ***
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI worker 1 (and the only) (pid: 6476, cores: 1)
So it looks to me, that I've created my 36-plugin the right way.
Would be really grateful if someone could help me out.
this is where the real problem is it can't find django
are you sure that django is installed in that environment you mentioned?
i mean "Env"
Traceback (most recent call last):
File "./firstsite/wsgi.py", line 12, in <module>
from django.core.wsgi import get_wsgi_application
ImportError: No module named django.core.wsgi
in that link you mentioned i couldn't find
virtualenv = %(base)/Env/%(project)
try changing it to
virtualenv = %(base)/Env
if that didnt solve your problem please specify django, python versions you are using plus your project structure

When I deployed django project with django+nginx+uwsgi, I found that uwsgi could not start up

I did not report an error when I started, but only one,it seems not work,i need help ,thank you a lot!
root#localhost:/home/sscc/sscc2019# uwsgi --ini uwsgi.ini
[uWSGI] getting INI configuration from uwsgi.ini
root#localhost:/home/sscc/sscc2019# ps aux|grep uwsgi
root 11018 0.0 0.0 14224 1032 pts/0 S+ 09:03 0:00 grep --color=auto uwsgi
this is my nginx ,it seems like working
root#localhost:/home/sscc/sscc2019# ps aux|grep nginx
root 10997 0.0 0.0 125120 1456 ? Ss 08:55 0:00 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
www-data 10998 0.0 0.0 125444 3188 ? S 08:55 0:00 nginx: worker process
www-data 10999 0.0 0.0 125444 3188 ? S 08:55 0:00 nginx: worker process
root 11024 0.0 0.0 14224 932 pts/0 S+ 09:04 0:00 grep --color=auto nginx
this is my uwsgi.log:
*** Starting uWSGI 2.0.12-debian (64bit) on [Tue Mar 19 08:09:12 2019] ***
compiled with version: 5.4.0 20160609 on 28 September 2018 15:49:44
os: Linux-4.4.0-142-generic #168-Ubuntu SMP Wed Jan 16 21:00:45 UTC 2019
nodename: localhost
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 2
current working directory: /home/sscc/sscc2019
writing pidfile to uwsgi.pid
detected binary path: /usr/bin/uwsgi-core
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
chdir() to home/sscc/sscc2019
chdir(): No such file or directory [core/uwsgi.c line 2586]
*** Starting uWSGI 2.0.18 (64bit) on [Tue Mar 19 08:52:06 2019] ***
compiled with version: 5.4.0 20160609 on 15 March 2019 06:07:24
os: Linux-4.4.0-142-generic #168-Ubuntu SMP Wed Jan 16 21:00:45 UTC 2019
nodename: localhost
machine: x86_64
clock source: unix
detected number of CPU cores: 2
current working directory: /home/sscc/sscc2019
writing pidfile to /home/sscc/sscc2019/uwsgi.pid
detected binary path: /usr/local/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
uWSGI running as root, you can use --uid/--gid/--chroot options
setgid() to 2000
setuid() to 1000
chdir() to home/sscc/sscc2019
chdir(): No such file or directory [core/uwsgi.c line 2623]
/home/sscc/sscc2019/uwsgi.ini:
[uwsgi]
socket=127.0.0.1:8000
chdir=home/sscc/sscc2019
wsgi-file=sscc2019/wsgi.py
processes=4
threads=2
master=True
pidfile=/home/sscc/sscc2019/uwsgi.pid
daemonize=/home/sscc/sscc2019/uswgi.log
module=sscc2019.wsgi:application
vacuum=true
chmod-socket=666
virtualenv=/root/.virtualenvs/ssccenv
harakiri=60
max-requests=5000
uid=1000
gid=2000
/etc/nginx/site-available/sscc2019.conf
root#localhost:/etc/nginx/sites-available# ls
default sscc2019.conf
server{
listen 80;
charset utf-8;
server_name IP;
client_max_body_size 75M;
location / {
include /home/sscc/sscc2019/uwsgi_params;
uwsgi_pass 127.0.0.1:8000;
}
location /static {
alias /var/www/sscc2019/static;
}
location /media {
alias /home/sscc/sscc2019/media;
}
}
When I tried to start uwsgi, I didn't prompt me to fail to start, but when I used the command to view it, I didn't seem to have started successfully. I really want to know what caused this. How should I modify it?
AND PLEASE:
*** Starting uWSGI 2.0.18 (64bit) on [Tue Mar 19 12:35:02 2019] ***
compiled with version: 5.4.0 20160609 on 19 March 2019 03:25:55
os: Linux-4.4.0-142-generic #168-Ubuntu SMP Wed Jan 16 21:00:45 UTC 2019
nodename: localhost
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 2
current working directory: /home/sscc/sscc2019
writing pidfile to /home/sscc/sscc2019/uwsgi.pid
detected binary path: /usr/local/bin/uwsgi
uWSGI running as root, you can use --uid/--gid/--chroot options
setgid() to 2000
setuid() to 1000
chdir() to /home/sscc/sscc2019
your processes number limit is 15655
your memory page size is 4096 bytes
detected max file descriptor number: 65535
lock engine: pthread robust mutexes
thunder lock: enabled
probably another instance of uWSGI is running on the same address (127.0.0.1:8000).
bind(): Address already in use [core/socket.c line 769]

Starting clamav as systemd service fails

I have installed ClamAV in CentOS 7.3 and have problems when starting clamd as a systemd service.
When I start clamd manually from the command line (/usr/sbin/clamd -c /etc/clamd.conf), everything goes well and I can connect using clamdscan.
When I start clamd via systemd, (systemctl start clamd), clamd
starts and, after a few seconds, terminates with the message 'Waiting
for all threads to finish' in the log file.
Has anyone any idea why clamd starts OK from the command line but not
as a service? Configuration and log files follows. Thank you.
/usr/lib/systemd/system/clamd.service:
[Unit]
Description = clamd scanner daemon
After = network.target
[Service]
ExecStart = /usr/sbin/clamd -c /etc/clamd.conf
PrivateTmp = true
[Install]
WantedBy=multi-user.target
/etc/clamd.conf:
LogFile /tmp/clamd.log
LogTime true
LogVerbose true
TCPSocket 3310
TCPAddr localhost
logfile:
Thu Aug 31 09:52:18 2017 -> +++ Started at Thu Aug 31 09:52:18 2017
Thu Aug 31 09:52:18 2017 -> Received 0 file descriptor(s) from systemd
Thu Aug 31 09:52:18 2017 -> clamd daemon 0.99.2 (OS: linux-gnu, ARCH: x86_64, CPU: x86_64)
Thu Aug 31 09:52:18 2017 -> Log file size limited to 1048576 bytes.
Thu Aug 31 09:52:18 2017 -> Reading databases from /var/lib/clamav
Thu Aug 31 09:52:18 2017 -> Not loading PUA signatures.
Thu Aug 31 09:52:18 2017 -> Bytecode: Security mode set to "TrustSigned".
Thu Aug 31 09:52:24 2017 -> Loaded 6303399 signatures.
Thu Aug 31 09:52:26 2017 -> TCP: Bound to [127.0.0.1]:3310
Thu Aug 31 09:52:26 2017 -> TCP: Stting connection queue length to 200
Thu Aug 31 09:52:26 2017 -> Limits: Global size limit set to 104857600 bytes.
Thu Aug 31 09:52:26 2017 -> Limits: File size limit set to 26214400 bytes.
Thu Aug 31 09:52:26 2017 -> Limits: Recursion level limit set to 16.
Thu Aug 31 09:52:26 2017 -> Limits: Files limit set to 10000.
Thu Aug 31 09:52:26 2017 -> Limits: Core-dump limit is 0.
Thu Aug 31 09:52:26 2017 -> Limits: MaxEmbeddedPE limit set to 10485760 bytes.
Thu Aug 31 09:52:26 2017 -> Limits: MaxHTMLNormalize limit set to 10485760 bytes.
Thu Aug 31 09:52:26 2017 -> Limits: MaxHTMLNoTags limit set to 2097152 bytes.
Thu Aug 31 09:52:26 2017 -> Limits: MaxScriptNormalize limit set to 5242880 bytes.
Thu Aug 31 09:52:26 2017 -> Limits: MaxZipTypeRcg limit set to 1048576 bytes.
Thu Aug 31 09:52:26 2017 -> Limits: MaxPartitions limit set to 50.
Thu Aug 31 09:52:26 2017 -> Limits: MaxIconsPE limit set to 100.
Thu Aug 31 09:52:26 2017 -> Limits: MaxRecHWP3 limit set to 16.
Thu Aug 31 09:52:26 2017 -> Limits: PCREMatchLimit limit set to 10000.
Thu Aug 31 09:52:26 2017 -> Limits: PCRERecMatchLimit set to 5000.
Thu Aug 31 09:52:26 2017 -> Limits: PCREMaxFileSize limit set to 26214400.
Thu Aug 31 09:52:26 2017 -> Archive support enabled.
Thu Aug 31 09:52:26 2017 -> Algorithmic detection enabled.
Thu Aug 31 09:52:26 2017 -> Portable Executable support enabled.
Thu Aug 31 09:52:26 2017 -> ELF support enabled.
Thu Aug 31 09:52:26 2017 -> Mail files support enabled.
Thu Aug 31 09:52:26 2017 -> OLE2 support enabled.
Thu Aug 31 09:52:26 2017 -> PDF support enabled.
Thu Aug 31 09:52:26 2017 -> SWF support enabled.
Thu Aug 31 09:52:26 2017 -> HTML support enabled.
Thu Aug 31 09:52:26 2017 -> XMLDOCS support enabled.
Thu Aug 31 09:52:26 2017 -> HWP3 support enabled.
Thu Aug 31 09:52:26 2017 -> Self checking every 600 seconds.
Thu Aug 31 09:52:26 2017 -> Listening daemon: PID: 5518
Thu Aug 31 09:52:26 2017 -> MaxQueue set to: 100
Thu Aug 31 09:52:28 2017 -> Waiting for all threads to finish.
Thu Aug 31 09:52:29 2017 -> Shutting down the main socket.
Thu Aug 31 09:52:29 2017 -> --- Stopped at Thu Aug 31 09:52:29 2017
Thu Aug 31 09:52:29 2017 -> Closing the main socket
systemctl status clamd
clamd.service - clamd scanner daemon
Loaded: loaded (/usr/lib/systemd/system/clamd.service; enabled; vendor preset: disabled)
Active: inactive (dead) since Thu 2017-08-31 09:52:29 UTC; 42 min ago
Main PID: 5516 (code=exited, status=0/SUCCESS)
Aug 31 09:52:18 localhost.localdomain systemd[1]: Started clamd scanner daemon.
Aug 31 09:52:18 localhost.localdomain systemd[1]: Starting clamd scanner daemon ...
I messed up at the installation and missed installing, among other things, the clamav-server-systemd package.
Works alright now.

uwsgi error bind(): Permission denied [core/socket.c line 769]

Setting up django to use uwsgi I can run it using the command uwsgi --ini kb_uwsgi.ini --http :8000 outside the virtualenv however trying to run the emperor command sudo uwsgi --emperor /etc/uwsgi/vassals --uid www-data --gid www-data brings an error:
ubuntu#ip-172-31-16-133:/etc/uwsgi/vassals$ ls
kb_uwsgi.ini
ubuntu#ip-172-31-16-133:/etc/uwsgi/vassals$ sudo uwsgi --emperor /etc/uwsgi/vassals --uid www-data --gid www-data
*** Starting uWSGI 2.0.14 (64bit) on [Mon Jan 30 10:28:11 2017] ***
compiled with version: 5.4.0 20160609 on 06 January 2017 11:55:37
os: Linux-4.4.0-53-generic #74-Ubuntu SMP Fri Dec 2 15:59:10 UTC 2016
nodename: ip-172-31-16-133
machine: x86_64
clock source: unix
detected number of CPU cores: 4
current working directory: /etc/uwsgi/vassals
detected binary path: /usr/local/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
setgid() to 33
setuid() to 33
*** WARNING: you are running uWSGI without its master process manager ***
your processes number limit is 64137
your memory page size is 4096 bytes
detected max file descriptor number: 1024
*** starting uWSGI Emperor ***
*** has_emperor mode detected (fd: 6) ***
[uWSGI] getting INI configuration from kb_uwsgi.ini
*** Starting uWSGI 2.0.14 (64bit) on [Mon Jan 30 10:28:11 2017] ***
compiled with version: 5.4.0 20160609 on 06 January 2017 11:55:37
os: Linux-4.4.0-53-generic #74-Ubuntu SMP Fri Dec 2 15:59:10 UTC 2016
nodename: ip-172-31-16-133
machine: x86_64
clock source: unix
detected number of CPU cores: 4
current working directory: /etc/uwsgi/vassals
detected binary path: /usr/local/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
chdir() to /home/ubuntu/webapps/kenyabuzz
your processes number limit is 64137
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 769]
Mon Jan 30 10:28:11 2017 - [emperor] curse the uwsgi instance kb_uwsgi.ini (pid: 25612)
Mon Jan 30 10:28:14 2017 - [emperor] removed uwsgi instance kb_uwsgi.ini
*** has_emperor mode detected (fd: 6) ***
[uWSGI] getting INI configuration from kb_uwsgi.ini
*** Starting uWSGI 2.0.14 (64bit) on [Mon Jan 30 10:28:16 2017] ***
compiled with version: 5.4.0 20160609 on 06 January 2017 11:55:37
os: Linux-4.4.0-53-generic #74-Ubuntu SMP Fri Dec 2 15:59:10 UTC 2016
nodename: ip-172-31-16-133
machine: x86_64
clock source: unix
detected number of CPU cores: 4
current working directory: /etc/uwsgi/vassals
detected binary path: /usr/local/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
chdir() to /home/ubuntu/webapps/kenyabuzz
your processes number limit is 64137
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 769]
Mon Jan 30 10:28:16 2017 - [emperor] curse the uwsgi instance kb_uwsgi.ini (pid: 25613)
Mon Jan 30 10:28:19 2017 - [emperor] removed uwsgi instance kb_uwsgi.ini
*** has_emperor mode detected (fd: 6) ***
[uWSGI] getting INI configuration from kb_uwsgi.ini
*** Starting uWSGI 2.0.14 (64bit) on [Mon Jan 30 10:28:22 2017] ***
compiled with version: 5.4.0 20160609 on 06 January 2017 11:55:37
os: Linux-4.4.0-53-generic #74-Ubuntu SMP Fri Dec 2 15:59:10 UTC 2016
nodename: ip-172-31-16-133
machine: x86_64
clock source: unix
detected number of CPU cores: 4
current working directory: /etc/uwsgi/vassals
detected binary path: /usr/local/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
chdir() to /home/ubuntu/webapps/kenyabuzz
your processes number limit is 64137
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 769]
Mon Jan 30 10:28:22 2017 - [emperor] curse the uwsgi instance kb_uwsgi.ini (pid: 25614)
^C[emperor] *** RAGNAROK EVOKED ***
Mon Jan 30 10:28:25 2017 - [emperor] removed uwsgi instance kb_uwsgi.ini
Mon Jan 30 10:28:25 2017 - [emperor] unloyal bad behaving vassal found: kb_uwsgi.ini throttling it...
Mon Jan 30 10:28:25 2017 - The Emperor is buried.
Here's the uwsgi file
# kb_uwsgi.ini file
[uwsgi]
http = :80
# Django-related settings
# the base directory (full path)
chdir = /home/ubuntu/webapps/kenyabuzz
# Django's wsgi file
module = kb.wsgi
# the virtualenv (full path)
home = /home/ubuntu/webapps/djangoenv
# process-related settings
# master
master = true
# maximum number of worker processes
processes = 10
# the socket (use the full path to be safe
socket = /tmp/kb.sock
# ... with appropriate permissions - may be needed
chmod-socket = 664
# clear environment on exit
#vacuum = true
In the uwsgi file http port 80 is configured. By default, normal users are not allowed to bind to this port. That is why you are getting bind(): Permission denied. You can either give permission to the www-data user to use that port or use a different port.