Opened 15 years ago
Closed 14 years ago
#7260 closed defect (worksforme)
MissingSectionHeaderError: File contains no section headers.
| Reported by: | admin | Owned by: | Steffen Hoffmann |
|---|---|---|---|
| Priority: | low | Component: | AccountManagerPlugin |
| Severity: | normal | Keywords: | needinfo htpasswd file |
| Cc: | Trac Release: | 0.12 |
Description
How to Reproduce
While doing a GET operation on /admin/accounts/users, Trac issued an internal error.
(please provide additional details here)
Request parameters:
{'cat_id': u'accounts', 'panel_id': u'users', 'path_info': None}
User agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 ( .NET CLR 3.5.30729)
System Information
Trac | 0.12
|
Genshi | 0.6
|
mod_python | 3.2.8
|
pysqlite | 2.3.3
|
Python | 2.4.3 (#1, Sep 3 2009, 15:37:37) [GCC 4.1.2 20080704 (Red Hat 4.1.2-46)]
|
setuptools | 0.6c11
|
SQLite | 3.3.6
|
Subversion | 1.6.11 (r934486)
|
jQuery | 1.4.2
|
Enabled Plugins
TracAccountManager | 0.2.1dev-r7737
|
Python Traceback
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 513, in _dispatch_request
dispatcher.dispatch(req)
File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 235, in dispatch
resp = chosen_handler.process_request(req)
File "/usr/lib/python2.4/site-packages/trac/admin/web_ui.py", line 116, in process_request
path_info)
File "build/bdist.linux-x86_64/egg/acct_mgr/admin.py", line 117, in render_admin_panel
File "build/bdist.linux-x86_64/egg/acct_mgr/admin.py", line 236, in _do_users
File "build/bdist.linux-x86_64/egg/acct_mgr/api.py", line 123, in get_users
File "build/bdist.linux-x86_64/egg/acct_mgr/svnserve.py", line 52, in get_users
File "build/bdist.linux-x86_64/egg/acct_mgr/svnserve.py", line 43, in _config
File "/usr/lib/python2.4/site-packages/trac/config.py", line 56, in __init__
self.parse_if_needed(force=True)
File "/usr/lib/python2.4/site-packages/trac/config.py", line 262, in parse_if_needed
self.parser.read(self.filename)
File "/usr/lib64/python2.4/ConfigParser.py", line 267, in read
self._read(fp, filename)
File "/usr/lib64/python2.4/ConfigParser.py", line 462, in _read
raise MissingSectionHeaderError(fpname, lineno, line)
MissingSectionHeaderError: File contains no section headers.
file: /srv/trac/nexus.htpasswd, line: 1
'admin:$apr1$w8FRQ...$UNw3wD/qASTDsTRbmpDuL.\n'
Attachments (0)
Change History (4)
comment:1 Changed 15 years ago by
| Component: | SELECT A HACK → AccountManagerPlugin |
|---|---|
| Keywords: | .htpasswd added |
| Owner: | changed from anonymous to John Hampton |
| Summary: | MissingSectionHeaderError: File contains no section headers. file: /srv/trac/nexus.htpasswd, line: 1 'admin:$apr1$w8FRQ...$UNw3wD/qASTDsTRbmpDuL.\n' → MissingSectionHeaderError: File contains no section headers. |
| Trac Release: | 0.11 → 0.12 |
comment:2 Changed 15 years ago by
| Keywords: | needinfo htpasswd file added; .htpasswd removed |
|---|---|
| Owner: | changed from John Hampton to Steffen Hoffmann |
| Priority: | normal → low |
I coming back here after code studies I still think this is a local installation/configuration issue.
Current best bet is wrong file path or mixing of unrelated configuration options meant for different AuthStores like adding password_store = SvnServePasswordStore to trac.ini (I see get_users from that store triggered before the error.) while with corresponding password_file = /path/to/svn/repos/conf/passwd you actually provide a file in htpasswd format (Seen /srv/trac/nexus.htpasswd mentioned above and printout of 1st line of the file with username 'admin' and a md5 password hash suggesting that format.)? Really looks like you configured it in a way, that AccountManagerPlugin is trying to parse that password file as if it would expect 'svnserve.conf' file content there. Does this make sense to you, if you look at your configuration now?
I'll lower priority and suggest reading about configuration for authentication storage. Is this still relevant, or did you even resolve your issue meanwhile?
Beware: As I see you're running Trac on Windows, you should really upgrade to a recent trunk version, since I've found some possible issues with parsing PasswordFileStores (both .htpasswd and .htdigest) on non-Unix platforms. This was related to different formatting end-of-line (CRLF under Windows, while Unix-stule LF was expected by the file parser) and has been corrected in [9272].
Without knowing further configuration details I can hardly provide any more help.
comment:3 Changed 14 years ago by
This is subject to be closed as worksforme, since the OP failed to provide more insight into the case - or he/she already went away happily with the hints provided here months ago.
Sorry, but this is not the best habit. Please provide some feedback, even - or especially, if the issue has been resolved, preferably including some details on the resolution. So all of us could profit for possible future cases that may be similar.
comment:4 Changed 14 years ago by
| Resolution: | → worksforme |
|---|---|
| Status: | new → closed |
Back here, still no reply from the reporter.
Blame yourself for me not spending a minute more on this. This is disappointing communication style, to say the least offending.



Make no fun but provide real content here, be friendly, after all you seek help for free here. :-)
You might want to attach your .htpasswd file, if you really think, this is related, or get request to do so. Who's
admin? Register with this site to get a nickname that'll protect your email contact better than anything else while still allowing you to follow changes of your ticket.Anyway, most probably this is an issue with your .htpasswd file, not with the Trac plugin.