9

I have treeio project in my home directory, now I want to run that treeio in nginx server. Already treeio can independently run on Django comes with the source. I don't want to run that in Django server, but I want to run it on nginx server. I just followed the steps given in this answer of Karthik.

However, while executing or following step 4 from that answer, it throws the following error:

[uWSGI] getting INI configuration from uwsgi.ini
* Starting uWSGI 1.0.3-debian (32bit) on [Thu Jun 27 17:22:01 2013] *
compiled with version: 4.6.3 on 17 July 2012 02:24:04
current working directory: /home/rajesh/treeio
detected binary path: /usr/bin/uwsgi-core
chdir(): No such file or directory [uwsgi.c line 1723]

My uwsgi.ini file contains

[uwsgi] 
# set the http port
http = :8080

# change to django project directory
chdir = /home/treeio/

# add /var/www to the pythonpath, in this way we can use the project.app format
pythonpath = /var/www

# set the project settings name
env = DJANGO_SETTINGS_MODULE=treeio.settings

# load django
module = django.core.handlers.wsgi:WSGIHandler()

Please help me in deploying treeio in nginx server.

2
  • Please include the configuration (uwsgi.ini and nginx) in your question. And also link to the answers/list of steps you're referring to (they're in another question?).
    – gertvdijk
    Jun 27 '13 at 12:28
  • @ADR did you ever figure out the answer to this problem? Feb 1 '16 at 16:28
2

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.

1

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/

-1

I have received the same error message. I have checked the error log file - django.log - available in /var/log/uwsgi/app/ and the changed project folder path to end with "/" in the /var/www/html/sites-enabled configuration file and solved the issue for me.

1
  • sites-enabled isn't usually in /var/www/html/, its usually in /etc/nginx or /etc/apache2, and the issue was with wsgi, not with nginx or apache.
    – rtaft
    Jun 3 '20 at 13:15

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.