Hi List,
I upgraded my 3.5.4 installation of NAV to the latest Beta (3.6.0b4) and ran into the error posted below. I configured NAV from scratch, updated the Database with the pgsql scripts and everything seems to be fine: I can login using a LDAP backend, see the welcome page and user information etc - but as soon as I click on 'Toolbox' I receive an error message.
It thought it might be related to the 'ForgetSQL thing' but according to this list, ForgetSQL is not a requirement any more (starting with 3.6) - or am I wrong on this one?
My system is Ubuntu 9.04, running with Python 2.5.4 and 2.6.2 installed. ForgetSQL is 0.5.1.
== snip ==
MOD_PYTHON ERROR
ProcessId: 22003 Interpreter: '<hostname>'
ServerName: '<hostname>' DocumentRoot: '/usr/local/nav/apache/webroot'
URI: '/toolbox/' Location: None Directory: '/usr/local/nav/apache/webroot/toolbox/' Filename: '/usr/local/nav/apache/webroot/toolbox/' PathInfo: ''
Phase: 'PythonHandler' Handler: 'toolbox'
Traceback (most recent call last):
File "/usr/lib/python2.6/dist-packages/mod_python/importer.py", line 1537, in HandlerDispatch default=default_handler, arg=req, silent=hlist.silent)
File "/usr/lib/python2.6/dist-packages/mod_python/importer.py", line 1229, in _process_target result = _execute_target(config, req, object, arg)
File "/usr/lib/python2.6/dist-packages/mod_python/importer.py", line 1128, in _execute_target result = object(arg)
File "/usr/local/nav/apache/webroot/toolbox/toolbox.py", line 39, in handler page.tools = toolbox.filterToolList(toolbox.getToolList(), req.session['user'])
File "/usr/local/nav/lib/python/nav/web/toolbox.py", line 71, in filterToolList if nav.auth.hasPrivilege(user, 'web_access', tool.uri):
File "/usr/local/nav/lib/python/nav/auth.py", line 58, in hasPrivilege raise "user parameter is of invalid type %s" % type(user)
TypeError: exceptions must be classes or instances, not str
MODULE CACHE DETAILS
Accessed: Wed Jul 21 14:12:30 2010 Generation: 1
_mp_34a3546f4bff52bdef2b9323a235d99b { FileName: '/usr/local/nav/apache/webroot/toolbox/toolbox.py' Instance: 1 [IMPORT] Generation: 2 Modified: Mon Nov 16 11:51:45 2009 Imported: Wed Jul 21 14:12:30 2010 }
== snip ==
Any help would be appreciated!
Regards,
Rudolph Bott
On Wed, Jul 21, 2010 at 02:25:02PM +0200, Rudolph Bott wrote:
information etc - but as soon as I click on 'Toolbox' I receive an error message.
It thought it might be related to the 'ForgetSQL thing' but according to this list, ForgetSQL is not a requirement any more (starting with 3.6) - or am I wrong on this one?
forgetSQL is no longer used by NAV, correct.
File "/usr/local/nav/lib/python/nav/auth.py", line 58, in hasPrivilege raise "user parameter is of invalid type %s" % type(user)
TypeError: exceptions must be classes or instances, not str
This is Python 2.6 complaining (this was deprecated in 2.5, but removed entirely from 2.6, hence the error). The referenced code, however, is not present in NAV 3.6.0b4, which leads me to think:
1. Some old, deprecated modules might be still be around in your file system. Did you delete all the ones specified in the release notes?
2. Apache/mod_python may in part still be serving old code. Please restart Apache after upgrading.
Any help would be appreciated!
Hope this helps :)
Hey Morten,
Am Donnerstag, den 22.07.2010, 19:10 +0100 schrieb Morten Brekkevold:
On Wed, Jul 21, 2010 at 02:25:02PM +0200, Rudolph Bott wrote:
information etc - but as soon as I click on 'Toolbox' I receive an error message.
It thought it might be related to the 'ForgetSQL thing' but according to this list, ForgetSQL is not a requirement any more (starting with 3.6) - or am I wrong on this one?
forgetSQL is no longer used by NAV, correct.
File "/usr/local/nav/lib/python/nav/auth.py", line 58, in hasPrivilege raise "user parameter is of invalid type %s" % type(user)
TypeError: exceptions must be classes or instances, not str
This is Python 2.6 complaining (this was deprecated in 2.5, but removed entirely from 2.6, hence the error). The referenced code, however, is not present in NAV 3.6.0b4, which leads me to think:
- Some old, deprecated modules might be still be around in your file system.
Did you delete all the ones specified in the release notes?
oops, I did a make install and did not move the old /usr/local/nav folder out of the way. I did that now, replaced the fresh etc-folder with the backuped-one but now I cannot start nav alltogether:
root@dkvfs033:/usr/local/nav# nav start /usr/local/nav/lib/python/nav/models/profiles.py:23: DeprecationWarning: the md5 module is deprecated; use hashlib instead import md5 Starting: cricket logengine mactrace maintengine networkDiscovery thresholdMon Failed: alertengine eventengine getDeviceData ipdevpoll pping servicemon smsd snmptrapd
Nothing in the var/log folder whatsoever :(
- Apache/mod_python may in part still be serving old code. Please restart
Apache after upgrading.
Did that several times already :)
Any help would be appreciated!
Hope this helps :)
On Fri, Jul 23, 2010 at 08:06:36AM +0200, Rudolph Bott wrote:
oops, I did a make install and did not move the old /usr/local/nav folder out of the way. I did that now, replaced the fresh etc-folder with the backuped-one but now I cannot start nav alltogether:
root@dkvfs033:/usr/local/nav# nav start /usr/local/nav/lib/python/nav/models/profiles.py:23: DeprecationWarning: the md5 module is deprecated; use hashlib instead import md5 Starting: cricket logengine mactrace maintengine networkDiscovery thresholdMon Failed: alertengine eventengine getDeviceData ipdevpoll pping servicemon smsd snmptrapd
Nothing in the var/log folder whatsoever :(
By "nothing", do you mean that the log files are empty, or that there are no log files at all in /usr/local/nav/var/log/ ? Please make sure NAV processes has the necessary write permissions in /usr/local/nav/var (as it says in the install guide).