How do I fix "chdir(): No such file or directory [uwsgi.c line 1723]" on in wsgi on nginx?
Solution 1:
The chdir error message indicates that it is trying to get a dir that doesn't exist.
It would appear from your displayed output that, that dir would either be /home/rajesh/treeio
or /home/treeio/
.
Given that the dir has been configured to act as a relevant django project dir, it would more likely be /home/treeio/
; but that configuration may only have been specified in the uwsgi.ini
that you have displayed.
Therefore, it is very likely to be in existence, and thus a permission problem, due to the fact that /home/treeio/
does not have to be in existence.
Solution 2:
A general tip on
chdir(): No such file or directory
type errors.
Its annoying when an error message says "file not found" but does not tell you what file its looking for. strace can help out, it prints all the system calls.
try
strace uwsgi --ini uwsgi.ini
output is cryptic but in there somewhere towards the end of the it should tell which directory is missing.
In this case probably /home/treeio/