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.

ADR
  • 323

3 Answers3

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/

teknopaul
  • 2,137
-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.

Ram
  • 1