为哨兵设置Apache2 mod\wsgi

2024-04-19 11:26:28 发布

您现在位置:Python中文网/ 问答频道 /正文

我已经使用了通过以下apache配置在virtualenv上安装的sentry 8.1:

<VirtualHost x.x.x.x:80>
        WSGIDaemonProcess sentry python-path=/var/www/sentry-me:/var/www/sentry-me/env/lib/python2.7/site-packages
        WSGIProcessGroup sentry
        WSGIScriptAlias / /var/www/sentry-me/env/lib/python2.7/site-packages/sentry/wsgi.py
</VirtualHost>

所有的工作都是正确的,但是在我将sentry更新到8.3.3之后,静态文件出现了问题,在apache日志中我看到了以下异常:

^{2}$

iterable的类型是FileWrapper,下面是我的sentry virtualenv中当前安装的包:

amqp==1.4.9
anyjson==0.3.3
BeautifulSoup==3.2.1
billiard==3.3.0.23
celery==3.1.18
cffi==1.6.0
click==6.6
contextlib2==0.5.1
cryptography==1.3.1
cssselect==0.9.1
cssutils==0.9.10
Django==1.6.11
django-bitfield==1.7.1
django-crispy-forms==1.4.0
django-debug-toolbar==1.3.2
django-jsonfield==0.9.13
django-paging==0.2.5
django-picklefield==0.3.2
django-recaptcha==1.0.5
django-social-auth==0.7.28
django-sudo==1.2.1
django-templatetag-sugar==1.0
djangorestframework==2.3.14
email-reply-parser==0.2.0
enum34==1.1.4
exam==0.10.5
hiredis==0.1.6
httplib2==0.9.2
idna==2.1
ipaddr==2.1.11
ipaddress==1.0.16
kombu==3.0.30
lxml==3.6.0
mock==1.0.1
ndg-httpsclient==0.4.0
oauth2==1.9.0.post1
petname==1.7
progressbar==2.3
psycopg2==2.6.1
py==1.4.31
pyasn1==0.1.9
pycparser==2.14
pyOpenSSL==16.0.0
pytest==2.6.4
pytest-django==2.9.1
python-dateutil==2.5.3
python-memcached==1.57
python-openid==2.2.5
pytz==2016.4
PyYAML==3.11
raven==5.13.0
rb==1.4
redis==2.10.5
requests==2.9.2
sentry==8.3.3
setproctitle==1.1.9
simplejson==3.8.2
six==1.10.0
South==1.0.1
sqlparse==0.1.19
statsd==3.1
toronado==0.0.7
ua-parser==0.7.0
urllib3==1.14
uWSGI==2.0.12

Tags: djangopyenvparservirtualenvpytestvarlib
1条回答
网友
1楼 · 发布于 2024-04-19 11:26:28

我将*/my-venv/lib/python2.7/site-packages/sentry/wsgi.py的最新一行更改如下,现在开始工作:

application = WSGIHandler()  # Sentry(FileWrapperWSGIHandler())

但我认为sentry无法监视和显示内部异常,在下一步中,我将application变量定义行更改如下:

^{pr2}$

我认为这个代码工作正常。在

相关问题 更多 >