Unable to open application on gunicorn

Hi all,

I have activated environment, then started application on gunicorn using below command
env/bin/gunicorn -b 0.0.0.0:8555 -w 2 -t 120 frappe.app:application

Result of the above command is 
2014-07-08 15:58:19 [11713] [INFO] Starting gunicorn 18.0
2014-07-08 15:58:19 [11713] [INFO] Listening at: http://0.0.0.0:8555 (11713)
2014-07-08 15:58:19 [11713] [INFO] Using worker: sync
2014-07-08 15:58:19 [11718] [INFO] Booting worker with pid: 11718
2014-07-08 15:58:19 [11719] [INFO] Booting worker with pid: 11719

When i open application through browser i got following error on terminal

2014-07-08 15:53:48 [11424] [ERROR] Error handling request
Traceback (most recent call last):
  File "/home/indictrans/environments/frappe/lagan/frappe-bench/env/local/lib/python2.7/site-packages/gunicorn/workers/sync.py", line 131, in handle_request
    respiter = self.wsgi(environ, resp.start_response)
  File "/home/indictrans/environments/frappe/lagan/frappe-bench/env/local/lib/python2.7/site-packages/werkzeug/local.py", line 224, in application
    return ClosingIterator(app(environ, start_response), self.cleanup)
  File "/home/indictrans/environments/frappe/lagan/frappe-bench/env/local/lib/python2.7/site-packages/werkzeug/wrappers.py", line 286, in application
    return f(*args[:-2] + (request,))(*args[-2:])
  File "/home/indictrans/environments/frappe/lagan/frappe-bench/apps/frappe/frappe/app.py", line 37, in application
    init_site(request)
  File "/home/indictrans/environments/frappe/lagan/frappe-bench/apps/frappe/frappe/app.py", line 102, in init_site
    frappe.init(site=site, sites_path=_sites_path)
  File "/home/indictrans/environments/frappe/lagan/frappe-bench/apps/frappe/frappe/__init__.py", line 109, in init
    setup_module_map()
  File "/home/indictrans/environments/frappe/lagan/frappe-bench/apps/frappe/frappe/__init__.py", line 448, in setup_module_map
    for app in get_all_apps(True):
  File "/home/indictrans/environments/frappe/lagan/frappe-bench/apps/frappe/frappe/__init__.py", line 391, in get_all_apps
    apps = get_file_items(os.path.join(sites_path, "apps.txt"), raise_not_found=True)
  File "/home/indictrans/environments/frappe/lagan/frappe-bench/apps/frappe/frappe/__init__.py", line 460, in get_file_items
    content = read_file(path, raise_not_found=raise_not_found)
  File "/home/indictrans/environments/frappe/lagan/frappe-bench/apps/frappe/frappe/__init__.py", line 476, in read_file
    raise IOError("{} Not Found".format(path))
IOError: ./apps.txt Not Found


Thanks, Rohit



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/d42dae25-b5fd-4330-8a8a-7f92809b2ad6%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.

Run it from the sites directory (apps.txt not found should have been a hint).

On Tue, Jul 8, 2014 at 7:35 PM, Rohit Waghchaure
ro...@indictranstech.com wrote:

Hi all,

I have activated environment, then started application on gunicorn using
below command
env/bin/gunicorn -b 0.0.0.0:8555 -w 2 -t 120 frappe.app:application

Result of the above command is
2014-07-08 15:58:19 [11713] [INFO] Starting gunicorn 18.0
2014-07-08 15:58:19 [11713] [INFO] Listening at: http://0.0.0.0:8555 (11713)
2014-07-08 15:58:19 [11713] [INFO] Using worker: sync
2014-07-08 15:58:19 [11718] [INFO] Booting worker with pid: 11718
2014-07-08 15:58:19 [11719] [INFO] Booting worker with pid: 11719

When i open application through browser i got following error on terminal

2014-07-08 15:53:48 [11424] [ERROR] Error handling request
Traceback (most recent call last):
File
“/home/indictrans/environments/frappe/lagan/frappe-bench/env/local/lib/python2.7/site-packages/gunicorn/workers/sync.py”,
line 131, in handle_request
respiter = self.wsgi(environ, resp.start_response)
File
“/home/indictrans/environments/frappe/lagan/frappe-bench/env/local/lib/python2.7/site-packages/werkzeug/local.py”,
line 224, in application
return ClosingIterator(app(environ, start_response), self.cleanup)
File
“/home/indictrans/environments/frappe/lagan/frappe-bench/env/local/lib/python2.7/site-packages/werkzeug/wrappers.py”,
line 286, in application
return f(*args[:-2] + (request,))(*args[-2:])
File
“/home/indictrans/environments/frappe/lagan/frappe-bench/apps/frappe/frappe/app.py”,
line 37, in application
init_site(request)
File
“/home/indictrans/environments/frappe/lagan/frappe-bench/apps/frappe/frappe/app.py”,
line 102, in init_site
frappe.init(site=site, sites_path=_sites_path)
File
“/home/indictrans/environments/frappe/lagan/frappe-bench/apps/frappe/frappe/init.py”,
line 109, in init
setup_module_map()
File
“/home/indictrans/environments/frappe/lagan/frappe-bench/apps/frappe/frappe/init.py”,
line 448, in setup_module_map
for app in get_all_apps(True):
File
“/home/indictrans/environments/frappe/lagan/frappe-bench/apps/frappe/frappe/init.py”,
line 391, in get_all_apps
apps = get_file_items(os.path.join(sites_path, “apps.txt”),
raise_not_found=True)
File
“/home/indictrans/environments/frappe/lagan/frappe-bench/apps/frappe/frappe/init.py”,
line 460, in get_file_items
content = read_file(path, raise_not_found=raise_not_found)
File
“/home/indictrans/environments/frappe/lagan/frappe-bench/apps/frappe/frappe/init.py”,
line 476, in read_file
raise IOError(“{} Not Found”.format(path))
IOError: ./apps.txt Not Found

Thanks, Rohit


Note:

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much
    information as you can. Please see it from the point of view of the person
    receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send
    only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do
    not send images as attachments. Links are good. Same goes for any file you
    are going to send.

End of Note

You received this message because you are subscribed to the Google Groups
“ERPNext Developer Forum” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to erpnext-developer-forum+un...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/erpnext-developer-forum/d42dae25-b5fd-4330-8a8a-7f92809b2ad6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Pratik
erpnext