Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#13427 closed defect (fixed)

Error registering componentDirectoryAuthPlugin

Reported by: Xián Owned by: bebbo
Priority: normal Component: DirectoryAuthPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.2

Description

After Installing DirectoryAuthPlugin, and setting everything up, even being able to log in. if there's a server restart / apache reload. plugin refuses to load

Trying to use trac after the restart results in the folowing error message

Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/trac/web/api.py", line 701, in send_error
    add_stylesheet(self, 'common/css/code.css')
  File "build/bdist.linux-x86_64/egg/trac/web/chrome.py", line 152, in add_stylesheet
    href = chrome_resource_path(req, filename)
  File "build/bdist.linux-x86_64/egg/trac/web/chrome.py", line 367, in chrome_resource_path
    elif filename.startswith('common/') and 'htdocs_location' in req.chrome:
  File "build/bdist.linux-x86_64/egg/trac/web/api.py", line 491, in __getattr__
    value = self.callbacks[name](self)
  File "build/bdist.linux-x86_64/egg/trac/web/chrome.py", line 818, in prepare_request
    for contributor in self.navigation_contributors:
  File "build/bdist.linux-x86_64/egg/trac/core.py", line 90, in extensions
    components = [component.compmgr[cls] for cls in classes]
  File "build/bdist.linux-x86_64/egg/trac/core.py", line 220, in __getitem__
    component = cls(self)
  File "build/bdist.linux-x86_64/egg/trac/core.py", line 152, in __call__
    self.__init__()
  File "build/bdist.linux-x86_64/egg/acct_mgr/web_ui.py", line 82, in __init__
    self._write_check(log=True)
  File "build/bdist.linux-x86_64/egg/acct_mgr/web_ui.py", line 87, in _write_check
    self.acctmgr.get_all_supporting_stores('set_password')
  File "build/bdist.linux-x86_64/egg/acct_mgr/api.py", line 338, in get_all_supporting_stores
    for store in self.password_stores:
  File "build/bdist.linux-x86_64/egg/trac/config.py", line 928, in __get__
    option=tag.code("[%s] %s" % (self.section, self.name))))
ConfigurationError: Cannot find implementation(s) of the <code>IPasswordStore</code> interface named <code>DirAuthStore</code>. Please check that the Component is enabled or update the option <code>[account-manager] password_store</code> in trac.ini.

Trac Logs reports the folowing errors:

2018-05-09 05:37:04,732 Trac[loader] DEBUG: Loading plugin "acct_mgr.pwhash" from "/trac/plugins/TracAccountManager-0.5.dev0-py2.7.egg"
2018-05-09 05:37:04,733 Trac[loader] DEBUG: Loading plugin "acct_mgr.register" from "/trac/plugins/TracAccountManager-0.5.dev0-py2.7.egg"
2018-05-09 05:37:04,733 Trac[loader] DEBUG: Loading plugin "acct_mgr.svnserve" from "/trac/plugins/TracAccountManager-0.5.dev0-py2.7.egg"
2018-05-09 05:37:04,735 Trac[loader] DEBUG: Loading plugin "acct_mgr.web_ui" from "/trac/plugins/TracAccountManager-0.5.dev0-py2.7.egg"
2018-05-09 05:37:04,735 Trac[loader] DEBUG: Loading plugin "componentdependencyplugin" from "/trac/plugins/ComponentDependencyPlugin-0.1-py2.7.egg"
2018-05-09 05:37:04,736 Trac[loader] DEBUG: Loading plugin "dirauth" from "/trac/plugins/TracDirectoryAuth-2.1.0-py2.7.egg"
2018-05-09 05:37:04,737 Trac[loader] ERROR: Skipping "dirauth = tracext.dirauth": ImportError: No module named dirauth
2018-05-09 05:37:04,737 Trac[loader] DEBUG: Loading plugin "dirauth.db" from "/trac/plugins/TracDirectoryAuth-2.1.0-py2.7.egg"
2018-05-09 05:37:04,738 Trac[loader] ERROR: Skipping "dirauth.db = tracext.dirauth.db": ImportError: No module named dirauth.db
2018-05-09 05:37:04,739 Trac[loader] DEBUG: Loading plugin "dirauth.permissionstore" from "/trac/plugins/TracDirectoryAuth-2.1.0-py2.7.egg"
2018-05-09 05:37:04,740 Trac[loader] ERROR: Skipping "dirauth.permissionstore = tracext.dirauth.api:UserExtensiblePermissionStore": ImportError: No module named dirauth.api

As a workaround, Following this steps "fixes the issue until the next restart",

  1. Disable TracAccountManager plugin, uninstalling it
  2. Refresh Environment / Restart Server
  3. Add trac_admin permission to anonymous
  4. Reinstall TracAccountManager egg

After doing this, TracDirectoryAuth Registers correctly

Attachments (0)

Change History (6)

comment:1 Changed 6 years ago by Xián

Summary: Error registiring componentError registering componentDirectoryAuthPlugin

Clarifying ticket title

comment:2 Changed 6 years ago by bebbo

this sound more like a permission problem in your local installation.

comment:3 Changed 6 years ago by Xián

I've checked that all the trac environment belongs to www-user (it is an trac instance trough apache fcgi)

I've also checked that the plugins that i have installed, have permissions (755). All my plugins are local plugins, that reside on trac directory (/trac/plugins)

comment:4 Changed 6 years ago by Xián

I've found out that the problem happens when trac-github is present https://github.com/trac-hacks/trac-github

I dont know if it is due some kind of namespace overwrite or something

comment:5 Changed 6 years ago by Xián

Resolution: fixed
Status: newclosed

Seems that both DirectoryAuthPlugin and Github plugin had an issue.

https://github.com/trac-hacks/trac-github/issues/131

Found more info @ github repository.

upgrading to github plugin 2.4 solves the issue

comment:6 Changed 6 years ago by Ryan J Ollos

I was wondering if anyone had/would encounter that issue. I'm glad you tracked it down.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain bebbo.
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.