Opened 12 years ago

Last modified 12 years ago

#10319 closed defect

Error with postgresql and Trac 1.0 — at Version 2

Reported by: mcdevil@… Owned by: branson
Priority: normal Component: DirectoryAuthPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0

Description (last modified by Ryan J Ollos)

I tried to upgraded from version 0.2.2 and have some problems

Installation:

  • since v0.3 a database upgrade is needed
  • this does only work if tracext.adauth.db.activedirectoryauthpluginsetup = enabled (this hint qould be good in the documentation)
  • the upgrade fails on postgresql with unknown type varcahar(32) -> typo: varchar(32)
  • the upgrade fails on postgresql with unknown type binary -> i tried: text

After this the installation and upgrade succeeds

But i've still an error:

  File "/usr/local/lib/python2.6/dist-packages/TracActiveDirectoryAuth-0.3.2-py2.6.egg/tracext/adauth/auth.py", line 139, in check_password
    dn = self._get_user_dn(user)
  File "/usr/local/lib/python2.6/dist-packages/TracActiveDirectoryAuth-0.3.2-py2.6.egg/tracext/adauth/auth.py", line 271, in _get_user_dn
    if self.has_user(user):
  File "/usr/local/lib/python2.6/dist-packages/TracActiveDirectoryAuth-0.3.2-py2.6.egg/tracext/adauth/auth.py", line 129, in has_user
    users = self.get_users()
  File "/usr/local/lib/python2.6/dist-packages/TracActiveDirectoryAuth-0.3.2-py2.6.egg/tracext/adauth/auth.py", line 73, in get_users
    userinfo = self.expand_group_users(self.auth_group)
  File "/usr/local/lib/python2.6/dist-packages/TracActiveDirectoryAuth-0.3.2-py2.6.egg/tracext/adauth/auth.py", line 97, in expand_group_users
    g = self._ad_search(self.base_dn, ldap.SCOPE_SUBTREE, groupfilter, ['member'])
  File "/usr/local/lib/python2.6/dist-packages/TracActiveDirectoryAuth-0.3.2-py2.6.egg/tracext/adauth/auth.py", line 439, in _ad_search
    cur.execute("SELECT lut,data FROM ad_cache WHERE id='%s'" % key)
  File "/usr/local/lib/python2.6/dist-packages/Trac-1.0-py2.6.egg/trac/db/util.py", line 66, in execute
    return self.cursor.execute(sql)
InternalError: FEHLER:  aktuelle Transaktion wurde abgebrochen, Befehle werden bis zum Ende der Transaktion ignoriert

Any idea what's wrong?

Change History (2)

comment:1 Changed 12 years ago by anonymous

There is also a problem with the query definition:

_ad_search:

cur.execute('SELECT lut,data FROM ad_cache WHERE id="%s"' % key)

postgresql does not like double quotes. I changed it to

cur.execute("SELECT lut,data FROM ad_cache WHERE id='%s'" % key)

for now. I don't know if it's the correct way.

comment:2 Changed 12 years ago by Ryan J Ollos

Description: modified (diff)
Note: See TracTickets for help on using tickets.