Ticket #1035 (closed defect: fixed)

Opened 12 years ago

Last modified 12 years ago

bcfg2-web: exception when no 'statistics' section is found

Reported by: Owned by: desai
Priority: major Milestone: Bcfg2 1.2.0 Release
Component: bcfg2-client Version: 1.0
Keywords: Cc:


mod_wsgi (pid=22438): Exception occurred processing WSGI script '/usr/share/bcfg2/reports.wsgi'.
 Traceback (most recent call last):
   File "/usr/lib/pymodules/python2.6/django/core/handlers/", line 230, in __call__
   File "/usr/lib/pymodules/python2.6/django/core/handlers/", line 33, in load_middleware
     for middleware_path in settings.MIDDLEWARE_CLASSES:
   File "/usr/lib/pymodules/python2.6/django/utils/", line 276, in __getattr__
   File "/usr/lib/pymodules/python2.6/django/conf/", line 40, in _setup
     self._wrapped = Settings(settings_module)
   File "/usr/lib/pymodules/python2.6/django/conf/", line 73, in __init__
     mod = importlib.import_module(self.SETTINGS_MODULE)
   File "/usr/lib/pymodules/python2.6/django/utils/", line 35, in import_module
   File "/usr/lib/pymodules/python2.6/Bcfg2/Server/Reports/", line 27, in <module>
     db_engine = c.get('statistics', 'database_engine')
   File "/usr/lib/python2.6/", line 532, in get
     raise NoSectionError(section)
 NoSectionError: No section: 'statistics'

I expected some more user-friendly message instead of 500 Internal Server Error when bcfg2 is not configured.


Change History

comment:1 Changed 12 years ago by

  • Summary changed from bcfg-web2: exception when no 'statistics' section is found to bcfg2-web: exception when no 'statistics' section is found

comment:2 Changed 12 years ago by

The exception is also thrown when web server process don't have access to read /etc/bcfg2.conf (which is the default situation).

comment:3 Changed 12 years ago by solj

  • Status changed from new to closed
  • Resolution set to fixed

WARNING! You need to establish a session before you can create or edit tickets. Otherwise the ticket will get treated as spam.


Add a comment

Modify Ticket

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'

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

Note: See TracTickets for help on using tickets.