Thanks. I originally started with a clean install of the new version and tried it untouched. That didn't work.
I have always meant to create a more repeatable install and config so I am going to try one of Bruno's scripts from the slices. That way as I make changes I'll capture them in the script. Still it is frustrating when it's unclear why something that worked subsequently broke. On Tuesday, January 15, 2013 5:22:10 AM UTC-8, Niphlod wrote: > > using an extract of the latest version of the install script, this > works..... try to pin down the differences between this and your config.... > > <uwsgi> > <socket>/tmp/web2py.socket</socket> > <pythonpath>/home/www-data/web2py/</pythonpath> > <mount>/=wsgihandler:application</mount> > <master/> > <processes>4</processes> > <harakiri>60</harakiri> > <reload-mercy>8</reload-mercy> > <cpu-affinity>1</cpu-affinity> > <stats>/tmp/stats.socket</stats> > <max-requests>2000</max-requests> > <limit-as>512</limit-as> > <reload-on-as>256</reload-on-as> > <reload-on-rss>192</reload-on-rss> > <uid>www-data</uid> > <gid>www-data</gid> > <no-orphans/> > </uwsgi> > > The thing is ...... > > path = os.path.dirname(os.path.abspath(__file__)) > os.chdir(path) > sys.path = [path] + [p for p in sys.path if not p == path] > > is at the top of wsgihandler.py , so it chdir's to the dir where > wsgihandler is, and usually in that dir there's the gluon one holding all > the modules of web2py. > > Triple check and get back with your findings.... > > Il giorno martedì 15 gennaio 2013 13:15:37 UTC+1, Lewis ha scritto: >> >> I tried to run the auto upgrade to the latest version. Worked on >> Windows/Rocket several times. Would not work on my linode vps because of >> various permissions problems. Not a big deal. >> >> Uploaded and unzipped the zip file in /var/web2py. Set permissions so >> that www-data is the group for all files with rw access. >> >> My constant result is uWSGI Error Python Application not found. Prior to >> the update, this had never occurred. In the update, I did not modify my >> uWSGI config at all. >> >> Here is the uWSGI log: >> >> >> *** Starting uWSGI 1.2.3 (32bit) on [Tue Jan 15 11:41:15 2013] *** >> compiled with version: 4.6.1 on 17 May 2012 23:33:21 >> detected number of CPU cores: 4 >> current working directory: / >> writing pidfile to /var/run/uwsgi.pid >> detected binary path: /usr/local/bin/uwsgi >> uWSGI running as root, you can use --uid/--gid/--chroot options >> setgid() to 33 >> setuid() to 33 >> your memory page size is 4096 bytes >> detected max file descriptor number: 1024 >> lock engine: pthread robust mutexes >> uwsgi socket 0 bound to UNIX address /tmp/web2py.sock fd 3 >> Python version: 2.7.2+ (default, Oct 4 2011, 20:29:37) [GCC 4.6.1] >> *** Python threads support is disabled. You can enable it with >> --enable-threads *** >> Python main interpreter initialized at 0x8d69538 >> your server socket listen backlog is limited to 100 connections >> *** Operational MODE: preforking *** >> added /var/web2py/ to pythonpath. >> Traceback (most recent call last): >> File "/var/web2py/wsgihandler.py", line 33, in <module> >> import gluon.main >> ImportError: No module named gluon.main >> unable to load app 0 (mountpoint='') (callable not found or import error) >> *** no app loaded. going in full dynamic mode *** >> *** uWSGI is running in multiple interpreter mode *** >> spawned uWSGI master process (pid: 23798) >> spawned uWSGI worker 1 (pid: 23799, cores: 1) >> spawned uWSGI worker 2 (pid: 23800, cores: 1) >> spawned uWSGI worker 3 (pid: 23801, cores: 1) >> spawned uWSGI worker 4 (pid: 23802, cores: 1) >> >> >> You can see in the log that the import of gluon.main fails. I tried a >> very old hint from Massimo to hard code the path to web2py in >> wsgihandler.py. This is what lines of wsgihandler.py up to that point look >> like: >> >> login as: root >> [email protected]'s password: >> Welcome to Ubuntu 11.10 (GNU/Linux 3.0.18-linode43 i686) >> >> * Documentation: https://help.ubuntu.com/ >> #!/usr/bin/env python >> # -*- coding: utf-8 -*- >> >> """ >> This file is part of the web2py Web Framework >> Copyrighted by Massimo Di Pierro <[email protected]> >> License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) >> >> >> This is a WSGI handler for Apache >> Requires apache+mod_wsgi. >> >> In httpd.conf put something like: >> >> LoadModule wsgi_module modules/mod_wsgi.so >> WSGIScriptAlias / /path/to/wsgihandler.py >> >> """ >> >> # change these parameters as required >> LOGGING = False >> SOFTCRON = False >> >> import sys >> import os >> >> path = '/var/web2py' >> os.chdir(path) >> sys.path = [path] + [p for p in sys.path if not p == path] >> >> sys.stdout = sys.stderr >> >> import gluon.main >> >> if LOGGING: >> application = gluon.main.appfactory(wsgiapp=gluon.main.wsgibase, >> logfilename='httpserver.log', >> profilerfilename=None) >> else: >> application = gluon.main.wsgibase >> >> if SOFTCRON: >> from gluon.settings import global_settings >> global_settings.web2py_crontype = 'soft' >> >> >> >> I also set the sys.path for python to include both web2py and >> web2py/gluon in my uwsgi init script: >> PYTHONPATH=/var/web2py:/var/web2py/gluon. After doing this the uwsgi log >> reports added /var/web2py:/varweb2py/gluon to pythonpath. This resulted in >> a different import error--now it can't find wsgihandler ("ImportError: No >> module named wsgihandler"). >> >> This is very frustrating. Everything worked perfectly with earlier >> version of web2py. Config is just massively fragile with so many moving >> parts. >> >> Sorry for the long post. Thanks for your help. >> >> >> >> >> --

