0

请告诉我如何解决这个问题

我尝试在 CentOS 上安装安装和配置哨兵服务,当我尝试启动哨兵服务时,我收到此错误:

[root@felipeurrego ~]# source /var/www/sentry/bin/activate
(sentry)[root@felipeurrego ~]# sentry --config=/etc/sentry.conf.py start
Traceback (most recent call last):
  File "/var/www/sentry/bin/sentry", line 8, in <module>
    load_entry_point('sentry==5.4.5', 'console_scripts', 'sentry')()
  File "/var/www/sentry/lib/python2.6/site-packages/sentry-5.4.5-py2.6.egg/sentry/utils/runner.py", line 197, in main
    initializer=initialize_app,
  File "/var/www/sentry/lib/python2.6/site-packages/logan-0.5.5-py2.6.egg/logan/runner.py", line 155, in run_app
    management.execute_from_command_line([runner_name, command] + command_args)
  File "/var/www/sentry/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/core/management/__init__.py", line 443, in execute_from_command_line
    utility.execute()
  File "/var/www/sentry/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/core/management/__init__.py", line 382, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/var/www/sentry/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/core/management/__init__.py", line 252, in fetch_command
    app_name = get_commands()[subcommand]
  File "/var/www/sentry/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/core/management/__init__.py", line 101, in get_commands
    apps = settings.INSTALLED_APPS
  File "/var/www/sentry/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/utils/functional.py", line 184, in inner
    self._setup()
  File "/var/www/sentry/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/conf/__init__.py", line 42, in _setup
    self._wrapped = Settings(settings_module)
  File "/var/www/sentry/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/conf/__init__.py", line 93, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/var/www/sentry/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/var/www/sentry/lib/python2.6/site-packages/logan-0.5.5-py2.6.egg/logan/importer.py", line 68, in load_module
    return self._load_module(fullname)
  File "/var/www/sentry/lib/python2.6/site-packages/logan-0.5.5-py2.6.egg/logan/importer.py", line 92, in _load_module
    load_settings(self.config_path, allow_extras=self.allow_extras, settings=settings_mod)
  File "/var/www/sentry/lib/python2.6/site-packages/logan-0.5.5-py2.6.egg/logan/settings.py", line 49, in load_settings
    execfile(mod_or_filename, conf.__dict__)
    django.core.exceptions.ImproperlyConfigured: IndentationError('unexpected indent', ('/etc/sentry.conf.py', 58, 1, " SENTRY_URL_PREFIX = 'http://logs.felipeurrego.com'\n"))

就这样

4

1 回答 1

0

很清楚:

django.core.exceptions.ImproperlyConfigured: IndentationError('unexpected indent', ('/etc/sentry.conf.py', 58, 1, "SENTRY_URL_PREFIX = ' http://logs.felipeurrego.com '\n"))

SENTRY_URL_PREFIX/etc/sentry.conf.py. Python 要求源代码文件中的所有内容都统一缩进。

于 2013-04-12T06:04:50.900 回答