UWSGI Server log ... is it allowed to read a file ... which file?

I have a server running Django / Nginx / uWSGI with uWSGI in emperor mode, and the error log for it (vassal level error log, not emperor level log) has a permanent permission error every time it generates a new working one, like this:

Tue Jun 26 19:34:55 2012 - Updated uWSGI worker 2 (new pid: 9334)

Error opening file for reading: Permission denied

The problem is that I don’t know which file it will have. this is not a log file, obviously, as I look at it, and it writes it without problems. Any way to find out? I am running apt-get version of uWSGI 1.0.3-debian via Upstart on Ubuntu 12.04. The site is working well, except that it seems to be a memory leak ... therefore, I am looking at the log file. I experimented with changing the permissions of the entire / opt / directory to include the user uwsgiuser, but to no avail. I am using a TCP socket, so permissions should not be a problem. Is this a cache? Does it have its own permissions? If so, where?

My Upstart conf file description "uWSGI" start on runlevel [2345] stop on runlevel [06] respawn env UWSGI=/usr/bin/uwsgi env LOGTO=/var/log/uwsgi/emperor.log exec $UWSGI \ --master \ --emperor /etc/uwsgi/vassals \ --die-on-term \ --auto-procname \ --no-orphans \ --logto $LOGTO \ --logdate 

My Vassal ini file:

 [uwsgi] # Variables base = /opt/env/mysiteenv # Generic Config uid = uwsgiuser gid = uwsgiuser socket = 127.0.0.1:5050 master = true processes = 2 reload-on-as = 128 harakiri = 60 harakiri-verbose = true auto-procname = true plugins = http,python cache = 2000 home = %(base) pythonpath = %(base)/mysite module = wsgi logto = /opt/log/mysite/error.log logdate = true 
+7
source share
2 answers

The actual answer to this question seems to be this specific Ubuntu error:

https://bugs.launchpad.net/ubuntu/+source/libjpeg-turbo/+bug/1031718

You can solve the problem by putting the lines

 setuid uwsgiuser setgid uwsgiuser 

into your configuration file in the dropdown menu and removing the uid and gid settings from the uwsgi configuration.

+8
source

You can try the strace process and see what causes the error message, for example:

UWSGI=/usr/bin/uwsgi LOGTO=/var/log/uwsgi/emperor.log strace -f -o strace.log -etrace=open,write $UWSGI --master --emperor /etc/uwsgi/vassals --die-on-term --auto-procname --no-orphans --logto $LOGTO --logdate

+3
source

All Articles