newrelic 和 zope 出错
Error with newrelic and zope
我正在尝试使用 zope 配置 newrelic,但它返回错误:
# bin/newrelic-admin 运行-python bin/zeoserver fg
Traceback (most recent call last):
File "bin/zeoserver", line 22, in <module>
import plone.recipe.zeoserver.ctl
File "/opt/bitnami/apps/plone/buildout-cache/eggs/plone.recipe.zeoserver-1.2.6-py2.7.egg/plone/recipe/zeoserver/__init__.py", line 9, in <module>
import zc.recipe.egg
File "/opt/bitnami/apps/plone/buildout-cache/eggs/zc.recipe.egg-1.3.2-py2.7.egg/zc/recipe/egg/__init__.py", line 1, in <module>
from zc.recipe.egg.egg import Egg, Scripts, Eggs
File "/opt/bitnami/apps/plone/buildout-cache/eggs/zc.recipe.egg-1.3.2-py2.7.egg/zc/recipe/egg/egg.py", line 21, in <module>
import zc.buildout.easy_install
File "/opt/bitnami/apps/plone/buildout-cache/eggs/zc.buildout-2.2.5-py2.7.egg/zc/buildout/easy_install.py", line 81, in <module>
pkg_resources.Requirement.parse('zc.buildout')).location,
AttributeError: 'NoneType' object has no attribute 'location'
请问有人知道是什么吗?
我解决了在应用程序 __init__.py 中添加以下代码的问题:
import newrelic.agent
newrelic.agent.initialize('path/of/newrelic.ini')
并在没有命令 "newrelic-admin run-python" 的情况下执行应用程序。
Newrelic 可以工作,但有局限性,因为还没有官方支持。
我正在尝试使用 zope 配置 newrelic,但它返回错误:
# bin/newrelic-admin 运行-python bin/zeoserver fg
Traceback (most recent call last):
File "bin/zeoserver", line 22, in <module>
import plone.recipe.zeoserver.ctl
File "/opt/bitnami/apps/plone/buildout-cache/eggs/plone.recipe.zeoserver-1.2.6-py2.7.egg/plone/recipe/zeoserver/__init__.py", line 9, in <module>
import zc.recipe.egg
File "/opt/bitnami/apps/plone/buildout-cache/eggs/zc.recipe.egg-1.3.2-py2.7.egg/zc/recipe/egg/__init__.py", line 1, in <module>
from zc.recipe.egg.egg import Egg, Scripts, Eggs
File "/opt/bitnami/apps/plone/buildout-cache/eggs/zc.recipe.egg-1.3.2-py2.7.egg/zc/recipe/egg/egg.py", line 21, in <module>
import zc.buildout.easy_install
File "/opt/bitnami/apps/plone/buildout-cache/eggs/zc.buildout-2.2.5-py2.7.egg/zc/buildout/easy_install.py", line 81, in <module>
pkg_resources.Requirement.parse('zc.buildout')).location,
AttributeError: 'NoneType' object has no attribute 'location'
请问有人知道是什么吗?
我解决了在应用程序 __init__.py 中添加以下代码的问题:
import newrelic.agent
newrelic.agent.initialize('path/of/newrelic.ini')
并在没有命令 "newrelic-admin run-python" 的情况下执行应用程序。
Newrelic 可以工作,但有局限性,因为还没有官方支持。