Modify

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#10115 closed defect (wontfix)

Login fails with database exception

Reported by: lukem@… Owned by: Steffen Hoffmann
Priority: normal Component: AccountManagerPlugin
Severity: critical Keywords: needinfo IntegrityError
Cc: Trac Release: 0.12

Description

Installing a new trac instance from scratch on a windows 7 x64 box. Have installed, in sequence, the following. Anything with ez prefix was installed using easy_install

  • Python 2.7 x64
  • easy install 0.6c11
  • ez Genshi 0.6
  • ez docutils 0.9.1
  • ez pygments 1.5
  • ez babel 0.9.5
  • ez trac 12.3
  • ez accountManagerPlugin 0.3.2 (had to download zip and extract and put file path not url)

Creation of a user using the registration module appears to work. No errors are shown and a line appears in the trac.htpasswd file

When trying to login the following error message occurs

Traceback (most recent call last):
  File "build\bdist.win-amd64\egg\trac\web\api.py", line 441, in send_error
    data, 'text/html')
  File "build\bdist.win-amd64\egg\trac\web\chrome.py", line 825, in render_template
    message = req.session.pop('chrome.%s.%d' % (type_, i))
  File "build\bdist.win-amd64\egg\trac\web\api.py", line 216, in __getattr__
    value = self.callbacks[name](self)
  File "build\bdist.win-amd64\egg\trac\web\main.py", line 306, in _get_session
    return Session(self.env, req)
  File "build\bdist.win-amd64\egg\trac\web\session.py", line 211, in __init__
    self.promote_session(sid)
  File "build\bdist.win-amd64\egg\trac\web\session.py", line 270, in promote_session
    @self.env.with_transaction()
  File "build\bdist.win-amd64\egg\trac\db\api.py", line 77, in transaction_wrapper
    fn(ldb)
  File "build\bdist.win-amd64\egg\trac\web\session.py", line 302, in update_session_id
    """, (self.req.authname, sid))
  File "build\bdist.win-amd64\egg\trac\db\util.py", line 65, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "build\bdist.win-amd64\egg\trac\db\sqlite_backend.py", line 78, in execute
    result = PyFormatCursor.execute(self, *args)
  File "build\bdist.win-amd64\egg\trac\db\sqlite_backend.py", line 56, in execute
    args or [])
  File "build\bdist.win-amd64\egg\trac\db\sqlite_backend.py", line 48, in _rollback_on_error
    return function(self, *args, **kwargs)
IntegrityError: columns sid, authenticated, name are not unique

Config settings - taken from cookbook. Have disabled EmailVerificationModule as email not setup yet.

[components]
acct_mgr.admin.* = enabled
acct_mgr.api.* = enabled
acct_mgr.db.sessionstore = enabled
acct_mgr.htfile.htdigeststore = disabled
acct_mgr.htfile.htpasswdstore = enabled
acct_mgr.http.httpauthstore = disabled
acct_mgr.notification.* = enabled
acct_mgr.pwhash.htdigesthashmethod = disabled
acct_mgr.pwhash.htpasswdhashmethod = disabled
acct_mgr.svnserve.* = enabled
acct_mgr.svnserve.svnservepasswordstore = disabled
acct_mgr.web_ui.* = enabled
acct_mgr.web_ui.EmailVerificationModule = disabled
acct_mgr.web_ui.RegistrationModule = enabled
trac.web.auth.loginmodule = disabled

[account-manager]
password_store = HtPasswdStore
htpasswd_hash_type = md5
password_file = C:\trac_projects\ctrack\conf\trac.htpasswd

Serving trac via batchfile

tracd --port 8000 C:\trac_projects\ctrack

Attachments (0)

Change History (9)

comment:1 Changed 12 years ago by lukem@…

In addition, attempting to log in with incorrect password brings up

Error

Invalid username or password

comment:2 in reply to:  1 ; Changed 12 years ago by Steffen Hoffmann

Replying to lukem@ctrack.com.au:

Invalid username or password

Is this a Trac Error, or why is this a problem? AccountManager's login form is supposed to give visual feedback on login failure.

comment:3 Changed 12 years ago by Steffen Hoffmann

Related tickets are #9252 and #9843, but the IntegrityError is definitely new here.

Sorry, this is pending for too long now, I know. I'll try to fix it ASAP.

comment:4 Changed 12 years ago by lukem@…

Initially I believed this to be a problem with AccountManagerPlugin. However, I have since wiped the install and gone from scratch again, using Python 2.7 32bit. Everything worked fine. Something in Trac is not happy when running on x64

comment:5 in reply to:  2 Changed 12 years ago by anonymous

Replying to hasienda:

Replying to lukem@ctrack.com.au:

Invalid username or password

Is this a Trac Error, or why is this a problem? AccountManager's login form is supposed to give visual feedback on login failure.

This was demonstrating that it only happens when a correct username and password is entered. Incorrect username and password gives expected behaviour.

comment:6 in reply to:  4 Changed 12 years ago by Steffen Hoffmann

Keywords: needinfo IntegrityError added

Replying to lukem@ctrack.com.au:

Initially I believed this to be a problem with AccountManagerPlugin. However, I have since wiped the install and gone from scratch again, using Python 2.7 32bit. Everything worked fine. Something in Trac is not happy when running on x64

So I assume, that we can mark this ticket as resolved, or do you suggest any more action within the AcctMgr code? Since I don't plan/see the need to do something about it, I encourage you to close it yourself, if you agree.

comment:7 Changed 12 years ago by lukem@…

Resolution: wontfix
Status: newclosed

Works on 32bit python, fails on 64bit python. Closing as wontfix as Hasienda doesn't see the need to do something about it.

comment:8 in reply to:  7 ; Changed 12 years ago by Steffen Hoffmann

Replying to lukem@ctrack.com.au:

Works on 32bit python, fails on 64bit python. Closing as wontfix as Hasienda doesn't see the need to do something about it.

Not exactly my words. 64bit is the future, so it would be unwise to ignore. I just meant to not see, how to fix within AcctMgr code. The error was detected during action on Trac db table session, but no real proof given, if this originated from acct_mgr.web_ui.LoginModule or in trac.auth.LoginModule, that AcctMgr code is wrapped around.

comment:9 in reply to:  8 Changed 12 years ago by lukem@…

Replying to hasienda:

Replying to lukem@ctrack.com.au:

Since I don't plan/see the need to do something about it, I encourage you to close it yourself, if you agree.

Works on 32bit python, fails on 64bit python. Closing as wontfix as Hasienda doesn't see the need to do something about it.

Not exactly my words. 64bit is the future, so it would be unwise to ignore. I just meant to not see, how to fix within AcctMgr code. The error was detected during action on Trac db table session, but no real proof given, if this originated from acct_mgr.web_ui.LoginModule or in trac.auth.LoginModule, that AcctMgr code is wrapped around

I closed it as you said you "don't plan/see the need to do something about it". I took that to mean wontfix. I logged it with a full explanation of what was installed, in order, on what flavour of OS, with a log and example config. Plenty to reproduce the issue. If you need "real" proof, please explain how to get it. I'm a poor programmer, average scripter with very little python knowledge, using Trac as a wiki/help desk ticketing system.

.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Steffen Hoffmann.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.